lxml 5.4.0__cp313-cp313-macosx_10_13_universal2.whl → 6.0.0__cp313-cp313-macosx_10_13_universal2.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 (74) hide show
  1. lxml/__init__.py +1 -1
  2. lxml/_elementpath.cpython-313-darwin.so +0 -0
  3. lxml/_elementpath.py +3 -1
  4. lxml/apihelpers.pxi +25 -17
  5. lxml/builder.cpython-313-darwin.so +0 -0
  6. lxml/builder.py +11 -0
  7. lxml/debug.pxi +0 -54
  8. lxml/etree.cpython-313-darwin.so +0 -0
  9. lxml/etree.h +24 -28
  10. lxml/etree.pyx +154 -33
  11. lxml/etree_api.h +59 -50
  12. lxml/extensions.pxi +3 -6
  13. lxml/html/__init__.py +7 -3
  14. lxml/html/_difflib.cpython-313-darwin.so +0 -0
  15. lxml/html/_difflib.py +2106 -0
  16. lxml/html/builder.py +40 -0
  17. lxml/html/defs.py +3 -3
  18. lxml/html/diff.cpython-313-darwin.so +0 -0
  19. lxml/html/diff.py +406 -312
  20. lxml/includes/etree_defs.h +6 -6
  21. lxml/includes/libxml/HTMLparser.h +33 -30
  22. lxml/includes/libxml/HTMLtree.h +1 -0
  23. lxml/includes/libxml/SAX.h +2 -186
  24. lxml/includes/libxml/SAX2.h +2 -3
  25. lxml/includes/libxml/catalog.h +1 -0
  26. lxml/includes/libxml/debugXML.h +0 -138
  27. lxml/includes/libxml/encoding.h +124 -61
  28. lxml/includes/libxml/entities.h +0 -19
  29. lxml/includes/libxml/globals.h +0 -16
  30. lxml/includes/libxml/nanoftp.h +3 -173
  31. lxml/includes/libxml/parser.h +474 -231
  32. lxml/includes/libxml/parserInternals.h +21 -101
  33. lxml/includes/libxml/relaxng.h +7 -2
  34. lxml/includes/libxml/threads.h +0 -6
  35. lxml/includes/libxml/tree.h +29 -85
  36. lxml/includes/libxml/valid.h +20 -12
  37. lxml/includes/libxml/xinclude.h +5 -0
  38. lxml/includes/libxml/xlink.h +4 -0
  39. lxml/includes/libxml/xmlIO.h +15 -34
  40. lxml/includes/libxml/xmlautomata.h +19 -2
  41. lxml/includes/libxml/xmlerror.h +18 -18
  42. lxml/includes/libxml/xmlexports.h +6 -56
  43. lxml/includes/libxml/xmlmemory.h +19 -19
  44. lxml/includes/libxml/xmlmodule.h +4 -0
  45. lxml/includes/libxml/xmlreader.h +11 -3
  46. lxml/includes/libxml/xmlregexp.h +7 -106
  47. lxml/includes/libxml/xmlsave.h +11 -2
  48. lxml/includes/libxml/xmlschemas.h +10 -5
  49. lxml/includes/libxml/xmlunicode.h +3 -354
  50. lxml/includes/libxml/xmlversion.h +19 -34
  51. lxml/includes/libxml/xpath.h +5 -15
  52. lxml/includes/libxml/xpathInternals.h +9 -3
  53. lxml/includes/libxml/xpointer.h +1 -91
  54. lxml/includes/lxml-version.h +1 -1
  55. lxml/includes/tree.pxd +10 -12
  56. lxml/includes/xmlparser.pxd +46 -8
  57. lxml/lxml.etree.h +24 -28
  58. lxml/lxml.etree_api.h +59 -50
  59. lxml/objectify.cpython-313-darwin.so +0 -0
  60. lxml/objectify.pyx +11 -7
  61. lxml/parser.pxi +106 -47
  62. lxml/sax.cpython-313-darwin.so +0 -0
  63. lxml/sax.py +11 -0
  64. lxml/saxparser.pxi +14 -14
  65. lxml/schematron.pxi +8 -3
  66. lxml/serializer.pxi +71 -3
  67. lxml/xslt.pxi +10 -3
  68. lxml-6.0.0.dist-info/METADATA +163 -0
  69. {lxml-5.4.0.dist-info → lxml-6.0.0.dist-info}/RECORD +73 -71
  70. {lxml-5.4.0.dist-info → lxml-6.0.0.dist-info}/WHEEL +2 -1
  71. {lxml-5.4.0.dist-info → lxml-6.0.0.dist-info}/licenses/LICENSE.txt +3 -1
  72. lxml-5.4.0.dist-info/METADATA +0 -96
  73. {lxml-5.4.0.dist-info → lxml-6.0.0.dist-info}/licenses/LICENSES.txt +0 -0
  74. {lxml-5.4.0.dist-info → lxml-6.0.0.dist-info}/top_level.txt +0 -0
@@ -15,21 +15,21 @@
15
15
  *
16
16
  * the version string like "1.2.3"
17
17
  */
18
- #define LIBXML_DOTTED_VERSION "2.13.8"
18
+ #define LIBXML_DOTTED_VERSION "2.14.4"
19
19
 
20
20
  /**
21
21
  * LIBXML_VERSION:
22
22
  *
23
23
  * the version number: 1.2.3 value is 10203
24
24
  */
25
- #define LIBXML_VERSION 21308
25
+ #define LIBXML_VERSION 21404
26
26
 
27
27
  /**
28
28
  * LIBXML_VERSION_STRING:
29
29
  *
30
30
  * the version number string, 1.2.3 value is "10203"
31
31
  */
32
- #define LIBXML_VERSION_STRING "21308"
32
+ #define LIBXML_VERSION_STRING "21404"
33
33
 
34
34
  /**
35
35
  * LIBXML_VERSION_EXTRA:
@@ -44,7 +44,7 @@
44
44
  * Macro to check that the libxml version in use is compatible with
45
45
  * the version the software has been compiled against
46
46
  */
47
- #define LIBXML_TEST_VERSION xmlCheckVersion(21308);
47
+ #define LIBXML_TEST_VERSION xmlCheckVersion(21404);
48
48
 
49
49
  /**
50
50
  * LIBXML_THREAD_ENABLED:
@@ -67,11 +67,9 @@
67
67
  /**
68
68
  * LIBXML_TREE_ENABLED:
69
69
  *
70
- * Whether the DOM like tree manipulation API support is configured in
70
+ * Always enabled since 2.14.0
71
71
  */
72
- #if 1
73
72
  #define LIBXML_TREE_ENABLED
74
- #endif
75
73
 
76
74
  /**
77
75
  * LIBXML_OUTPUT_ENABLED:
@@ -127,21 +125,12 @@
127
125
  #define LIBXML_SAX1_ENABLED
128
126
  #endif
129
127
 
130
- /**
131
- * LIBXML_FTP_ENABLED:
132
- *
133
- * Whether the FTP support is configured in
134
- */
135
- #if 1
136
- #define LIBXML_FTP_ENABLED
137
- #endif
138
-
139
128
  /**
140
129
  * LIBXML_HTTP_ENABLED:
141
130
  *
142
131
  * Whether the HTTP support is configured in
143
132
  */
144
- #if 1
133
+ #if 0
145
134
  #define LIBXML_HTTP_ENABLED
146
135
  #endif
147
136
 
@@ -166,11 +155,9 @@
166
155
  /**
167
156
  * LIBXML_LEGACY_ENABLED:
168
157
  *
169
- * Whether the deprecated APIs are compiled in for compatibility
158
+ * Removed in 2.14
170
159
  */
171
- #if 0
172
- #define LIBXML_LEGACY_ENABLED
173
- #endif
160
+ #undef LIBXML_LEGACY_ENABLED
174
161
 
175
162
  /**
176
163
  * LIBXML_C14N_ENABLED:
@@ -208,15 +195,6 @@
208
195
  #define LIBXML_XPTR_ENABLED
209
196
  #endif
210
197
 
211
- /**
212
- * LIBXML_XPTR_LOCS_ENABLED:
213
- *
214
- * Whether support for XPointer locations is configured in
215
- */
216
- #if 0
217
- #define LIBXML_XPTR_LOCS_ENABLED
218
- #endif
219
-
220
198
  /**
221
199
  * LIBXML_XINCLUDE_ENABLED:
222
200
  *
@@ -265,11 +243,9 @@
265
243
  /**
266
244
  * LIBXML_UNICODE_ENABLED:
267
245
  *
268
- * Whether the Unicode related interfaces are compiled in
246
+ * Removed in 2.14
269
247
  */
270
- #if 1
271
- #define LIBXML_UNICODE_ENABLED
272
- #endif
248
+ #undef LIBXML_UNICODE_ENABLED
273
249
 
274
250
  /**
275
251
  * LIBXML_REGEXP_ENABLED:
@@ -289,6 +265,15 @@
289
265
  #define LIBXML_AUTOMATA_ENABLED
290
266
  #endif
291
267
 
268
+ /**
269
+ * LIBXML_RELAXNG_ENABLED:
270
+ *
271
+ * Whether the RelaxNG validation interfaces are compiled in
272
+ */
273
+ #if 1
274
+ #define LIBXML_RELAXNG_ENABLED
275
+ #endif
276
+
292
277
  /**
293
278
  * LIBXML_SCHEMAS_ENABLED:
294
279
  *
@@ -26,15 +26,10 @@
26
26
  #include <libxml/xmlerror.h>
27
27
  #include <libxml/tree.h>
28
28
  #include <libxml/hash.h>
29
- #endif /* LIBXML_XPATH_ENABLED */
30
29
 
31
- #if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
32
30
  #ifdef __cplusplus
33
31
  extern "C" {
34
32
  #endif
35
- #endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED */
36
-
37
- #ifdef LIBXML_XPATH_ENABLED
38
33
 
39
34
  typedef struct _xmlXPathContext xmlXPathContext;
40
35
  typedef xmlXPathContext *xmlXPathContextPtr;
@@ -104,22 +99,15 @@ typedef enum {
104
99
  XPATH_BOOLEAN = 2,
105
100
  XPATH_NUMBER = 3,
106
101
  XPATH_STRING = 4,
107
- #ifdef LIBXML_XPTR_LOCS_ENABLED
108
- XPATH_POINT = 5,
109
- XPATH_RANGE = 6,
110
- XPATH_LOCATIONSET = 7,
111
- #endif
112
102
  XPATH_USERS = 8,
113
103
  XPATH_XSLT_TREE = 9 /* An XSLT value tree, non modifiable */
114
104
  } xmlXPathObjectType;
115
105
 
116
- #ifndef LIBXML_XPTR_LOCS_ENABLED
117
106
  /** DOC_DISABLE */
118
107
  #define XPATH_POINT 5
119
108
  #define XPATH_RANGE 6
120
109
  #define XPATH_LOCATIONSET 7
121
110
  /** DOC_ENABLE */
122
- #endif
123
111
 
124
112
  typedef struct _xmlXPathObject xmlXPathObject;
125
113
  typedef xmlXPathObject *xmlXPathObjectPtr;
@@ -413,8 +401,11 @@ struct _xmlXPathParserContext {
413
401
  * Objects and Nodesets handling
414
402
  */
415
403
 
404
+ XML_DEPRECATED
416
405
  XMLPUBVAR double xmlXPathNAN;
406
+ XML_DEPRECATED
417
407
  XMLPUBVAR double xmlXPathPINF;
408
+ XML_DEPRECATED
418
409
  XMLPUBVAR double xmlXPathNINF;
419
410
 
420
411
  /* These macros may later turn into functions */
@@ -561,8 +552,7 @@ XMLPUBFUN int
561
552
  xmlXPathContextPtr ctxt);
562
553
  XMLPUBFUN void
563
554
  xmlXPathFreeCompExpr (xmlXPathCompExprPtr comp);
564
- #endif /* LIBXML_XPATH_ENABLED */
565
- #if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
555
+
566
556
  XML_DEPRECATED
567
557
  XMLPUBFUN void
568
558
  xmlXPathInit (void);
@@ -575,5 +565,5 @@ XMLPUBFUN int
575
565
  }
576
566
  #endif
577
567
 
578
- #endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED*/
568
+ #endif /* LIBXML_XPATH_ENABLED */
579
569
  #endif /* ! __XML_XPATH_H__ */
@@ -22,6 +22,12 @@
22
22
  extern "C" {
23
23
  #endif
24
24
 
25
+ /*
26
+ * Backward compatibility
27
+ */
28
+ #define valuePush xmlXPathValuePush
29
+ #define valuePop xmlXPathValuePop
30
+
25
31
  /************************************************************************
26
32
  * *
27
33
  * Helpers *
@@ -478,11 +484,10 @@ XMLPUBFUN xmlXPathParserContextPtr
478
484
  XMLPUBFUN void
479
485
  xmlXPathFreeParserContext (xmlXPathParserContextPtr ctxt);
480
486
 
481
- /* TODO: remap to xmlXPathValuePop and Push. */
482
487
  XMLPUBFUN xmlXPathObjectPtr
483
- valuePop (xmlXPathParserContextPtr ctxt);
488
+ xmlXPathValuePop (xmlXPathParserContextPtr ctxt);
484
489
  XMLPUBFUN int
485
- valuePush (xmlXPathParserContextPtr ctxt,
490
+ xmlXPathValuePush (xmlXPathParserContextPtr ctxt,
486
491
  xmlXPathObjectPtr value);
487
492
 
488
493
  XMLPUBFUN xmlXPathObjectPtr
@@ -516,6 +521,7 @@ XMLPUBFUN void
516
521
 
517
522
  XMLPUBFUN void
518
523
  xmlXPathRoot (xmlXPathParserContextPtr ctxt);
524
+ XML_DEPRECATED
519
525
  XMLPUBFUN void
520
526
  xmlXPathEvalExpr (xmlXPathParserContextPtr ctxt);
521
527
  XMLPUBFUN xmlChar *
@@ -28,88 +28,10 @@
28
28
  extern "C" {
29
29
  #endif
30
30
 
31
- #if defined(LIBXML_XPTR_LOCS_ENABLED)
32
- /*
33
- * A Location Set
34
- */
35
- typedef struct _xmlLocationSet xmlLocationSet;
36
- typedef xmlLocationSet *xmlLocationSetPtr;
37
- struct _xmlLocationSet {
38
- int locNr; /* number of locations in the set */
39
- int locMax; /* size of the array as allocated */
40
- xmlXPathObjectPtr *locTab;/* array of locations */
41
- };
42
-
43
- /*
44
- * Handling of location sets.
45
- */
46
-
47
- XML_DEPRECATED
48
- XMLPUBFUN xmlLocationSetPtr
49
- xmlXPtrLocationSetCreate (xmlXPathObjectPtr val);
50
- XML_DEPRECATED
51
- XMLPUBFUN void
52
- xmlXPtrFreeLocationSet (xmlLocationSetPtr obj);
53
- XML_DEPRECATED
54
- XMLPUBFUN xmlLocationSetPtr
55
- xmlXPtrLocationSetMerge (xmlLocationSetPtr val1,
56
- xmlLocationSetPtr val2);
57
- XML_DEPRECATED
58
- XMLPUBFUN xmlXPathObjectPtr
59
- xmlXPtrNewRange (xmlNodePtr start,
60
- int startindex,
61
- xmlNodePtr end,
62
- int endindex);
63
- XML_DEPRECATED
64
- XMLPUBFUN xmlXPathObjectPtr
65
- xmlXPtrNewRangePoints (xmlXPathObjectPtr start,
66
- xmlXPathObjectPtr end);
67
- XML_DEPRECATED
68
- XMLPUBFUN xmlXPathObjectPtr
69
- xmlXPtrNewRangeNodePoint (xmlNodePtr start,
70
- xmlXPathObjectPtr end);
71
- XML_DEPRECATED
72
- XMLPUBFUN xmlXPathObjectPtr
73
- xmlXPtrNewRangePointNode (xmlXPathObjectPtr start,
74
- xmlNodePtr end);
75
- XML_DEPRECATED
76
- XMLPUBFUN xmlXPathObjectPtr
77
- xmlXPtrNewRangeNodes (xmlNodePtr start,
78
- xmlNodePtr end);
79
- XML_DEPRECATED
80
- XMLPUBFUN xmlXPathObjectPtr
81
- xmlXPtrNewLocationSetNodes (xmlNodePtr start,
82
- xmlNodePtr end);
83
- XML_DEPRECATED
84
- XMLPUBFUN xmlXPathObjectPtr
85
- xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set);
86
- XML_DEPRECATED
87
- XMLPUBFUN xmlXPathObjectPtr
88
- xmlXPtrNewRangeNodeObject (xmlNodePtr start,
89
- xmlXPathObjectPtr end);
90
- XML_DEPRECATED
91
- XMLPUBFUN xmlXPathObjectPtr
92
- xmlXPtrNewCollapsedRange (xmlNodePtr start);
93
- XML_DEPRECATED
94
- XMLPUBFUN void
95
- xmlXPtrLocationSetAdd (xmlLocationSetPtr cur,
96
- xmlXPathObjectPtr val);
97
- XML_DEPRECATED
98
- XMLPUBFUN xmlXPathObjectPtr
99
- xmlXPtrWrapLocationSet (xmlLocationSetPtr val);
100
- XML_DEPRECATED
101
- XMLPUBFUN void
102
- xmlXPtrLocationSetDel (xmlLocationSetPtr cur,
103
- xmlXPathObjectPtr val);
104
- XML_DEPRECATED
105
- XMLPUBFUN void
106
- xmlXPtrLocationSetRemove (xmlLocationSetPtr cur,
107
- int val);
108
- #endif /* defined(LIBXML_XPTR_LOCS_ENABLED) */
109
-
110
31
  /*
111
32
  * Functions.
112
33
  */
34
+ XML_DEPRECATED
113
35
  XMLPUBFUN xmlXPathContextPtr
114
36
  xmlXPtrNewContext (xmlDocPtr doc,
115
37
  xmlNodePtr here,
@@ -118,18 +40,6 @@ XMLPUBFUN xmlXPathObjectPtr
118
40
  xmlXPtrEval (const xmlChar *str,
119
41
  xmlXPathContextPtr ctx);
120
42
 
121
- #if defined(LIBXML_XPTR_LOCS_ENABLED)
122
- XML_DEPRECATED
123
- XMLPUBFUN void
124
- xmlXPtrRangeToFunction (xmlXPathParserContextPtr ctxt,
125
- int nargs);
126
- XML_DEPRECATED
127
- XMLPUBFUN xmlNodePtr
128
- xmlXPtrBuildNodeList (xmlXPathObjectPtr obj);
129
- XML_DEPRECATED
130
- XMLPUBFUN void
131
- xmlXPtrEvalRangePredicate (xmlXPathParserContextPtr ctxt);
132
- #endif /* defined(LIBXML_XPTR_LOCS_ENABLED) */
133
43
  #ifdef __cplusplus
134
44
  }
135
45
  #endif
@@ -1,3 +1,3 @@
1
1
  #ifndef LXML_VERSION_STRING
2
- #define LXML_VERSION_STRING "5.4.0"
2
+ #define LXML_VERSION_STRING "6.0.0"
3
3
  #endif
lxml/includes/tree.pxd CHANGED
@@ -6,8 +6,9 @@ cdef extern from "lxml-version.h":
6
6
  cdef char* LXML_VERSION_STRING
7
7
 
8
8
  cdef extern from "libxml/xmlversion.h":
9
- cdef const_char* xmlParserVersion
10
- cdef int LIBXML_VERSION
9
+ const char* xmlParserVersion
10
+ int LIBXML_VERSION
11
+
11
12
 
12
13
  cdef extern from "libxml/xmlstring.h" nogil:
13
14
  ctypedef unsigned char xmlChar
@@ -141,7 +142,7 @@ cdef extern from "libxml/tree.h" nogil:
141
142
  XML_ATTRIBUTE_NMTOKENS= 8
142
143
  XML_ATTRIBUTE_ENUMERATION= 9
143
144
  XML_ATTRIBUTE_NOTATION= 10
144
-
145
+
145
146
  ctypedef enum xmlAttributeDefault:
146
147
  XML_ATTRIBUTE_NONE= 1
147
148
  XML_ATTRIBUTE_REQUIRED= 2
@@ -288,7 +289,7 @@ cdef extern from "libxml/tree.h" nogil:
288
289
  xmlDtd* intSubset
289
290
  xmlDtd* extSubset
290
291
  int properties
291
-
292
+
292
293
  ctypedef struct xmlAttr:
293
294
  void* _private
294
295
  xmlElementType type
@@ -307,7 +308,7 @@ cdef extern from "libxml/tree.h" nogil:
307
308
  const_xmlChar* name
308
309
  xmlAttr* attr
309
310
  xmlDoc* doc
310
-
311
+
311
312
  ctypedef struct xmlBuffer
312
313
 
313
314
  ctypedef struct xmlBuf # new in libxml2 2.9
@@ -318,14 +319,14 @@ cdef extern from "libxml/tree.h" nogil:
318
319
  int error
319
320
 
320
321
  const_xmlChar* XML_XML_NAMESPACE
321
-
322
+
322
323
  cdef void xmlFreeDoc(xmlDoc* cur)
323
324
  cdef void xmlFreeDtd(xmlDtd* cur)
324
325
  cdef void xmlFreeNode(xmlNode* cur)
325
326
  cdef void xmlFreeNsList(xmlNs* ns)
326
327
  cdef void xmlFreeNs(xmlNs* ns)
327
328
  cdef void xmlFree(void* buf)
328
-
329
+
329
330
  cdef xmlNode* xmlNewNode(xmlNs* ns, const_xmlChar* name)
330
331
  cdef xmlNode* xmlNewDocText(xmlDoc* doc, const_xmlChar* content)
331
332
  cdef xmlNode* xmlNewDocComment(xmlDoc* doc, const_xmlChar* content)
@@ -437,7 +438,7 @@ cdef extern from "libxml/xmlIO.h":
437
438
  cdef xmlOutputBuffer* xmlOutputBufferCreateIO(
438
439
  xmlOutputWriteCallback iowrite,
439
440
  xmlOutputCloseCallback ioclose,
440
- void * ioctx,
441
+ void * ioctx,
441
442
  xmlCharEncodingHandler* encoder) nogil
442
443
  cdef xmlOutputBuffer* xmlOutputBufferCreateFile(
443
444
  stdio.FILE* file, xmlCharEncodingHandler* encoder) nogil
@@ -471,14 +472,11 @@ cdef extern from "libxml/globals.h" nogil:
471
472
  cdef int xmlThrDefKeepBlanksDefaultValue(int onoff)
472
473
  cdef int xmlThrDefLineNumbersDefaultValue(int onoff)
473
474
  cdef int xmlThrDefIndentTreeOutput(int onoff)
474
-
475
+
475
476
  cdef extern from "libxml/xmlmemory.h" nogil:
476
477
  cdef void* xmlMalloc(size_t size)
477
478
  cdef int xmlMemBlocks()
478
479
  cdef int xmlMemUsed()
479
- cdef void xmlMemDisplay(stdio.FILE* file)
480
- cdef void xmlMemDisplayLast(stdio.FILE* file, long num_bytes)
481
- cdef void xmlMemShow(stdio.FILE* file, int count)
482
480
 
483
481
  cdef extern from "etree_defs.h" nogil:
484
482
  cdef bint _isElement(xmlNode* node)
@@ -32,11 +32,11 @@ cdef extern from "libxml/parser.h" nogil:
32
32
 
33
33
  ctypedef void (*commentSAXFunc)(void* ctx, const_xmlChar* value) noexcept
34
34
 
35
- ctypedef void (*processingInstructionSAXFunc)(void* ctx,
35
+ ctypedef void (*processingInstructionSAXFunc)(void* ctx,
36
36
  const_xmlChar* target,
37
37
  const_xmlChar* data) noexcept
38
38
 
39
- ctypedef void (*internalSubsetSAXFunc)(void* ctx,
39
+ ctypedef void (*internalSubsetSAXFunc)(void* ctx,
40
40
  const_xmlChar* name,
41
41
  const_xmlChar* externalID,
42
42
  const_xmlChar* systemID) noexcept
@@ -99,11 +99,48 @@ cdef extern from "libxml/xmlIO.h" nogil:
99
99
 
100
100
  cdef extern from "libxml/parser.h" nogil:
101
101
 
102
+ ctypedef enum xmlFeature:
103
+ XML_WITH_THREAD = 1
104
+ XML_WITH_TREE = 2
105
+ XML_WITH_OUTPUT = 3
106
+ XML_WITH_PUSH = 4
107
+ XML_WITH_READER = 5
108
+ XML_WITH_PATTERN = 6
109
+ XML_WITH_WRITER = 7
110
+ XML_WITH_SAX1 = 8
111
+ XML_WITH_FTP = 9
112
+ XML_WITH_HTTP = 10
113
+ XML_WITH_VALID = 11
114
+ XML_WITH_HTML = 12
115
+ XML_WITH_LEGACY = 13
116
+ XML_WITH_C14N = 14
117
+ XML_WITH_CATALOG = 15
118
+ XML_WITH_XPATH = 16
119
+ XML_WITH_XPTR = 17
120
+ XML_WITH_XINCLUDE = 18
121
+ XML_WITH_ICONV = 19
122
+ XML_WITH_ISO8859X = 20
123
+ XML_WITH_UNICODE = 21
124
+ XML_WITH_REGEXP = 22
125
+ XML_WITH_AUTOMATA = 23
126
+ XML_WITH_EXPR = 24
127
+ XML_WITH_SCHEMAS = 25
128
+ XML_WITH_SCHEMATRON = 26
129
+ XML_WITH_MODULES = 27
130
+ XML_WITH_DEBUG = 28
131
+ XML_WITH_DEBUG_MEM = 29
132
+ XML_WITH_DEBUG_RUN = 30
133
+ XML_WITH_ZLIB = 31
134
+ XML_WITH_ICU = 32
135
+ XML_WITH_LZMA = 33
136
+
137
+ cdef bint xmlHasFeature(xmlFeature feature)
138
+
102
139
  cdef xmlDict* xmlDictCreate()
103
140
  cdef xmlDict* xmlDictCreateSub(xmlDict* subdict)
104
141
  cdef void xmlDictFree(xmlDict* sub)
105
142
  cdef int xmlDictReference(xmlDict* dict)
106
-
143
+
107
144
  cdef int XML_COMPLETE_ATTRS # SAX option for adding DTD default attributes
108
145
  cdef int XML_SKIP_IDS # SAX option for not building an XML ID dict
109
146
 
@@ -207,9 +244,9 @@ cdef extern from "libxml/parser.h" nogil:
207
244
  cdef xmlDoc* xmlCtxtReadFile(xmlParserCtxt* ctxt,
208
245
  char* filename, char* encoding,
209
246
  int options)
210
- cdef xmlDoc* xmlCtxtReadIO(xmlParserCtxt* ctxt,
211
- xmlInputReadCallback ioread,
212
- xmlInputCloseCallback ioclose,
247
+ cdef xmlDoc* xmlCtxtReadIO(xmlParserCtxt* ctxt,
248
+ xmlInputReadCallback ioread,
249
+ xmlInputCloseCallback ioclose,
213
250
  void* ioctx,
214
251
  char* URL, char* encoding,
215
252
  int options)
@@ -257,9 +294,10 @@ cdef extern from "libxml/parser.h" nogil:
257
294
 
258
295
  cdef extern from "libxml/parserInternals.h" nogil:
259
296
  cdef xmlParserInput* xmlNewInputStream(xmlParserCtxt* ctxt)
260
- cdef xmlParserInput* xmlNewStringInputStream(xmlParserCtxt* ctxt,
297
+ cdef xmlParserInput* xmlNewStringInputStream(xmlParserCtxt* ctxt,
261
298
  char* buffer)
262
- cdef xmlParserInput* xmlNewInputFromFile(xmlParserCtxt* ctxt,
299
+ cdef xmlParserInput* xmlNewInputFromFile(xmlParserCtxt* ctxt,
263
300
  char* filename)
264
301
  cdef void xmlFreeInputStream(xmlParserInput* input)
265
302
  cdef int xmlSwitchEncoding(xmlParserCtxt* ctxt, int enc)
303
+ cdef bint xmlCtxtIsStopped(xmlParserCtxt* ctxt)
lxml/lxml.etree.h CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated by Cython 3.0.12 */
1
+ /* Generated by Cython 3.1.2 */
2
2
 
3
3
  #ifndef __PYX_HAVE__lxml__etree
4
4
  #define __PYX_HAVE__lxml__etree
@@ -13,22 +13,22 @@ struct LxmlElementBase;
13
13
  struct LxmlElementClassLookup;
14
14
  struct LxmlFallbackElementClassLookup;
15
15
 
16
- /* "lxml/etree.pyx":355
16
+ /* "lxml/etree.pyx":451
17
17
  *
18
18
  * # type of a function that steps from node to node
19
19
  * ctypedef public xmlNode* (*_node_to_node_function)(xmlNode*) # <<<<<<<<<<<<<<
20
20
  *
21
21
  *
22
- */
22
+ */
23
23
  typedef xmlNode *(*_node_to_node_function)(xmlNode *);
24
24
 
25
- /* "lxml/etree.pyx":371
26
- * @cython.final
27
- * @cython.freelist(8)
28
- * cdef public class _Document [ type LxmlDocumentType, object LxmlDocument ]: # <<<<<<<<<<<<<<
29
- * """Internal base class to reference a libxml document.
25
+ /* "lxml/etree.pyx":465
26
+ * # Public Python API
30
27
  *
31
- */
28
+ * @cython.final # <<<<<<<<<<<<<<
29
+ * @cython.freelist(8)
30
+ * cdef public class _Document [ type LxmlDocumentType, object LxmlDocument ]:
31
+ */
32
32
  struct LxmlDocument {
33
33
  PyObject_HEAD
34
34
  struct __pyx_vtabstruct_4lxml_5etree__Document *__pyx_vtab;
@@ -38,13 +38,13 @@ struct LxmlDocument {
38
38
  struct __pyx_obj_4lxml_5etree__BaseParser *_parser;
39
39
  };
40
40
 
41
- /* "lxml/etree.pyx":720
41
+ /* "lxml/etree.pyx":817
42
42
  *
43
- * @cython.no_gc_clear
44
- * cdef public class _Element [ type LxmlElementType, object LxmlElement ]: # <<<<<<<<<<<<<<
45
- * """Element class.
46
43
  *
47
- */
44
+ * @cython.no_gc_clear # <<<<<<<<<<<<<<
45
+ * cdef public class _Element [ type LxmlElementType, object LxmlElement ]:
46
+ * """Element class.
47
+ */
48
48
  struct LxmlElement {
49
49
  PyObject_HEAD
50
50
  struct LxmlDocument *_doc;
@@ -52,13 +52,13 @@ struct LxmlElement {
52
52
  PyObject *_tag;
53
53
  };
54
54
 
55
- /* "lxml/etree.pyx":1895
55
+ /* "lxml/etree.pyx":1991
56
56
  *
57
57
  *
58
58
  * cdef public class _ElementTree [ type LxmlElementTreeType, # <<<<<<<<<<<<<<
59
59
  * object LxmlElementTree ]:
60
60
  * cdef _Document _doc
61
- */
61
+ */
62
62
  struct LxmlElementTree {
63
63
  PyObject_HEAD
64
64
  struct __pyx_vtabstruct_4lxml_5etree__ElementTree *__pyx_vtab;
@@ -66,13 +66,13 @@ struct LxmlElementTree {
66
66
  struct LxmlElement *_context_node;
67
67
  };
68
68
 
69
- /* "lxml/etree.pyx":2669
69
+ /* "lxml/etree.pyx":2765
70
70
  *
71
71
  *
72
72
  * cdef public class _ElementTagMatcher [ object LxmlElementTagMatcher, # <<<<<<<<<<<<<<
73
73
  * type LxmlElementTagMatcherType ]:
74
74
  * """
75
- */
75
+ */
76
76
  struct LxmlElementTagMatcher {
77
77
  PyObject_HEAD
78
78
  struct __pyx_vtabstruct_4lxml_5etree__ElementTagMatcher *__pyx_vtab;
@@ -82,13 +82,13 @@ struct LxmlElementTagMatcher {
82
82
  char *_name;
83
83
  };
84
84
 
85
- /* "lxml/etree.pyx":2700
85
+ /* "lxml/etree.pyx":2796
86
86
  * self._name = NULL
87
87
  *
88
88
  * cdef public class _ElementIterator(_ElementTagMatcher) [ # <<<<<<<<<<<<<<
89
89
  * object LxmlElementIterator, type LxmlElementIteratorType ]:
90
90
  * """
91
- */
91
+ */
92
92
  struct LxmlElementIterator {
93
93
  struct LxmlElementTagMatcher __pyx_base;
94
94
  struct LxmlElement *_node;
@@ -101,7 +101,7 @@ struct LxmlElementIterator {
101
101
  * cdef public class ElementBase(_Element) [ type LxmlElementBaseType, # <<<<<<<<<<<<<<
102
102
  * object LxmlElementBase ]:
103
103
  * """ElementBase(*children, attrib=None, nsmap=None, **_extra)
104
- */
104
+ */
105
105
  struct LxmlElementBase {
106
106
  struct LxmlElement __pyx_base;
107
107
  };
@@ -112,7 +112,7 @@ struct LxmlElementBase {
112
112
  * ctypedef public object (*_element_class_lookup_function)(object, _Document, xmlNode*) # <<<<<<<<<<<<<<
113
113
  *
114
114
  * # class to store element class lookup functions
115
- */
115
+ */
116
116
  typedef PyObject *(*_element_class_lookup_function)(PyObject *, struct LxmlDocument *, xmlNode *);
117
117
 
118
118
  /* "src/lxml/classlookup.pxi":213
@@ -121,7 +121,7 @@ typedef PyObject *(*_element_class_lookup_function)(PyObject *, struct LxmlDocum
121
121
  * cdef public class ElementClassLookup [ type LxmlElementClassLookupType, # <<<<<<<<<<<<<<
122
122
  * object LxmlElementClassLookup ]:
123
123
  * """ElementClassLookup(self)
124
- */
124
+ */
125
125
  struct LxmlElementClassLookup {
126
126
  PyObject_HEAD
127
127
  _element_class_lookup_function _lookup_function;
@@ -133,7 +133,7 @@ struct LxmlElementClassLookup {
133
133
  * cdef public class FallbackElementClassLookup(ElementClassLookup) \ # <<<<<<<<<<<<<<
134
134
  * [ type LxmlFallbackElementClassLookupType,
135
135
  * object LxmlFallbackElementClassLookup ]:
136
- */
136
+ */
137
137
  struct LxmlFallbackElementClassLookup {
138
138
  struct LxmlElementClassLookup __pyx_base;
139
139
  struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup *__pyx_vtab;
@@ -224,9 +224,6 @@ __PYX_EXTERN_C xmlNs *findOrBuildNodeNsPrefix(struct LxmlDocument *, xmlNode *,
224
224
  /* WARNING: the interface of the module init function changed in CPython 3.5. */
225
225
  /* It now returns a PyModuleDef instance instead of a PyModule instance. */
226
226
 
227
- #if PY_MAJOR_VERSION < 3
228
- PyMODINIT_FUNC initetree(void);
229
- #else
230
227
  /* WARNING: Use PyImport_AppendInittab("etree", PyInit_etree) instead of calling PyInit_etree directly from Python 3.5 */
231
228
  PyMODINIT_FUNC PyInit_etree(void);
232
229
 
@@ -243,6 +240,5 @@ static PyObject* __PYX_WARN_IF_PyInit_etree_INIT_CALLED(PyObject* res) {
243
240
  }
244
241
  #define PyInit_etree() __PYX_WARN_IF_PyInit_etree_INIT_CALLED(PyInit_etree())
245
242
  #endif
246
- #endif
247
243
 
248
244
  #endif /* !__PYX_HAVE__lxml__etree */