lxml 5.2.2__cp312-cp312-musllinux_1_2_s390x.whl → 5.3.1__cp312-cp312-musllinux_1_2_s390x.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/__init__.py CHANGED
@@ -1,6 +1,6 @@
1
1
  # this is a package
2
2
 
3
- __version__ = "5.2.2"
3
+ __version__ = "5.3.1"
4
4
 
5
5
 
6
6
  def get_include():
lxml/dtd.pxi CHANGED
@@ -293,9 +293,10 @@ cdef class DTD(_Validator):
293
293
  else:
294
294
  raise DTDParseError, "file must be a filename, file-like or path-like object"
295
295
  elif external_id is not None:
296
+ external_id_utf = _utf8(external_id)
296
297
  with self._error_log:
297
298
  orig_loader = _register_document_loader()
298
- self._c_dtd = xmlparser.xmlParseDTD(<const_xmlChar*>external_id, NULL)
299
+ self._c_dtd = xmlparser.xmlParseDTD(<const_xmlChar*>external_id_utf, NULL)
299
300
  _reset_document_loader(orig_loader)
300
301
  else:
301
302
  raise DTDParseError, "either filename or external ID required"
Binary file
lxml/etree.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__lxml__etree
4
4
  #define __PYX_HAVE__lxml__etree
@@ -13,7 +13,7 @@ struct LxmlElementBase;
13
13
  struct LxmlElementClassLookup;
14
14
  struct LxmlFallbackElementClassLookup;
15
15
 
16
- /* "lxml/etree.pyx":353
16
+ /* "lxml/etree.pyx":355
17
17
  *
18
18
  * # type of a function that steps from node to node
19
19
  * ctypedef public xmlNode* (*_node_to_node_function)(xmlNode*) # <<<<<<<<<<<<<<
@@ -22,7 +22,7 @@ struct LxmlFallbackElementClassLookup;
22
22
  */
23
23
  typedef xmlNode *(*_node_to_node_function)(xmlNode *);
24
24
 
25
- /* "lxml/etree.pyx":369
25
+ /* "lxml/etree.pyx":371
26
26
  * @cython.final
27
27
  * @cython.freelist(8)
28
28
  * cdef public class _Document [ type LxmlDocumentType, object LxmlDocument ]: # <<<<<<<<<<<<<<
@@ -38,7 +38,7 @@ struct LxmlDocument {
38
38
  struct __pyx_obj_4lxml_5etree__BaseParser *_parser;
39
39
  };
40
40
 
41
- /* "lxml/etree.pyx":718
41
+ /* "lxml/etree.pyx":720
42
42
  *
43
43
  * @cython.no_gc_clear
44
44
  * cdef public class _Element [ type LxmlElementType, object LxmlElement ]: # <<<<<<<<<<<<<<
@@ -52,7 +52,7 @@ struct LxmlElement {
52
52
  PyObject *_tag;
53
53
  };
54
54
 
55
- /* "lxml/etree.pyx":1892
55
+ /* "lxml/etree.pyx":1895
56
56
  *
57
57
  *
58
58
  * cdef public class _ElementTree [ type LxmlElementTreeType, # <<<<<<<<<<<<<<
@@ -66,7 +66,7 @@ struct LxmlElementTree {
66
66
  struct LxmlElement *_context_node;
67
67
  };
68
68
 
69
- /* "lxml/etree.pyx":2666
69
+ /* "lxml/etree.pyx":2669
70
70
  *
71
71
  *
72
72
  * cdef public class _ElementTagMatcher [ object LxmlElementTagMatcher, # <<<<<<<<<<<<<<
@@ -82,7 +82,7 @@ struct LxmlElementTagMatcher {
82
82
  char *_name;
83
83
  };
84
84
 
85
- /* "lxml/etree.pyx":2697
85
+ /* "lxml/etree.pyx":2700
86
86
  * self._name = NULL
87
87
  *
88
88
  * cdef public class _ElementIterator(_ElementTagMatcher) [ # <<<<<<<<<<<<<<
lxml/etree.pyx CHANGED
@@ -16,9 +16,11 @@ __all__ = [
16
16
  'ElementBase', 'ElementClassLookup', 'ElementDefaultClassLookup',
17
17
  'ElementNamespaceClassLookup', 'ElementTree', 'Entity', 'EntityBase',
18
18
  'Error', 'ErrorDomains', 'ErrorLevels', 'ErrorTypes', 'Extension',
19
- 'FallbackElementClassLookup', 'FunctionNamespace', 'HTML',
20
- 'HTMLParser', 'LIBXML_COMPILED_VERSION', 'LIBXML_VERSION',
21
- 'LIBXSLT_COMPILED_VERSION', 'LIBXSLT_VERSION', 'LXML_VERSION',
19
+ 'FallbackElementClassLookup', 'FunctionNamespace', 'HTML', 'HTMLParser',
20
+ 'ICONV_COMPILED_VERSION',
21
+ 'LIBXML_COMPILED_VERSION', 'LIBXML_VERSION',
22
+ 'LIBXSLT_COMPILED_VERSION', 'LIBXSLT_VERSION',
23
+ 'LXML_VERSION',
22
24
  'LxmlError', 'LxmlRegistryError', 'LxmlSyntaxError',
23
25
  'NamespaceRegistryError', 'PI', 'PIBase', 'ParseError',
24
26
  'ParserBasedElementClassLookup', 'ParserError', 'ProcessingInstruction',
@@ -1212,7 +1214,8 @@ cdef public class _Element [ type LxmlElementType, object LxmlElement ]:
1212
1214
  """__bool__(self)"""
1213
1215
  import warnings
1214
1216
  warnings.warn(
1215
- "The behavior of this method will change in future versions. "
1217
+ "Truth-testing of elements was a source of confusion and will always "
1218
+ "return True in future versions. "
1216
1219
  "Use specific 'len(elem)' or 'elem is not None' test instead.",
1217
1220
  FutureWarning
1218
1221
  )
@@ -3164,10 +3167,7 @@ cdef class CDATA:
3164
3167
  """
3165
3168
  cdef bytes _utf8_data
3166
3169
  def __cinit__(self, data):
3167
- _utf8_data = _utf8(data)
3168
- if b']]>' in _utf8_data:
3169
- raise ValueError, "']]>' not allowed inside CDATA"
3170
- self._utf8_data = _utf8_data
3170
+ self._utf8_data = _utf8(data)
3171
3171
 
3172
3172
 
3173
3173
  def Entity(name):
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:
@@ -18,21 +18,21 @@ extern "C" {
18
18
  *
19
19
  * the version string like "1.2.3"
20
20
  */
21
- #define LIBEXSLT_DOTTED_VERSION "0.8.21"
21
+ #define LIBEXSLT_DOTTED_VERSION "0.8.23"
22
22
 
23
23
  /**
24
24
  * LIBEXSLT_VERSION:
25
25
  *
26
26
  * the version number: 1.2.3 value is 10203
27
27
  */
28
- #define LIBEXSLT_VERSION 821
28
+ #define LIBEXSLT_VERSION 823
29
29
 
30
30
  /**
31
31
  * LIBEXSLT_VERSION_STRING:
32
32
  *
33
33
  * the version number string, 1.2.3 value is "10203"
34
34
  */
35
- #define LIBEXSLT_VERSION_STRING "821"
35
+ #define LIBEXSLT_VERSION_STRING "823"
36
36
 
37
37
  /**
38
38
  * LIBEXSLT_VERSION_EXTRA:
@@ -953,7 +953,7 @@ XML_DEPRECATED XMLPUBFUN int
953
953
  xmlSubstituteEntitiesDefault(int val);
954
954
  XML_DEPRECATED XMLPUBFUN int
955
955
  xmlThrDefSubstituteEntitiesDefaultValue(int v);
956
- XML_DEPRECATED XMLPUBFUN int
956
+ XMLPUBFUN int
957
957
  xmlKeepBlanksDefault (int val);
958
958
  XML_DEPRECATED XMLPUBFUN int
959
959
  xmlThrDefKeepBlanksDefaultValue(int v);
@@ -29,21 +29,21 @@ XMLPUBFUN void xmlCheckVersion(int version);
29
29
  *
30
30
  * the version string like "1.2.3"
31
31
  */
32
- #define LIBXML_DOTTED_VERSION "2.12.6"
32
+ #define LIBXML_DOTTED_VERSION "2.12.9"
33
33
 
34
34
  /**
35
35
  * LIBXML_VERSION:
36
36
  *
37
37
  * the version number: 1.2.3 value is 10203
38
38
  */
39
- #define LIBXML_VERSION 21206
39
+ #define LIBXML_VERSION 21209
40
40
 
41
41
  /**
42
42
  * LIBXML_VERSION_STRING:
43
43
  *
44
44
  * the version number string, 1.2.3 value is "10203"
45
45
  */
46
- #define LIBXML_VERSION_STRING "21206"
46
+ #define LIBXML_VERSION_STRING "21209"
47
47
 
48
48
  /**
49
49
  * LIBXML_VERSION_EXTRA:
@@ -58,7 +58,7 @@ XMLPUBFUN void xmlCheckVersion(int version);
58
58
  * Macro to check that the libxml version in use is compatible with
59
59
  * the version the software has been compiled against
60
60
  */
61
- #define LIBXML_TEST_VERSION xmlCheckVersion(21206);
61
+ #define LIBXML_TEST_VERSION xmlCheckVersion(21209);
62
62
 
63
63
  #ifndef VMS
64
64
  #if 0
@@ -1634,6 +1634,9 @@ struct _xsltStylesheet {
1634
1634
  xmlHashTablePtr namedTemplates; /* hash table of named templates */
1635
1635
 
1636
1636
  xmlXPathContextPtr xpathCtxt;
1637
+
1638
+ unsigned long opLimit;
1639
+ unsigned long opCount;
1637
1640
  };
1638
1641
 
1639
1642
  typedef struct _xsltTransformCache xsltTransformCache;
@@ -20,21 +20,21 @@ extern "C" {
20
20
  *
21
21
  * the version string like "1.2.3"
22
22
  */
23
- #define LIBXSLT_DOTTED_VERSION "1.1.39"
23
+ #define LIBXSLT_DOTTED_VERSION "1.1.42"
24
24
 
25
25
  /**
26
26
  * LIBXSLT_VERSION:
27
27
  *
28
28
  * the version number: 1.2.3 value is 10203
29
29
  */
30
- #define LIBXSLT_VERSION 10139
30
+ #define LIBXSLT_VERSION 10142
31
31
 
32
32
  /**
33
33
  * LIBXSLT_VERSION_STRING:
34
34
  *
35
35
  * the version number string, 1.2.3 value is "10203"
36
36
  */
37
- #define LIBXSLT_VERSION_STRING "10139"
37
+ #define LIBXSLT_VERSION_STRING "10142"
38
38
 
39
39
  /**
40
40
  * LIBXSLT_VERSION_EXTRA:
@@ -54,26 +54,6 @@ extern "C" {
54
54
  #define WITH_XSLT_DEBUG
55
55
  #endif
56
56
 
57
- #if 0
58
- /**
59
- * DEBUG_MEMORY:
60
- *
61
- * should be activated only when debugging libxslt. It replaces the
62
- * allocator with a collect and debug shell to the libc allocator.
63
- * Use configure --with-mem-debug to activate it on both library
64
- */
65
- #define DEBUG_MEMORY
66
-
67
- /**
68
- * DEBUG_MEMORY_LOCATION:
69
- *
70
- * should be activated only when debugging libxslt.
71
- * DEBUG_MEMORY_LOCATION should be activated only when libxml has
72
- * been configured with --with-debug-mem too
73
- */
74
- #define DEBUG_MEMORY_LOCATION
75
- #endif
76
-
77
57
  /**
78
58
  * XSLT_NEED_TRIO:
79
59
  *
@@ -135,19 +115,6 @@ extern "C" {
135
115
  #define LIBXSLT_DEFAULT_PLUGINS_PATH() "/project/build/tmp/libxml2/lib/libxslt-plugins"
136
116
  #endif
137
117
 
138
- /**
139
- * ATTRIBUTE_UNUSED:
140
- *
141
- * This macro is used to flag unused function parameters to GCC
142
- */
143
- #ifdef __GNUC__
144
- #ifndef ATTRIBUTE_UNUSED
145
- #define ATTRIBUTE_UNUSED __attribute__((unused))
146
- #endif
147
- #else
148
- #define ATTRIBUTE_UNUSED
149
- #endif
150
-
151
118
  /**
152
119
  * LIBXSLT_ATTR_FORMAT:
153
120
  *
@@ -1,3 +1,3 @@
1
1
  #ifndef LXML_VERSION_STRING
2
- #define LXML_VERSION_STRING "5.2.2"
2
+ #define LXML_VERSION_STRING "5.3.1"
3
3
  #endif
@@ -225,7 +225,7 @@ class Schematron(_etree._Validator):
225
225
  schematron = None
226
226
  if element.tag == _xml_schema_root:
227
227
  schematron = self._extract_xsd(element)
228
- elif element.nsmap[element.prefix] == RELAXNG_NS:
228
+ elif element.nsmap.get(element.prefix) == RELAXNG_NS:
229
229
  # RelaxNG does not have a single unique root element
230
230
  schematron = self._extract_rng(element)
231
231
  return schematron
lxml/iterparse.pxi CHANGED
@@ -42,7 +42,8 @@ cdef class iterparse:
42
42
  - remove_blank_text: discard blank text nodes
43
43
  - remove_comments: discard comments
44
44
  - remove_pis: discard processing instructions
45
- - strip_cdata: replace CDATA sections by normal text content (default: True)
45
+ - strip_cdata: replace CDATA sections by normal text content (default:
46
+ True for XML, ignored otherwise)
46
47
  - compact: safe memory for short text content (default: True)
47
48
  - resolve_entities: replace entities by their text value (default: True)
48
49
  - huge_tree: disable security restrictions and support very deep trees
@@ -97,7 +98,6 @@ cdef class iterparse:
97
98
  remove_blank_text=remove_blank_text,
98
99
  remove_comments=remove_comments,
99
100
  remove_pis=remove_pis,
100
- strip_cdata=strip_cdata,
101
101
  no_network=no_network,
102
102
  target=None, # TODO
103
103
  schema=schema,
lxml/lxml.etree.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__lxml__etree
4
4
  #define __PYX_HAVE__lxml__etree
@@ -13,7 +13,7 @@ struct LxmlElementBase;
13
13
  struct LxmlElementClassLookup;
14
14
  struct LxmlFallbackElementClassLookup;
15
15
 
16
- /* "lxml/etree.pyx":353
16
+ /* "lxml/etree.pyx":355
17
17
  *
18
18
  * # type of a function that steps from node to node
19
19
  * ctypedef public xmlNode* (*_node_to_node_function)(xmlNode*) # <<<<<<<<<<<<<<
@@ -22,7 +22,7 @@ struct LxmlFallbackElementClassLookup;
22
22
  */
23
23
  typedef xmlNode *(*_node_to_node_function)(xmlNode *);
24
24
 
25
- /* "lxml/etree.pyx":369
25
+ /* "lxml/etree.pyx":371
26
26
  * @cython.final
27
27
  * @cython.freelist(8)
28
28
  * cdef public class _Document [ type LxmlDocumentType, object LxmlDocument ]: # <<<<<<<<<<<<<<
@@ -38,7 +38,7 @@ struct LxmlDocument {
38
38
  struct __pyx_obj_4lxml_5etree__BaseParser *_parser;
39
39
  };
40
40
 
41
- /* "lxml/etree.pyx":718
41
+ /* "lxml/etree.pyx":720
42
42
  *
43
43
  * @cython.no_gc_clear
44
44
  * cdef public class _Element [ type LxmlElementType, object LxmlElement ]: # <<<<<<<<<<<<<<
@@ -52,7 +52,7 @@ struct LxmlElement {
52
52
  PyObject *_tag;
53
53
  };
54
54
 
55
- /* "lxml/etree.pyx":1892
55
+ /* "lxml/etree.pyx":1895
56
56
  *
57
57
  *
58
58
  * cdef public class _ElementTree [ type LxmlElementTreeType, # <<<<<<<<<<<<<<
@@ -66,7 +66,7 @@ struct LxmlElementTree {
66
66
  struct LxmlElement *_context_node;
67
67
  };
68
68
 
69
- /* "lxml/etree.pyx":2666
69
+ /* "lxml/etree.pyx":2669
70
70
  *
71
71
  *
72
72
  * cdef public class _ElementTagMatcher [ object LxmlElementTagMatcher, # <<<<<<<<<<<<<<
@@ -82,7 +82,7 @@ struct LxmlElementTagMatcher {
82
82
  char *_name;
83
83
  };
84
84
 
85
- /* "lxml/etree.pyx":2697
85
+ /* "lxml/etree.pyx":2700
86
86
  * self._name = NULL
87
87
  *
88
88
  * cdef public class _ElementIterator(_ElementTagMatcher) [ # <<<<<<<<<<<<<<