lxml 5.2.0__cp310-cp310-win32.whl → 5.2.2__cp310-cp310-win32.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. lxml/ElementInclude.py +244 -244
  2. lxml/__init__.py +22 -22
  3. lxml/_elementpath.cp310-win32.pyd +0 -0
  4. lxml/_elementpath.py +341 -341
  5. lxml/apihelpers.pxi +1793 -1793
  6. lxml/builder.cp310-win32.pyd +0 -0
  7. lxml/builder.py +232 -232
  8. lxml/classlookup.pxi +580 -580
  9. lxml/cleanup.pxi +215 -215
  10. lxml/cssselect.py +101 -101
  11. lxml/debug.pxi +90 -90
  12. lxml/docloader.pxi +178 -178
  13. lxml/doctestcompare.py +488 -488
  14. lxml/dtd.pxi +478 -478
  15. lxml/etree.cp310-win32.pyd +0 -0
  16. lxml/etree.h +6 -6
  17. lxml/etree.pyx +3732 -3711
  18. lxml/extensions.pxi +833 -833
  19. lxml/html/ElementSoup.py +10 -10
  20. lxml/html/__init__.py +1923 -1923
  21. lxml/html/_diffcommand.py +86 -86
  22. lxml/html/_html5builder.py +100 -100
  23. lxml/html/_setmixin.py +56 -56
  24. lxml/html/builder.py +133 -133
  25. lxml/html/clean.py +21 -21
  26. lxml/html/defs.py +135 -135
  27. lxml/html/diff.cp310-win32.pyd +0 -0
  28. lxml/html/diff.py +878 -878
  29. lxml/html/formfill.py +299 -299
  30. lxml/html/html5parser.py +260 -260
  31. lxml/html/soupparser.py +314 -314
  32. lxml/html/usedoctest.py +13 -13
  33. lxml/includes/c14n.pxd +25 -25
  34. lxml/includes/config.pxd +3 -3
  35. lxml/includes/dtdvalid.pxd +18 -18
  36. lxml/includes/etree_defs.h +379 -379
  37. lxml/includes/etreepublic.pxd +237 -237
  38. lxml/includes/htmlparser.pxd +56 -56
  39. lxml/includes/lxml-version.h +1 -1
  40. lxml/includes/relaxng.pxd +64 -64
  41. lxml/includes/schematron.pxd +34 -34
  42. lxml/includes/tree.pxd +494 -494
  43. lxml/includes/uri.pxd +5 -5
  44. lxml/includes/xinclude.pxd +22 -22
  45. lxml/includes/xmlerror.pxd +852 -852
  46. lxml/includes/xmlparser.pxd +265 -265
  47. lxml/includes/xmlschema.pxd +35 -35
  48. lxml/includes/xpath.pxd +136 -136
  49. lxml/includes/xslt.pxd +190 -190
  50. lxml/isoschematron/__init__.py +348 -348
  51. lxml/isoschematron/resources/rng/iso-schematron.rng +709 -709
  52. lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl +75 -75
  53. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl +312 -312
  54. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl +1159 -1159
  55. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl +54 -54
  56. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl +1796 -1796
  57. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl +588 -588
  58. lxml/iterparse.pxi +438 -438
  59. lxml/lxml.etree.h +6 -6
  60. lxml/nsclasses.pxi +281 -281
  61. lxml/objectify.cp310-win32.pyd +0 -0
  62. lxml/objectify.pyx +2145 -2145
  63. lxml/objectpath.pxi +332 -332
  64. lxml/parser.pxi +1994 -1994
  65. lxml/parsertarget.pxi +180 -180
  66. lxml/proxy.pxi +619 -619
  67. lxml/public-api.pxi +178 -178
  68. lxml/pyclasslookup.py +3 -3
  69. lxml/readonlytree.pxi +565 -565
  70. lxml/relaxng.pxi +165 -165
  71. lxml/sax.cp310-win32.pyd +0 -0
  72. lxml/sax.py +275 -275
  73. lxml/saxparser.pxi +875 -875
  74. lxml/schematron.pxi +168 -168
  75. lxml/serializer.pxi +1871 -1871
  76. lxml/usedoctest.py +13 -13
  77. lxml/xinclude.pxi +67 -67
  78. lxml/xmlerror.pxi +1654 -1654
  79. lxml/xmlid.pxi +179 -179
  80. lxml/xmlschema.pxi +215 -215
  81. lxml/xpath.pxi +487 -487
  82. lxml/xslt.pxi +950 -950
  83. lxml/xsltext.pxi +242 -242
  84. {lxml-5.2.0.dist-info → lxml-5.2.2.dist-info}/LICENSE.txt +29 -29
  85. {lxml-5.2.0.dist-info → lxml-5.2.2.dist-info}/LICENSES.txt +29 -29
  86. {lxml-5.2.0.dist-info → lxml-5.2.2.dist-info}/METADATA +9 -17
  87. {lxml-5.2.0.dist-info → lxml-5.2.2.dist-info}/RECORD +89 -89
  88. {lxml-5.2.0.dist-info → lxml-5.2.2.dist-info}/WHEEL +0 -0
  89. {lxml-5.2.0.dist-info → lxml-5.2.2.dist-info}/top_level.txt +0 -0
lxml/usedoctest.py CHANGED
@@ -1,13 +1,13 @@
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__)
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__)
lxml/xinclude.pxi CHANGED
@@ -1,67 +1,67 @@
1
- # XInclude processing
2
-
3
- from lxml.includes cimport xinclude
4
-
5
-
6
- cdef class XIncludeError(LxmlError):
7
- """Error during XInclude processing.
8
- """
9
-
10
-
11
- cdef class XInclude:
12
- """XInclude(self)
13
- XInclude processor.
14
-
15
- Create an instance and call it on an Element to run XInclude
16
- processing.
17
- """
18
- cdef _ErrorLog _error_log
19
- def __init__(self):
20
- self._error_log = _ErrorLog()
21
-
22
- @property
23
- def error_log(self):
24
- assert self._error_log is not None, "XInclude instance not initialised"
25
- return self._error_log.copy()
26
-
27
- def __call__(self, _Element node not None):
28
- "__call__(self, node)"
29
- # We cannot pass the XML_PARSE_NOXINCNODE option as this would free
30
- # the XInclude nodes - there may still be Python references to them!
31
- # Therefore, we allow XInclude nodes to be converted to
32
- # XML_XINCLUDE_START nodes. XML_XINCLUDE_END nodes are added as
33
- # siblings. Tree traversal will simply ignore them as they are not
34
- # typed as elements. The included fragment is added between the two,
35
- # i.e. as a sibling, which does not conflict with traversal.
36
- cdef int result
37
- _assertValidNode(node)
38
- assert self._error_log is not None, "XInclude processor not initialised"
39
- if node._doc._parser is not None:
40
- parse_options = node._doc._parser._parse_options
41
- context = node._doc._parser._getParserContext()
42
- c_context = <void*>context
43
- else:
44
- parse_options = 0
45
- context = None
46
- c_context = NULL
47
-
48
- self._error_log.connect()
49
- if tree.LIBXML_VERSION < 20704 or not c_context:
50
- __GLOBAL_PARSER_CONTEXT.pushImpliedContext(context)
51
- with nogil:
52
- orig_loader = _register_document_loader()
53
- if c_context:
54
- result = xinclude.xmlXIncludeProcessTreeFlagsData(
55
- node._c_node, parse_options, c_context)
56
- else:
57
- result = xinclude.xmlXIncludeProcessTree(node._c_node)
58
- _reset_document_loader(orig_loader)
59
- if tree.LIBXML_VERSION < 20704 or not c_context:
60
- __GLOBAL_PARSER_CONTEXT.popImpliedContext()
61
- self._error_log.disconnect()
62
-
63
- if result == -1:
64
- raise XIncludeError(
65
- self._error_log._buildExceptionMessage(
66
- "XInclude processing failed"),
67
- self._error_log)
1
+ # XInclude processing
2
+
3
+ from lxml.includes cimport xinclude
4
+
5
+
6
+ cdef class XIncludeError(LxmlError):
7
+ """Error during XInclude processing.
8
+ """
9
+
10
+
11
+ cdef class XInclude:
12
+ """XInclude(self)
13
+ XInclude processor.
14
+
15
+ Create an instance and call it on an Element to run XInclude
16
+ processing.
17
+ """
18
+ cdef _ErrorLog _error_log
19
+ def __init__(self):
20
+ self._error_log = _ErrorLog()
21
+
22
+ @property
23
+ def error_log(self):
24
+ assert self._error_log is not None, "XInclude instance not initialised"
25
+ return self._error_log.copy()
26
+
27
+ def __call__(self, _Element node not None):
28
+ "__call__(self, node)"
29
+ # We cannot pass the XML_PARSE_NOXINCNODE option as this would free
30
+ # the XInclude nodes - there may still be Python references to them!
31
+ # Therefore, we allow XInclude nodes to be converted to
32
+ # XML_XINCLUDE_START nodes. XML_XINCLUDE_END nodes are added as
33
+ # siblings. Tree traversal will simply ignore them as they are not
34
+ # typed as elements. The included fragment is added between the two,
35
+ # i.e. as a sibling, which does not conflict with traversal.
36
+ cdef int result
37
+ _assertValidNode(node)
38
+ assert self._error_log is not None, "XInclude processor not initialised"
39
+ if node._doc._parser is not None:
40
+ parse_options = node._doc._parser._parse_options
41
+ context = node._doc._parser._getParserContext()
42
+ c_context = <void*>context
43
+ else:
44
+ parse_options = 0
45
+ context = None
46
+ c_context = NULL
47
+
48
+ self._error_log.connect()
49
+ if tree.LIBXML_VERSION < 20704 or not c_context:
50
+ __GLOBAL_PARSER_CONTEXT.pushImpliedContext(context)
51
+ with nogil:
52
+ orig_loader = _register_document_loader()
53
+ if c_context:
54
+ result = xinclude.xmlXIncludeProcessTreeFlagsData(
55
+ node._c_node, parse_options, c_context)
56
+ else:
57
+ result = xinclude.xmlXIncludeProcessTree(node._c_node)
58
+ _reset_document_loader(orig_loader)
59
+ if tree.LIBXML_VERSION < 20704 or not c_context:
60
+ __GLOBAL_PARSER_CONTEXT.popImpliedContext()
61
+ self._error_log.disconnect()
62
+
63
+ if result == -1:
64
+ raise XIncludeError(
65
+ self._error_log._buildExceptionMessage(
66
+ "XInclude processing failed"),
67
+ self._error_log)