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/public-api.pxi CHANGED
@@ -1,178 +1,178 @@
1
- # Public C API for lxml.etree
2
-
3
- cdef public api _Element deepcopyNodeToDocument(_Document doc, xmlNode* c_root):
4
- "Recursively copy the element into the document. doc is not modified."
5
- cdef xmlNode* c_node
6
- c_node = _copyNodeToDoc(c_root, doc._c_doc)
7
- return _elementFactory(doc, c_node)
8
-
9
- cdef public api _ElementTree elementTreeFactory(_Element context_node):
10
- _assertValidNode(context_node)
11
- return newElementTree(context_node, _ElementTree)
12
-
13
- cdef public api _ElementTree newElementTree(_Element context_node,
14
- object subclass):
15
- if <void*>context_node is NULL or context_node is None:
16
- raise TypeError
17
- _assertValidNode(context_node)
18
- return _newElementTree(context_node._doc, context_node, subclass)
19
-
20
- cdef public api _ElementTree adoptExternalDocument(xmlDoc* c_doc, parser, bint is_owned):
21
- if c_doc is NULL:
22
- raise TypeError
23
- doc = _adoptForeignDoc(c_doc, parser, is_owned)
24
- return _elementTreeFactory(doc, None)
25
-
26
- cdef public api _Element elementFactory(_Document doc, xmlNode* c_node):
27
- if c_node is NULL or doc is None:
28
- raise TypeError
29
- return _elementFactory(doc, c_node)
30
-
31
- cdef public api _Element makeElement(tag, _Document doc, parser,
32
- text, tail, attrib, nsmap):
33
- return _makeElement(tag, NULL, doc, parser, text, tail, attrib, nsmap, None)
34
-
35
- cdef public api _Element makeSubElement(_Element parent, tag, text, tail,
36
- attrib, nsmap):
37
- _assertValidNode(parent)
38
- return _makeSubElement(parent, tag, text, tail, attrib, nsmap, None)
39
-
40
- cdef public api void setElementClassLookupFunction(
41
- _element_class_lookup_function function, state):
42
- _setElementClassLookupFunction(function, state)
43
-
44
- cdef public api object lookupDefaultElementClass(state, doc, xmlNode* c_node):
45
- return _lookupDefaultElementClass(state, doc, c_node)
46
-
47
- cdef public api object lookupNamespaceElementClass(state, doc, xmlNode* c_node):
48
- return _find_nselement_class(state, doc, c_node)
49
-
50
- cdef public api object callLookupFallback(FallbackElementClassLookup lookup,
51
- _Document doc, xmlNode* c_node):
52
- return _callLookupFallback(lookup, doc, c_node)
53
-
54
- cdef public api int tagMatches(xmlNode* c_node, const_xmlChar* c_href, const_xmlChar* c_name):
55
- if c_node is NULL:
56
- return -1
57
- return _tagMatches(c_node, c_href, c_name)
58
-
59
- cdef public api _Document documentOrRaise(object input):
60
- return _documentOrRaise(input)
61
-
62
- cdef public api _Element rootNodeOrRaise(object input):
63
- return _rootNodeOrRaise(input)
64
-
65
- cdef public api bint hasText(xmlNode* c_node):
66
- return _hasText(c_node)
67
-
68
- cdef public api bint hasTail(xmlNode* c_node):
69
- return _hasTail(c_node)
70
-
71
- cdef public api unicode textOf(xmlNode* c_node):
72
- if c_node is NULL:
73
- return None
74
- return _collectText(c_node.children)
75
-
76
- cdef public api unicode tailOf(xmlNode* c_node):
77
- if c_node is NULL:
78
- return None
79
- return _collectText(c_node.next)
80
-
81
- cdef public api int setNodeText(xmlNode* c_node, text) except -1:
82
- if c_node is NULL:
83
- raise ValueError
84
- return _setNodeText(c_node, text)
85
-
86
- cdef public api int setTailText(xmlNode* c_node, text) except -1:
87
- if c_node is NULL:
88
- raise ValueError
89
- return _setTailText(c_node, text)
90
-
91
- cdef public api unicode attributeValue(xmlNode* c_element, xmlAttr* c_attrib_node):
92
- return _attributeValue(c_element, c_attrib_node)
93
-
94
- cdef public api unicode attributeValueFromNsName(xmlNode* c_element,
95
- const_xmlChar* ns, const_xmlChar* name):
96
- return _attributeValueFromNsName(c_element, ns, name)
97
-
98
- cdef public api object getAttributeValue(_Element element, key, default):
99
- _assertValidNode(element)
100
- return _getAttributeValue(element, key, default)
101
-
102
- cdef public api object iterattributes(_Element element, int keysvalues):
103
- _assertValidNode(element)
104
- return _attributeIteratorFactory(element, keysvalues)
105
-
106
- cdef public api list collectAttributes(xmlNode* c_element, int keysvalues):
107
- return _collectAttributes(c_element, keysvalues)
108
-
109
- cdef public api int setAttributeValue(_Element element, key, value) except -1:
110
- _assertValidNode(element)
111
- return _setAttributeValue(element, key, value)
112
-
113
- cdef public api int delAttribute(_Element element, key) except -1:
114
- _assertValidNode(element)
115
- return _delAttribute(element, key)
116
-
117
- cdef public api int delAttributeFromNsName(tree.xmlNode* c_element,
118
- const_xmlChar* c_href, const_xmlChar* c_name):
119
- return _delAttributeFromNsName(c_element, c_href, c_name)
120
-
121
- cdef public api bint hasChild(xmlNode* c_node):
122
- return _hasChild(c_node)
123
-
124
- cdef public api xmlNode* findChild(xmlNode* c_node, Py_ssize_t index):
125
- return _findChild(c_node, index)
126
-
127
- cdef public api xmlNode* findChildForwards(xmlNode* c_node, Py_ssize_t index):
128
- return _findChildForwards(c_node, index)
129
-
130
- cdef public api xmlNode* findChildBackwards(xmlNode* c_node, Py_ssize_t index):
131
- return _findChildBackwards(c_node, index)
132
-
133
- cdef public api xmlNode* nextElement(xmlNode* c_node):
134
- return _nextElement(c_node)
135
-
136
- cdef public api xmlNode* previousElement(xmlNode* c_node):
137
- return _previousElement(c_node)
138
-
139
- cdef public api void appendChild(_Element parent, _Element child):
140
- # deprecated, use appendChildToElement() instead!
141
- _appendChild(parent, child)
142
-
143
- cdef public api int appendChildToElement(_Element parent, _Element child) except -1:
144
- return _appendChild(parent, child)
145
-
146
- cdef public api unicode pyunicode(const_xmlChar* s):
147
- if s is NULL:
148
- raise TypeError
149
- return funicode(s)
150
-
151
- cdef public api bytes utf8(object s):
152
- return _utf8(s)
153
-
154
- cdef public api tuple getNsTag(object tag):
155
- return _getNsTag(tag)
156
-
157
- cdef public api tuple getNsTagWithEmptyNs(object tag):
158
- return _getNsTagWithEmptyNs(tag)
159
-
160
- cdef public api unicode namespacedName(xmlNode* c_node):
161
- return _namespacedName(c_node)
162
-
163
- cdef public api unicode namespacedNameFromNsName(const_xmlChar* href, const_xmlChar* name):
164
- return _namespacedNameFromNsName(href, name)
165
-
166
- cdef public api void iteratorStoreNext(_ElementIterator iterator, _Element node):
167
- # deprecated!
168
- iterator._storeNext(node)
169
-
170
- cdef public api void initTagMatch(_ElementTagMatcher matcher, tag):
171
- # deprecated!
172
- matcher._initTagMatch(tag)
173
-
174
- cdef public api tree.xmlNs* findOrBuildNodeNsPrefix(
175
- _Document doc, xmlNode* c_node, const_xmlChar* href, const_xmlChar* prefix) except NULL:
176
- if doc is None:
177
- raise TypeError
178
- return doc._findOrBuildNodeNs(c_node, href, prefix, 0)
1
+ # Public C API for lxml.etree
2
+
3
+ cdef public api _Element deepcopyNodeToDocument(_Document doc, xmlNode* c_root):
4
+ "Recursively copy the element into the document. doc is not modified."
5
+ cdef xmlNode* c_node
6
+ c_node = _copyNodeToDoc(c_root, doc._c_doc)
7
+ return _elementFactory(doc, c_node)
8
+
9
+ cdef public api _ElementTree elementTreeFactory(_Element context_node):
10
+ _assertValidNode(context_node)
11
+ return newElementTree(context_node, _ElementTree)
12
+
13
+ cdef public api _ElementTree newElementTree(_Element context_node,
14
+ object subclass):
15
+ if <void*>context_node is NULL or context_node is None:
16
+ raise TypeError
17
+ _assertValidNode(context_node)
18
+ return _newElementTree(context_node._doc, context_node, subclass)
19
+
20
+ cdef public api _ElementTree adoptExternalDocument(xmlDoc* c_doc, parser, bint is_owned):
21
+ if c_doc is NULL:
22
+ raise TypeError
23
+ doc = _adoptForeignDoc(c_doc, parser, is_owned)
24
+ return _elementTreeFactory(doc, None)
25
+
26
+ cdef public api _Element elementFactory(_Document doc, xmlNode* c_node):
27
+ if c_node is NULL or doc is None:
28
+ raise TypeError
29
+ return _elementFactory(doc, c_node)
30
+
31
+ cdef public api _Element makeElement(tag, _Document doc, parser,
32
+ text, tail, attrib, nsmap):
33
+ return _makeElement(tag, NULL, doc, parser, text, tail, attrib, nsmap, None)
34
+
35
+ cdef public api _Element makeSubElement(_Element parent, tag, text, tail,
36
+ attrib, nsmap):
37
+ _assertValidNode(parent)
38
+ return _makeSubElement(parent, tag, text, tail, attrib, nsmap, None)
39
+
40
+ cdef public api void setElementClassLookupFunction(
41
+ _element_class_lookup_function function, state):
42
+ _setElementClassLookupFunction(function, state)
43
+
44
+ cdef public api object lookupDefaultElementClass(state, doc, xmlNode* c_node):
45
+ return _lookupDefaultElementClass(state, doc, c_node)
46
+
47
+ cdef public api object lookupNamespaceElementClass(state, doc, xmlNode* c_node):
48
+ return _find_nselement_class(state, doc, c_node)
49
+
50
+ cdef public api object callLookupFallback(FallbackElementClassLookup lookup,
51
+ _Document doc, xmlNode* c_node):
52
+ return _callLookupFallback(lookup, doc, c_node)
53
+
54
+ cdef public api int tagMatches(xmlNode* c_node, const_xmlChar* c_href, const_xmlChar* c_name):
55
+ if c_node is NULL:
56
+ return -1
57
+ return _tagMatches(c_node, c_href, c_name)
58
+
59
+ cdef public api _Document documentOrRaise(object input):
60
+ return _documentOrRaise(input)
61
+
62
+ cdef public api _Element rootNodeOrRaise(object input):
63
+ return _rootNodeOrRaise(input)
64
+
65
+ cdef public api bint hasText(xmlNode* c_node):
66
+ return _hasText(c_node)
67
+
68
+ cdef public api bint hasTail(xmlNode* c_node):
69
+ return _hasTail(c_node)
70
+
71
+ cdef public api unicode textOf(xmlNode* c_node):
72
+ if c_node is NULL:
73
+ return None
74
+ return _collectText(c_node.children)
75
+
76
+ cdef public api unicode tailOf(xmlNode* c_node):
77
+ if c_node is NULL:
78
+ return None
79
+ return _collectText(c_node.next)
80
+
81
+ cdef public api int setNodeText(xmlNode* c_node, text) except -1:
82
+ if c_node is NULL:
83
+ raise ValueError
84
+ return _setNodeText(c_node, text)
85
+
86
+ cdef public api int setTailText(xmlNode* c_node, text) except -1:
87
+ if c_node is NULL:
88
+ raise ValueError
89
+ return _setTailText(c_node, text)
90
+
91
+ cdef public api unicode attributeValue(xmlNode* c_element, xmlAttr* c_attrib_node):
92
+ return _attributeValue(c_element, c_attrib_node)
93
+
94
+ cdef public api unicode attributeValueFromNsName(xmlNode* c_element,
95
+ const_xmlChar* ns, const_xmlChar* name):
96
+ return _attributeValueFromNsName(c_element, ns, name)
97
+
98
+ cdef public api object getAttributeValue(_Element element, key, default):
99
+ _assertValidNode(element)
100
+ return _getAttributeValue(element, key, default)
101
+
102
+ cdef public api object iterattributes(_Element element, int keysvalues):
103
+ _assertValidNode(element)
104
+ return _attributeIteratorFactory(element, keysvalues)
105
+
106
+ cdef public api list collectAttributes(xmlNode* c_element, int keysvalues):
107
+ return _collectAttributes(c_element, keysvalues)
108
+
109
+ cdef public api int setAttributeValue(_Element element, key, value) except -1:
110
+ _assertValidNode(element)
111
+ return _setAttributeValue(element, key, value)
112
+
113
+ cdef public api int delAttribute(_Element element, key) except -1:
114
+ _assertValidNode(element)
115
+ return _delAttribute(element, key)
116
+
117
+ cdef public api int delAttributeFromNsName(tree.xmlNode* c_element,
118
+ const_xmlChar* c_href, const_xmlChar* c_name):
119
+ return _delAttributeFromNsName(c_element, c_href, c_name)
120
+
121
+ cdef public api bint hasChild(xmlNode* c_node):
122
+ return _hasChild(c_node)
123
+
124
+ cdef public api xmlNode* findChild(xmlNode* c_node, Py_ssize_t index):
125
+ return _findChild(c_node, index)
126
+
127
+ cdef public api xmlNode* findChildForwards(xmlNode* c_node, Py_ssize_t index):
128
+ return _findChildForwards(c_node, index)
129
+
130
+ cdef public api xmlNode* findChildBackwards(xmlNode* c_node, Py_ssize_t index):
131
+ return _findChildBackwards(c_node, index)
132
+
133
+ cdef public api xmlNode* nextElement(xmlNode* c_node):
134
+ return _nextElement(c_node)
135
+
136
+ cdef public api xmlNode* previousElement(xmlNode* c_node):
137
+ return _previousElement(c_node)
138
+
139
+ cdef public api void appendChild(_Element parent, _Element child):
140
+ # deprecated, use appendChildToElement() instead!
141
+ _appendChild(parent, child)
142
+
143
+ cdef public api int appendChildToElement(_Element parent, _Element child) except -1:
144
+ return _appendChild(parent, child)
145
+
146
+ cdef public api unicode pyunicode(const_xmlChar* s):
147
+ if s is NULL:
148
+ raise TypeError
149
+ return funicode(s)
150
+
151
+ cdef public api bytes utf8(object s):
152
+ return _utf8(s)
153
+
154
+ cdef public api tuple getNsTag(object tag):
155
+ return _getNsTag(tag)
156
+
157
+ cdef public api tuple getNsTagWithEmptyNs(object tag):
158
+ return _getNsTagWithEmptyNs(tag)
159
+
160
+ cdef public api unicode namespacedName(xmlNode* c_node):
161
+ return _namespacedName(c_node)
162
+
163
+ cdef public api unicode namespacedNameFromNsName(const_xmlChar* href, const_xmlChar* name):
164
+ return _namespacedNameFromNsName(href, name)
165
+
166
+ cdef public api void iteratorStoreNext(_ElementIterator iterator, _Element node):
167
+ # deprecated!
168
+ iterator._storeNext(node)
169
+
170
+ cdef public api void initTagMatch(_ElementTagMatcher matcher, tag):
171
+ # deprecated!
172
+ matcher._initTagMatch(tag)
173
+
174
+ cdef public api tree.xmlNs* findOrBuildNodeNsPrefix(
175
+ _Document doc, xmlNode* c_node, const_xmlChar* href, const_xmlChar* prefix) except NULL:
176
+ if doc is None:
177
+ raise TypeError
178
+ return doc._findOrBuildNodeNs(c_node, href, prefix, 0)
lxml/pyclasslookup.py CHANGED
@@ -1,3 +1,3 @@
1
- # dummy module for backwards compatibility
2
-
3
- from lxml.etree import PythonElementClassLookup
1
+ # dummy module for backwards compatibility
2
+
3
+ from lxml.etree import PythonElementClassLookup