lxml 5.2.2__cp37-cp37m-manylinux_2_28_aarch64.whl → 5.3.1__cp37-cp37m-manylinux_2_28_aarch64.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.
lxml/lxml.etree_api.h CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated by Cython 3.0.10 */
1
+ /* Generated by Cython 3.0.11 */
2
2
 
3
3
  #ifndef __PYX_HAVE_API__lxml__etree
4
4
  #define __PYX_HAVE_API__lxml__etree
@@ -98,9 +98,9 @@ static void (*__pyx_api_f_4lxml_5etree_initTagMatch)(struct LxmlElementTagMatche
98
98
  #define initTagMatch __pyx_api_f_4lxml_5etree_initTagMatch
99
99
  static xmlNs *(*__pyx_api_f_4lxml_5etree_findOrBuildNodeNsPrefix)(struct LxmlDocument *, xmlNode *, const xmlChar *, const xmlChar *) = 0;
100
100
  #define findOrBuildNodeNsPrefix __pyx_api_f_4lxml_5etree_findOrBuildNodeNsPrefix
101
- #ifndef __PYX_HAVE_RT_ImportFunction_3_0_10
102
- #define __PYX_HAVE_RT_ImportFunction_3_0_10
103
- static int __Pyx_ImportFunction_3_0_10(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
101
+ #ifndef __PYX_HAVE_RT_ImportFunction_3_0_11
102
+ #define __PYX_HAVE_RT_ImportFunction_3_0_11
103
+ static int __Pyx_ImportFunction_3_0_11(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
104
104
  PyObject *d = 0;
105
105
  PyObject *cobj = 0;
106
106
  union {
@@ -140,51 +140,51 @@ static int import_lxml__etree(void) {
140
140
  PyObject *module = 0;
141
141
  module = PyImport_ImportModule("lxml.etree");
142
142
  if (!module) goto bad;
143
- if (__Pyx_ImportFunction_3_0_10(module, "deepcopyNodeToDocument", (void (**)(void))&__pyx_api_f_4lxml_5etree_deepcopyNodeToDocument, "struct LxmlElement *(struct LxmlDocument *, xmlNode *)") < 0) goto bad;
144
- if (__Pyx_ImportFunction_3_0_10(module, "elementTreeFactory", (void (**)(void))&__pyx_api_f_4lxml_5etree_elementTreeFactory, "struct LxmlElementTree *(struct LxmlElement *)") < 0) goto bad;
145
- if (__Pyx_ImportFunction_3_0_10(module, "newElementTree", (void (**)(void))&__pyx_api_f_4lxml_5etree_newElementTree, "struct LxmlElementTree *(struct LxmlElement *, PyObject *)") < 0) goto bad;
146
- if (__Pyx_ImportFunction_3_0_10(module, "adoptExternalDocument", (void (**)(void))&__pyx_api_f_4lxml_5etree_adoptExternalDocument, "struct LxmlElementTree *(xmlDoc *, PyObject *, int)") < 0) goto bad;
147
- if (__Pyx_ImportFunction_3_0_10(module, "elementFactory", (void (**)(void))&__pyx_api_f_4lxml_5etree_elementFactory, "struct LxmlElement *(struct LxmlDocument *, xmlNode *)") < 0) goto bad;
148
- if (__Pyx_ImportFunction_3_0_10(module, "makeElement", (void (**)(void))&__pyx_api_f_4lxml_5etree_makeElement, "struct LxmlElement *(PyObject *, struct LxmlDocument *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *)") < 0) goto bad;
149
- if (__Pyx_ImportFunction_3_0_10(module, "makeSubElement", (void (**)(void))&__pyx_api_f_4lxml_5etree_makeSubElement, "struct LxmlElement *(struct LxmlElement *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *)") < 0) goto bad;
150
- if (__Pyx_ImportFunction_3_0_10(module, "setElementClassLookupFunction", (void (**)(void))&__pyx_api_f_4lxml_5etree_setElementClassLookupFunction, "void (_element_class_lookup_function, PyObject *)") < 0) goto bad;
151
- if (__Pyx_ImportFunction_3_0_10(module, "lookupDefaultElementClass", (void (**)(void))&__pyx_api_f_4lxml_5etree_lookupDefaultElementClass, "PyObject *(PyObject *, PyObject *, xmlNode *)") < 0) goto bad;
152
- if (__Pyx_ImportFunction_3_0_10(module, "lookupNamespaceElementClass", (void (**)(void))&__pyx_api_f_4lxml_5etree_lookupNamespaceElementClass, "PyObject *(PyObject *, PyObject *, xmlNode *)") < 0) goto bad;
153
- if (__Pyx_ImportFunction_3_0_10(module, "callLookupFallback", (void (**)(void))&__pyx_api_f_4lxml_5etree_callLookupFallback, "PyObject *(struct LxmlFallbackElementClassLookup *, struct LxmlDocument *, xmlNode *)") < 0) goto bad;
154
- if (__Pyx_ImportFunction_3_0_10(module, "tagMatches", (void (**)(void))&__pyx_api_f_4lxml_5etree_tagMatches, "int (xmlNode *, const xmlChar *, const xmlChar *)") < 0) goto bad;
155
- if (__Pyx_ImportFunction_3_0_10(module, "documentOrRaise", (void (**)(void))&__pyx_api_f_4lxml_5etree_documentOrRaise, "struct LxmlDocument *(PyObject *)") < 0) goto bad;
156
- if (__Pyx_ImportFunction_3_0_10(module, "rootNodeOrRaise", (void (**)(void))&__pyx_api_f_4lxml_5etree_rootNodeOrRaise, "struct LxmlElement *(PyObject *)") < 0) goto bad;
157
- if (__Pyx_ImportFunction_3_0_10(module, "hasText", (void (**)(void))&__pyx_api_f_4lxml_5etree_hasText, "int (xmlNode *)") < 0) goto bad;
158
- if (__Pyx_ImportFunction_3_0_10(module, "hasTail", (void (**)(void))&__pyx_api_f_4lxml_5etree_hasTail, "int (xmlNode *)") < 0) goto bad;
159
- if (__Pyx_ImportFunction_3_0_10(module, "textOf", (void (**)(void))&__pyx_api_f_4lxml_5etree_textOf, "PyObject *(xmlNode *)") < 0) goto bad;
160
- if (__Pyx_ImportFunction_3_0_10(module, "tailOf", (void (**)(void))&__pyx_api_f_4lxml_5etree_tailOf, "PyObject *(xmlNode *)") < 0) goto bad;
161
- if (__Pyx_ImportFunction_3_0_10(module, "setNodeText", (void (**)(void))&__pyx_api_f_4lxml_5etree_setNodeText, "int (xmlNode *, PyObject *)") < 0) goto bad;
162
- if (__Pyx_ImportFunction_3_0_10(module, "setTailText", (void (**)(void))&__pyx_api_f_4lxml_5etree_setTailText, "int (xmlNode *, PyObject *)") < 0) goto bad;
163
- if (__Pyx_ImportFunction_3_0_10(module, "attributeValue", (void (**)(void))&__pyx_api_f_4lxml_5etree_attributeValue, "PyObject *(xmlNode *, xmlAttr *)") < 0) goto bad;
164
- if (__Pyx_ImportFunction_3_0_10(module, "attributeValueFromNsName", (void (**)(void))&__pyx_api_f_4lxml_5etree_attributeValueFromNsName, "PyObject *(xmlNode *, const xmlChar *, const xmlChar *)") < 0) goto bad;
165
- if (__Pyx_ImportFunction_3_0_10(module, "getAttributeValue", (void (**)(void))&__pyx_api_f_4lxml_5etree_getAttributeValue, "PyObject *(struct LxmlElement *, PyObject *, PyObject *)") < 0) goto bad;
166
- if (__Pyx_ImportFunction_3_0_10(module, "iterattributes", (void (**)(void))&__pyx_api_f_4lxml_5etree_iterattributes, "PyObject *(struct LxmlElement *, int)") < 0) goto bad;
167
- if (__Pyx_ImportFunction_3_0_10(module, "collectAttributes", (void (**)(void))&__pyx_api_f_4lxml_5etree_collectAttributes, "PyObject *(xmlNode *, int)") < 0) goto bad;
168
- if (__Pyx_ImportFunction_3_0_10(module, "setAttributeValue", (void (**)(void))&__pyx_api_f_4lxml_5etree_setAttributeValue, "int (struct LxmlElement *, PyObject *, PyObject *)") < 0) goto bad;
169
- if (__Pyx_ImportFunction_3_0_10(module, "delAttribute", (void (**)(void))&__pyx_api_f_4lxml_5etree_delAttribute, "int (struct LxmlElement *, PyObject *)") < 0) goto bad;
170
- if (__Pyx_ImportFunction_3_0_10(module, "delAttributeFromNsName", (void (**)(void))&__pyx_api_f_4lxml_5etree_delAttributeFromNsName, "int (xmlNode *, const xmlChar *, const xmlChar *)") < 0) goto bad;
171
- if (__Pyx_ImportFunction_3_0_10(module, "hasChild", (void (**)(void))&__pyx_api_f_4lxml_5etree_hasChild, "int (xmlNode *)") < 0) goto bad;
172
- if (__Pyx_ImportFunction_3_0_10(module, "findChild", (void (**)(void))&__pyx_api_f_4lxml_5etree_findChild, "xmlNode *(xmlNode *, Py_ssize_t)") < 0) goto bad;
173
- if (__Pyx_ImportFunction_3_0_10(module, "findChildForwards", (void (**)(void))&__pyx_api_f_4lxml_5etree_findChildForwards, "xmlNode *(xmlNode *, Py_ssize_t)") < 0) goto bad;
174
- if (__Pyx_ImportFunction_3_0_10(module, "findChildBackwards", (void (**)(void))&__pyx_api_f_4lxml_5etree_findChildBackwards, "xmlNode *(xmlNode *, Py_ssize_t)") < 0) goto bad;
175
- if (__Pyx_ImportFunction_3_0_10(module, "nextElement", (void (**)(void))&__pyx_api_f_4lxml_5etree_nextElement, "xmlNode *(xmlNode *)") < 0) goto bad;
176
- if (__Pyx_ImportFunction_3_0_10(module, "previousElement", (void (**)(void))&__pyx_api_f_4lxml_5etree_previousElement, "xmlNode *(xmlNode *)") < 0) goto bad;
177
- if (__Pyx_ImportFunction_3_0_10(module, "appendChild", (void (**)(void))&__pyx_api_f_4lxml_5etree_appendChild, "void (struct LxmlElement *, struct LxmlElement *)") < 0) goto bad;
178
- if (__Pyx_ImportFunction_3_0_10(module, "appendChildToElement", (void (**)(void))&__pyx_api_f_4lxml_5etree_appendChildToElement, "int (struct LxmlElement *, struct LxmlElement *)") < 0) goto bad;
179
- if (__Pyx_ImportFunction_3_0_10(module, "pyunicode", (void (**)(void))&__pyx_api_f_4lxml_5etree_pyunicode, "PyObject *(const xmlChar *)") < 0) goto bad;
180
- if (__Pyx_ImportFunction_3_0_10(module, "utf8", (void (**)(void))&__pyx_api_f_4lxml_5etree_utf8, "PyObject *(PyObject *)") < 0) goto bad;
181
- if (__Pyx_ImportFunction_3_0_10(module, "getNsTag", (void (**)(void))&__pyx_api_f_4lxml_5etree_getNsTag, "PyObject *(PyObject *)") < 0) goto bad;
182
- if (__Pyx_ImportFunction_3_0_10(module, "getNsTagWithEmptyNs", (void (**)(void))&__pyx_api_f_4lxml_5etree_getNsTagWithEmptyNs, "PyObject *(PyObject *)") < 0) goto bad;
183
- if (__Pyx_ImportFunction_3_0_10(module, "namespacedName", (void (**)(void))&__pyx_api_f_4lxml_5etree_namespacedName, "PyObject *(xmlNode *)") < 0) goto bad;
184
- if (__Pyx_ImportFunction_3_0_10(module, "namespacedNameFromNsName", (void (**)(void))&__pyx_api_f_4lxml_5etree_namespacedNameFromNsName, "PyObject *(const xmlChar *, const xmlChar *)") < 0) goto bad;
185
- if (__Pyx_ImportFunction_3_0_10(module, "iteratorStoreNext", (void (**)(void))&__pyx_api_f_4lxml_5etree_iteratorStoreNext, "void (struct LxmlElementIterator *, struct LxmlElement *)") < 0) goto bad;
186
- if (__Pyx_ImportFunction_3_0_10(module, "initTagMatch", (void (**)(void))&__pyx_api_f_4lxml_5etree_initTagMatch, "void (struct LxmlElementTagMatcher *, PyObject *)") < 0) goto bad;
187
- if (__Pyx_ImportFunction_3_0_10(module, "findOrBuildNodeNsPrefix", (void (**)(void))&__pyx_api_f_4lxml_5etree_findOrBuildNodeNsPrefix, "xmlNs *(struct LxmlDocument *, xmlNode *, const xmlChar *, const xmlChar *)") < 0) goto bad;
143
+ if (__Pyx_ImportFunction_3_0_11(module, "deepcopyNodeToDocument", (void (**)(void))&__pyx_api_f_4lxml_5etree_deepcopyNodeToDocument, "struct LxmlElement *(struct LxmlDocument *, xmlNode *)") < 0) goto bad;
144
+ if (__Pyx_ImportFunction_3_0_11(module, "elementTreeFactory", (void (**)(void))&__pyx_api_f_4lxml_5etree_elementTreeFactory, "struct LxmlElementTree *(struct LxmlElement *)") < 0) goto bad;
145
+ if (__Pyx_ImportFunction_3_0_11(module, "newElementTree", (void (**)(void))&__pyx_api_f_4lxml_5etree_newElementTree, "struct LxmlElementTree *(struct LxmlElement *, PyObject *)") < 0) goto bad;
146
+ if (__Pyx_ImportFunction_3_0_11(module, "adoptExternalDocument", (void (**)(void))&__pyx_api_f_4lxml_5etree_adoptExternalDocument, "struct LxmlElementTree *(xmlDoc *, PyObject *, int)") < 0) goto bad;
147
+ if (__Pyx_ImportFunction_3_0_11(module, "elementFactory", (void (**)(void))&__pyx_api_f_4lxml_5etree_elementFactory, "struct LxmlElement *(struct LxmlDocument *, xmlNode *)") < 0) goto bad;
148
+ if (__Pyx_ImportFunction_3_0_11(module, "makeElement", (void (**)(void))&__pyx_api_f_4lxml_5etree_makeElement, "struct LxmlElement *(PyObject *, struct LxmlDocument *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *)") < 0) goto bad;
149
+ if (__Pyx_ImportFunction_3_0_11(module, "makeSubElement", (void (**)(void))&__pyx_api_f_4lxml_5etree_makeSubElement, "struct LxmlElement *(struct LxmlElement *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *)") < 0) goto bad;
150
+ if (__Pyx_ImportFunction_3_0_11(module, "setElementClassLookupFunction", (void (**)(void))&__pyx_api_f_4lxml_5etree_setElementClassLookupFunction, "void (_element_class_lookup_function, PyObject *)") < 0) goto bad;
151
+ if (__Pyx_ImportFunction_3_0_11(module, "lookupDefaultElementClass", (void (**)(void))&__pyx_api_f_4lxml_5etree_lookupDefaultElementClass, "PyObject *(PyObject *, PyObject *, xmlNode *)") < 0) goto bad;
152
+ if (__Pyx_ImportFunction_3_0_11(module, "lookupNamespaceElementClass", (void (**)(void))&__pyx_api_f_4lxml_5etree_lookupNamespaceElementClass, "PyObject *(PyObject *, PyObject *, xmlNode *)") < 0) goto bad;
153
+ if (__Pyx_ImportFunction_3_0_11(module, "callLookupFallback", (void (**)(void))&__pyx_api_f_4lxml_5etree_callLookupFallback, "PyObject *(struct LxmlFallbackElementClassLookup *, struct LxmlDocument *, xmlNode *)") < 0) goto bad;
154
+ if (__Pyx_ImportFunction_3_0_11(module, "tagMatches", (void (**)(void))&__pyx_api_f_4lxml_5etree_tagMatches, "int (xmlNode *, const xmlChar *, const xmlChar *)") < 0) goto bad;
155
+ if (__Pyx_ImportFunction_3_0_11(module, "documentOrRaise", (void (**)(void))&__pyx_api_f_4lxml_5etree_documentOrRaise, "struct LxmlDocument *(PyObject *)") < 0) goto bad;
156
+ if (__Pyx_ImportFunction_3_0_11(module, "rootNodeOrRaise", (void (**)(void))&__pyx_api_f_4lxml_5etree_rootNodeOrRaise, "struct LxmlElement *(PyObject *)") < 0) goto bad;
157
+ if (__Pyx_ImportFunction_3_0_11(module, "hasText", (void (**)(void))&__pyx_api_f_4lxml_5etree_hasText, "int (xmlNode *)") < 0) goto bad;
158
+ if (__Pyx_ImportFunction_3_0_11(module, "hasTail", (void (**)(void))&__pyx_api_f_4lxml_5etree_hasTail, "int (xmlNode *)") < 0) goto bad;
159
+ if (__Pyx_ImportFunction_3_0_11(module, "textOf", (void (**)(void))&__pyx_api_f_4lxml_5etree_textOf, "PyObject *(xmlNode *)") < 0) goto bad;
160
+ if (__Pyx_ImportFunction_3_0_11(module, "tailOf", (void (**)(void))&__pyx_api_f_4lxml_5etree_tailOf, "PyObject *(xmlNode *)") < 0) goto bad;
161
+ if (__Pyx_ImportFunction_3_0_11(module, "setNodeText", (void (**)(void))&__pyx_api_f_4lxml_5etree_setNodeText, "int (xmlNode *, PyObject *)") < 0) goto bad;
162
+ if (__Pyx_ImportFunction_3_0_11(module, "setTailText", (void (**)(void))&__pyx_api_f_4lxml_5etree_setTailText, "int (xmlNode *, PyObject *)") < 0) goto bad;
163
+ if (__Pyx_ImportFunction_3_0_11(module, "attributeValue", (void (**)(void))&__pyx_api_f_4lxml_5etree_attributeValue, "PyObject *(xmlNode *, xmlAttr *)") < 0) goto bad;
164
+ if (__Pyx_ImportFunction_3_0_11(module, "attributeValueFromNsName", (void (**)(void))&__pyx_api_f_4lxml_5etree_attributeValueFromNsName, "PyObject *(xmlNode *, const xmlChar *, const xmlChar *)") < 0) goto bad;
165
+ if (__Pyx_ImportFunction_3_0_11(module, "getAttributeValue", (void (**)(void))&__pyx_api_f_4lxml_5etree_getAttributeValue, "PyObject *(struct LxmlElement *, PyObject *, PyObject *)") < 0) goto bad;
166
+ if (__Pyx_ImportFunction_3_0_11(module, "iterattributes", (void (**)(void))&__pyx_api_f_4lxml_5etree_iterattributes, "PyObject *(struct LxmlElement *, int)") < 0) goto bad;
167
+ if (__Pyx_ImportFunction_3_0_11(module, "collectAttributes", (void (**)(void))&__pyx_api_f_4lxml_5etree_collectAttributes, "PyObject *(xmlNode *, int)") < 0) goto bad;
168
+ if (__Pyx_ImportFunction_3_0_11(module, "setAttributeValue", (void (**)(void))&__pyx_api_f_4lxml_5etree_setAttributeValue, "int (struct LxmlElement *, PyObject *, PyObject *)") < 0) goto bad;
169
+ if (__Pyx_ImportFunction_3_0_11(module, "delAttribute", (void (**)(void))&__pyx_api_f_4lxml_5etree_delAttribute, "int (struct LxmlElement *, PyObject *)") < 0) goto bad;
170
+ if (__Pyx_ImportFunction_3_0_11(module, "delAttributeFromNsName", (void (**)(void))&__pyx_api_f_4lxml_5etree_delAttributeFromNsName, "int (xmlNode *, const xmlChar *, const xmlChar *)") < 0) goto bad;
171
+ if (__Pyx_ImportFunction_3_0_11(module, "hasChild", (void (**)(void))&__pyx_api_f_4lxml_5etree_hasChild, "int (xmlNode *)") < 0) goto bad;
172
+ if (__Pyx_ImportFunction_3_0_11(module, "findChild", (void (**)(void))&__pyx_api_f_4lxml_5etree_findChild, "xmlNode *(xmlNode *, Py_ssize_t)") < 0) goto bad;
173
+ if (__Pyx_ImportFunction_3_0_11(module, "findChildForwards", (void (**)(void))&__pyx_api_f_4lxml_5etree_findChildForwards, "xmlNode *(xmlNode *, Py_ssize_t)") < 0) goto bad;
174
+ if (__Pyx_ImportFunction_3_0_11(module, "findChildBackwards", (void (**)(void))&__pyx_api_f_4lxml_5etree_findChildBackwards, "xmlNode *(xmlNode *, Py_ssize_t)") < 0) goto bad;
175
+ if (__Pyx_ImportFunction_3_0_11(module, "nextElement", (void (**)(void))&__pyx_api_f_4lxml_5etree_nextElement, "xmlNode *(xmlNode *)") < 0) goto bad;
176
+ if (__Pyx_ImportFunction_3_0_11(module, "previousElement", (void (**)(void))&__pyx_api_f_4lxml_5etree_previousElement, "xmlNode *(xmlNode *)") < 0) goto bad;
177
+ if (__Pyx_ImportFunction_3_0_11(module, "appendChild", (void (**)(void))&__pyx_api_f_4lxml_5etree_appendChild, "void (struct LxmlElement *, struct LxmlElement *)") < 0) goto bad;
178
+ if (__Pyx_ImportFunction_3_0_11(module, "appendChildToElement", (void (**)(void))&__pyx_api_f_4lxml_5etree_appendChildToElement, "int (struct LxmlElement *, struct LxmlElement *)") < 0) goto bad;
179
+ if (__Pyx_ImportFunction_3_0_11(module, "pyunicode", (void (**)(void))&__pyx_api_f_4lxml_5etree_pyunicode, "PyObject *(const xmlChar *)") < 0) goto bad;
180
+ if (__Pyx_ImportFunction_3_0_11(module, "utf8", (void (**)(void))&__pyx_api_f_4lxml_5etree_utf8, "PyObject *(PyObject *)") < 0) goto bad;
181
+ if (__Pyx_ImportFunction_3_0_11(module, "getNsTag", (void (**)(void))&__pyx_api_f_4lxml_5etree_getNsTag, "PyObject *(PyObject *)") < 0) goto bad;
182
+ if (__Pyx_ImportFunction_3_0_11(module, "getNsTagWithEmptyNs", (void (**)(void))&__pyx_api_f_4lxml_5etree_getNsTagWithEmptyNs, "PyObject *(PyObject *)") < 0) goto bad;
183
+ if (__Pyx_ImportFunction_3_0_11(module, "namespacedName", (void (**)(void))&__pyx_api_f_4lxml_5etree_namespacedName, "PyObject *(xmlNode *)") < 0) goto bad;
184
+ if (__Pyx_ImportFunction_3_0_11(module, "namespacedNameFromNsName", (void (**)(void))&__pyx_api_f_4lxml_5etree_namespacedNameFromNsName, "PyObject *(const xmlChar *, const xmlChar *)") < 0) goto bad;
185
+ if (__Pyx_ImportFunction_3_0_11(module, "iteratorStoreNext", (void (**)(void))&__pyx_api_f_4lxml_5etree_iteratorStoreNext, "void (struct LxmlElementIterator *, struct LxmlElement *)") < 0) goto bad;
186
+ if (__Pyx_ImportFunction_3_0_11(module, "initTagMatch", (void (**)(void))&__pyx_api_f_4lxml_5etree_initTagMatch, "void (struct LxmlElementTagMatcher *, PyObject *)") < 0) goto bad;
187
+ if (__Pyx_ImportFunction_3_0_11(module, "findOrBuildNodeNsPrefix", (void (**)(void))&__pyx_api_f_4lxml_5etree_findOrBuildNodeNsPrefix, "xmlNs *(struct LxmlDocument *, xmlNode *, const xmlChar *, const xmlChar *)") < 0) goto bad;
188
188
  Py_DECREF(module); module = 0;
189
189
  return 0;
190
190
  bad:
lxml/parser.pxi CHANGED
@@ -1747,9 +1747,11 @@ _HTML_DEFAULT_PARSE_OPTIONS = (
1747
1747
  htmlparser.HTML_PARSE_COMPACT
1748
1748
  )
1749
1749
 
1750
+ cdef object _UNUSED = object()
1751
+
1750
1752
  cdef class HTMLParser(_FeedParser):
1751
1753
  """HTMLParser(self, encoding=None, remove_blank_text=False, \
1752
- remove_comments=False, remove_pis=False, strip_cdata=True, \
1754
+ remove_comments=False, remove_pis=False, \
1753
1755
  no_network=True, target=None, schema: XMLSchema =None, \
1754
1756
  recover=True, compact=True, collect_ids=True, huge_tree=False)
1755
1757
 
@@ -1767,7 +1769,6 @@ cdef class HTMLParser(_FeedParser):
1767
1769
  - remove_blank_text - discard empty text nodes that are ignorable (i.e. not actual text content)
1768
1770
  - remove_comments - discard comments
1769
1771
  - remove_pis - discard processing instructions
1770
- - strip_cdata - replace CDATA sections by normal text content (default: True)
1771
1772
  - compact - save memory for short text content (default: True)
1772
1773
  - default_doctype - add a default doctype even if it is not found in the HTML (default: True)
1773
1774
  - collect_ids - use a hash table of XML IDs for fast access (default: True)
@@ -1784,7 +1785,7 @@ cdef class HTMLParser(_FeedParser):
1784
1785
  reasons.
1785
1786
  """
1786
1787
  def __init__(self, *, encoding=None, remove_blank_text=False,
1787
- remove_comments=False, remove_pis=False, strip_cdata=True,
1788
+ remove_comments=False, remove_pis=False, strip_cdata=_UNUSED,
1788
1789
  no_network=True, target=None, XMLSchema schema=None,
1789
1790
  recover=True, compact=True, default_doctype=True,
1790
1791
  collect_ids=True, huge_tree=False):
@@ -1803,6 +1804,11 @@ cdef class HTMLParser(_FeedParser):
1803
1804
  if huge_tree:
1804
1805
  parse_options = parse_options | xmlparser.XML_PARSE_HUGE
1805
1806
 
1807
+ if strip_cdata is not _UNUSED:
1808
+ import warnings
1809
+ warnings.warn(
1810
+ "The 'strip_cdata' option of HTMLParser() has never done anything and will eventually be removed.",
1811
+ DeprecationWarning)
1806
1812
  _BaseParser.__init__(self, parse_options, True, schema,
1807
1813
  remove_comments, remove_pis, strip_cdata,
1808
1814
  collect_ids, target, encoding)
Binary file
lxml/serializer.pxi CHANGED
@@ -403,53 +403,10 @@ cdef void _writeNextSiblings(tree.xmlOutputBuffer* c_buffer, xmlNode* c_node,
403
403
  c_sibling = c_sibling.next
404
404
 
405
405
 
406
- # copied and adapted from libxml2
407
- cdef unsigned char *xmlSerializeHexCharRef(unsigned char *out, int val) noexcept:
408
- cdef xmlChar *ptr
409
- cdef const xmlChar* hexdigits = b"0123456789ABCDEF"
410
-
411
- out[0] = b'&'
412
- out += 1
413
- out[0] = b'#'
414
- out += 1
415
- out[0] = b'x'
416
- out += 1
417
-
418
- if val < 0x10:
419
- ptr = out
420
- elif val < 0x100:
421
- ptr = out + 1
422
- elif val < 0x1000:
423
- ptr = out + 2
424
- elif val < 0x10000:
425
- ptr = out + 3
426
- elif val < 0x100000:
427
- ptr = out + 4
428
- else:
429
- ptr = out + 5
430
-
431
- out = ptr + 1
432
- while val > 0:
433
- ptr[0] = hexdigits[val & 0xF]
434
- ptr -= 1
435
- val >>= 4
436
-
437
- out[0] = b';'
438
- out += 1
439
- out[0] = 0
440
-
441
- return out
442
-
443
-
444
406
  # copied and adapted from libxml2 (xmlBufAttrSerializeTxtContent())
445
407
  cdef _write_attr_string(tree.xmlOutputBuffer* buf, const char *string):
446
408
  cdef const char *base
447
409
  cdef const char *cur
448
- cdef const unsigned char *ucur
449
-
450
- cdef unsigned char tmp[12]
451
- cdef int val = 0
452
- cdef int l
453
410
 
454
411
  if string == NULL:
455
412
  return
@@ -511,57 +468,8 @@ cdef _write_attr_string(tree.xmlOutputBuffer* buf, const char *string):
511
468
  cur += 1
512
469
  base = cur
513
470
 
514
- elif (<const unsigned char>cur[0] >= 0x80) and (cur[1] != 0):
515
-
516
- if base != cur:
517
- tree.xmlOutputBufferWrite(buf, cur - base, base)
518
-
519
- ucur = <const unsigned char *>cur
520
-
521
- if ucur[0] < 0xC0:
522
- # invalid UTF-8 sequence
523
- val = ucur[0]
524
- l = 1
525
-
526
- elif ucur[0] < 0xE0:
527
- val = (ucur[0]) & 0x1F
528
- val <<= 6
529
- val |= (ucur[1]) & 0x3F
530
- l = 2
531
-
532
- elif (ucur[0] < 0xF0) and (ucur[2] != 0):
533
- val = (ucur[0]) & 0x0F
534
- val <<= 6
535
- val |= (ucur[1]) & 0x3F
536
- val <<= 6
537
- val |= (ucur[2]) & 0x3F
538
- l = 3
539
-
540
- elif (ucur[0] < 0xF8) and (ucur[2] != 0) and (ucur[3] != 0):
541
- val = (ucur[0]) & 0x07
542
- val <<= 6
543
- val |= (ucur[1]) & 0x3F
544
- val <<= 6
545
- val |= (ucur[2]) & 0x3F
546
- val <<= 6
547
- val |= (ucur[3]) & 0x3F
548
- l = 4
549
- else:
550
- # invalid UTF-8 sequence
551
- val = ucur[0]
552
- l = 1
553
-
554
- if (l == 1) or (not tree.xmlIsCharQ(val)):
555
- raise ValueError(f"Invalid character: {val:X}")
556
-
557
- # We could do multiple things here. Just save
558
- # as a char ref
559
- xmlSerializeHexCharRef(tmp, val)
560
- tree.xmlOutputBufferWrite(buf, len(tmp), <const char*> tmp)
561
- cur += l
562
- base = cur
563
-
564
471
  else:
472
+ # Leave further encoding and escaping to the buffer encoder.
565
473
  cur += 1
566
474
 
567
475
  if base != cur:
@@ -1412,9 +1320,11 @@ cdef class _IncrementalFileWriter:
1412
1320
  self._status = WRITER_STARTING
1413
1321
  self._element_stack = []
1414
1322
  if encoding is None:
1323
+ # We always need a document encoding to make the attribute serialisation
1324
+ # of libxml2 identical to ours.
1415
1325
  encoding = b'ASCII'
1416
1326
  self._encoding = encoding
1417
- self._c_encoding = _cstr(encoding) if encoding is not None else NULL
1327
+ self._c_encoding = _cstr(encoding)
1418
1328
  self._buffered = buffered
1419
1329
  self._target = _create_output_buffer(
1420
1330
  outfile, self._c_encoding, compresslevel, &self._c_out, close)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lxml
3
- Version: 5.2.2
3
+ Version: 5.3.1
4
4
  Summary: Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API.
5
5
  Home-page: https://lxml.de/
6
6
  Author: lxml dev team
@@ -39,7 +39,7 @@ Requires-Dist: lxml-html-clean ; extra == 'html_clean'
39
39
  Provides-Extra: htmlsoup
40
40
  Requires-Dist: BeautifulSoup4 ; extra == 'htmlsoup'
41
41
  Provides-Extra: source
42
- Requires-Dist: Cython >=3.0.10 ; extra == 'source'
42
+ Requires-Dist: Cython <3.1.0,>=3.0.11 ; extra == 'source'
43
43
 
44
44
  lxml is a Pythonic, mature binding for the libxml2 and libxslt libraries. It
45
45
  provides safe and convenient access to these libraries using the ElementTree
@@ -64,25 +64,29 @@ an appropriate version of Cython installed.
64
64
 
65
65
  After an official release of a new stable series, bug fixes may become
66
66
  available at
67
- https://github.com/lxml/lxml/tree/lxml-5.2 .
68
- Running ``easy_install lxml==5.2bugfix`` will install
67
+ https://github.com/lxml/lxml/tree/lxml-5.3 .
68
+ Running ``easy_install lxml==5.3bugfix`` will install
69
69
  the unreleased branch state from
70
- https://github.com/lxml/lxml/tarball/lxml-5.2#egg=lxml-5.2bugfix
70
+ https://github.com/lxml/lxml/tarball/lxml-5.3#egg=lxml-5.3bugfix
71
71
  as soon as a maintenance branch has been established. Note that this
72
72
  requires Cython to be installed at an appropriate version for the build.
73
73
 
74
- 5.2.2 (2024-05-12)
74
+ 5.3.1 (2025-02-09)
75
75
  ==================
76
76
 
77
77
  Bugs fixed
78
78
  ----------
79
79
 
80
- * GH#417: The ``test_feed_parser`` test could fail if ``lxml_html_clean`` was not installed.
81
- It is now skipped in that case.
80
+ * GH#440: Some tests were adapted for libxml2 2.14.0.
81
+ Patch by Nick Wellnhofer.
82
82
 
83
- * LP#2059910: The minimum CPU architecture for the Linux x86 binary wheels was set back to
84
- "core2", without SSE 4.2.
83
+ * LP#2097175: ``DTD(external_id="…")`` erroneously required a byte string as ID value.
85
84
 
86
- * If libxml2 uses iconv, the compile time version is available as `etree.ICONV_COMPILED_VERSION`.
85
+ * GH#450: ``iterparse()`` internally triggered the `DeprecationWarning`` added in lxml 5.3.0 when parsing HTML.
86
+
87
+ Other changes
88
+ -------------
89
+
90
+ * GH#442: Binary wheels for macOS no longer use the linker flag ``-flat_namespace``.
87
91
 
88
92