lxml 5.2.1__cp312-cp312-win_amd64.whl → 5.3.0__cp312-cp312-win_amd64.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 +1 -1
- lxml/_elementpath.cp312-win_amd64.pyd +0 -0
- lxml/builder.cp312-win_amd64.pyd +0 -0
- lxml/etree.cp312-win_amd64.pyd +0 -0
- lxml/etree.h +7 -7
- lxml/etree.pyx +31 -12
- lxml/etree_api.h +49 -49
- lxml/html/diff.cp312-win_amd64.pyd +0 -0
- lxml/includes/lxml-version.h +1 -1
- lxml/isoschematron/__init__.py +1 -1
- lxml/lxml.etree.h +7 -7
- lxml/lxml.etree_api.h +49 -49
- lxml/objectify.cp312-win_amd64.pyd +0 -0
- lxml/parser.pxi +9 -3
- lxml/sax.cp312-win_amd64.pyd +0 -0
- lxml/serializer.pxi +5 -95
- {lxml-5.2.1.dist-info → lxml-5.3.0.dist-info}/METADATA +30 -16
- {lxml-5.2.1.dist-info → lxml-5.3.0.dist-info}/RECORD +22 -22
- {lxml-5.2.1.dist-info → lxml-5.3.0.dist-info}/WHEEL +1 -1
- {lxml-5.2.1.dist-info → lxml-5.3.0.dist-info}/LICENSE.txt +0 -0
- {lxml-5.2.1.dist-info → lxml-5.3.0.dist-info}/LICENSES.txt +0 -0
- {lxml-5.2.1.dist-info → lxml-5.3.0.dist-info}/top_level.txt +0 -0
lxml/__init__.py
CHANGED
Binary file
|
lxml/builder.cp312-win_amd64.pyd
CHANGED
Binary file
|
lxml/etree.cp312-win_amd64.pyd
CHANGED
Binary file
|
lxml/etree.h
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/* Generated by Cython 3.0.
|
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":
|
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":
|
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":
|
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":
|
55
|
+
/* "lxml/etree.pyx":1894
|
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":
|
69
|
+
/* "lxml/etree.pyx":2668
|
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":
|
85
|
+
/* "lxml/etree.pyx":2699
|
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
|
-
'
|
21
|
-
'
|
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',
|
@@ -232,7 +234,7 @@ cdef class C14NError(LxmlError):
|
|
232
234
|
"""
|
233
235
|
|
234
236
|
# version information
|
235
|
-
cdef __unpackDottedVersion(version):
|
237
|
+
cdef tuple __unpackDottedVersion(version):
|
236
238
|
version_list = []
|
237
239
|
l = (version.decode("ascii").replace('-', '.').split('.') + [0]*4)[:4]
|
238
240
|
for item in l:
|
@@ -255,11 +257,11 @@ cdef __unpackDottedVersion(version):
|
|
255
257
|
version_list.append(item)
|
256
258
|
return tuple(version_list)
|
257
259
|
|
258
|
-
cdef __unpackIntVersion(int c_version):
|
260
|
+
cdef tuple __unpackIntVersion(int c_version, int base=100):
|
259
261
|
return (
|
260
|
-
((c_version // (
|
261
|
-
((c_version //
|
262
|
-
(c_version
|
262
|
+
((c_version // (base*base)) % base),
|
263
|
+
((c_version // base) % base),
|
264
|
+
(c_version % base)
|
263
265
|
)
|
264
266
|
|
265
267
|
cdef int _LIBXML_VERSION_INT
|
@@ -276,6 +278,26 @@ LXML_VERSION = __unpackDottedVersion(tree.LXML_VERSION_STRING)
|
|
276
278
|
|
277
279
|
__version__ = tree.LXML_VERSION_STRING.decode("ascii")
|
278
280
|
|
281
|
+
cdef extern from *:
|
282
|
+
"""
|
283
|
+
#ifdef ZLIB_VERNUM
|
284
|
+
#define __lxml_zlib_version (ZLIB_VERNUM >> 4)
|
285
|
+
#else
|
286
|
+
#define __lxml_zlib_version 0
|
287
|
+
#endif
|
288
|
+
#ifdef _LIBICONV_VERSION
|
289
|
+
#define __lxml_iconv_version (_LIBICONV_VERSION << 8)
|
290
|
+
#else
|
291
|
+
#define __lxml_iconv_version 0
|
292
|
+
#endif
|
293
|
+
"""
|
294
|
+
# zlib isn't included automatically by libxml2's headers
|
295
|
+
#long ZLIB_HEX_VERSION "__lxml_zlib_version"
|
296
|
+
long LIBICONV_HEX_VERSION "__lxml_iconv_version"
|
297
|
+
|
298
|
+
#ZLIB_COMPILED_VERSION = __unpackIntVersion(ZLIB_HEX_VERSION, base=0x10)
|
299
|
+
ICONV_COMPILED_VERSION = __unpackIntVersion(LIBICONV_HEX_VERSION, base=0x100)[:2]
|
300
|
+
|
279
301
|
|
280
302
|
# class for temporary storage of Python references,
|
281
303
|
# used e.g. for XPath results
|
@@ -3144,10 +3166,7 @@ cdef class CDATA:
|
|
3144
3166
|
"""
|
3145
3167
|
cdef bytes _utf8_data
|
3146
3168
|
def __cinit__(self, data):
|
3147
|
-
_utf8_data = _utf8(data)
|
3148
|
-
if b']]>' in _utf8_data:
|
3149
|
-
raise ValueError, "']]>' not allowed inside CDATA"
|
3150
|
-
self._utf8_data = _utf8_data
|
3169
|
+
self._utf8_data = _utf8(data)
|
3151
3170
|
|
3152
3171
|
|
3153
3172
|
def Entity(name):
|
lxml/etree_api.h
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/* Generated by Cython 3.0.
|
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
|
102
|
-
#define
|
103
|
-
static int
|
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 (
|
144
|
-
if (
|
145
|
-
if (
|
146
|
-
if (
|
147
|
-
if (
|
148
|
-
if (
|
149
|
-
if (
|
150
|
-
if (
|
151
|
-
if (
|
152
|
-
if (
|
153
|
-
if (
|
154
|
-
if (
|
155
|
-
if (
|
156
|
-
if (
|
157
|
-
if (
|
158
|
-
if (
|
159
|
-
if (
|
160
|
-
if (
|
161
|
-
if (
|
162
|
-
if (
|
163
|
-
if (
|
164
|
-
if (
|
165
|
-
if (
|
166
|
-
if (
|
167
|
-
if (
|
168
|
-
if (
|
169
|
-
if (
|
170
|
-
if (
|
171
|
-
if (
|
172
|
-
if (
|
173
|
-
if (
|
174
|
-
if (
|
175
|
-
if (
|
176
|
-
if (
|
177
|
-
if (
|
178
|
-
if (
|
179
|
-
if (
|
180
|
-
if (
|
181
|
-
if (
|
182
|
-
if (
|
183
|
-
if (
|
184
|
-
if (
|
185
|
-
if (
|
186
|
-
if (
|
187
|
-
if (
|
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:
|
Binary file
|
lxml/includes/lxml-version.h
CHANGED
lxml/isoschematron/__init__.py
CHANGED
@@ -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
|
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/lxml.etree.h
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/* Generated by Cython 3.0.
|
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":
|
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":
|
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":
|
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":
|
55
|
+
/* "lxml/etree.pyx":1894
|
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":
|
69
|
+
/* "lxml/etree.pyx":2668
|
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":
|
85
|
+
/* "lxml/etree.pyx":2699
|
86
86
|
* self._name = NULL
|
87
87
|
*
|
88
88
|
* cdef public class _ElementIterator(_ElementTagMatcher) [ # <<<<<<<<<<<<<<
|
lxml/lxml.etree_api.h
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/* Generated by Cython 3.0.
|
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
|
102
|
-
#define
|
103
|
-
static int
|
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 (
|
144
|
-
if (
|
145
|
-
if (
|
146
|
-
if (
|
147
|
-
if (
|
148
|
-
if (
|
149
|
-
if (
|
150
|
-
if (
|
151
|
-
if (
|
152
|
-
if (
|
153
|
-
if (
|
154
|
-
if (
|
155
|
-
if (
|
156
|
-
if (
|
157
|
-
if (
|
158
|
-
if (
|
159
|
-
if (
|
160
|
-
if (
|
161
|
-
if (
|
162
|
-
if (
|
163
|
-
if (
|
164
|
-
if (
|
165
|
-
if (
|
166
|
-
if (
|
167
|
-
if (
|
168
|
-
if (
|
169
|
-
if (
|
170
|
-
if (
|
171
|
-
if (
|
172
|
-
if (
|
173
|
-
if (
|
174
|
-
if (
|
175
|
-
if (
|
176
|
-
if (
|
177
|
-
if (
|
178
|
-
if (
|
179
|
-
if (
|
180
|
-
if (
|
181
|
-
if (
|
182
|
-
if (
|
183
|
-
if (
|
184
|
-
if (
|
185
|
-
if (
|
186
|
-
if (
|
187
|
-
if (
|
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:
|
Binary file
|
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,
|
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=
|
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)
|
lxml/sax.cp312-win_amd64.pyd
CHANGED
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:
|
@@ -572,7 +480,7 @@ cdef _write_attr_string(tree.xmlOutputBuffer* buf, const char *string):
|
|
572
480
|
# output to file-like objects
|
573
481
|
|
574
482
|
cdef object io_open
|
575
|
-
from io import open
|
483
|
+
from io import open as io_open
|
576
484
|
|
577
485
|
cdef object gzip
|
578
486
|
import gzip
|
@@ -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)
|
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.
|
3
|
+
Version: 5.3.0
|
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
|
@@ -31,15 +31,15 @@ Requires-Python: >=3.6
|
|
31
31
|
License-File: LICENSE.txt
|
32
32
|
License-File: LICENSES.txt
|
33
33
|
Provides-Extra: cssselect
|
34
|
-
Requires-Dist: cssselect
|
34
|
+
Requires-Dist: cssselect>=0.7; extra == "cssselect"
|
35
35
|
Provides-Extra: html5
|
36
|
-
Requires-Dist: html5lib
|
36
|
+
Requires-Dist: html5lib; extra == "html5"
|
37
37
|
Provides-Extra: html_clean
|
38
|
-
Requires-Dist: lxml-html-clean
|
38
|
+
Requires-Dist: lxml-html-clean; extra == "html-clean"
|
39
39
|
Provides-Extra: htmlsoup
|
40
|
-
Requires-Dist: BeautifulSoup4
|
40
|
+
Requires-Dist: BeautifulSoup4; extra == "htmlsoup"
|
41
41
|
Provides-Extra: source
|
42
|
-
Requires-Dist: Cython
|
42
|
+
Requires-Dist: Cython>=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,26 +64,40 @@ 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.
|
68
|
-
Running ``easy_install lxml==5.
|
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.
|
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.
|
74
|
+
5.3.0 (2024-08-10)
|
75
75
|
==================
|
76
76
|
|
77
|
+
Features added
|
78
|
+
--------------
|
79
|
+
|
80
|
+
* GH#421: Nested ``CDATA`` sections are no longer rejected but split on output
|
81
|
+
to represent ``]]>`` correctly.
|
82
|
+
Patch by Gertjan Klein.
|
83
|
+
|
77
84
|
Bugs fixed
|
78
85
|
----------
|
79
86
|
|
80
|
-
* LP#
|
81
|
-
|
87
|
+
* LP#2060160: Attribute values serialised differently in ``xmlfile.element()`` and ``xmlfile.write()``.
|
88
|
+
|
89
|
+
* LP#2058177: The ISO-Schematron implementation could fail on unknown prefixes.
|
90
|
+
Patch by David Lakin.
|
91
|
+
|
92
|
+
Other changes
|
93
|
+
-------------
|
94
|
+
|
95
|
+
* LP#2067707: The ``strip_cdata`` option in ``HTMLParser()`` turned out to be useless and is now deprecated.
|
96
|
+
|
97
|
+
* Binary wheels use the library versions libxml2 2.12.9 and libxslt 1.1.42.
|
82
98
|
|
83
|
-
*
|
84
|
-
where it should have issued a warning.
|
99
|
+
* Windows binary wheels use the library versions libxml2 2.11.8 and libxslt 1.1.39.
|
85
100
|
|
86
|
-
*
|
87
|
-
Patch by Michał Górny.
|
101
|
+
* Built with Cython 3.0.11.
|
88
102
|
|
89
103
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
lxml/ElementInclude.py,sha256=pEvLKSyhNWtZTRr6liUJD-1mIqmbxbcurxcqZv7vNHg,8804
|
2
|
-
lxml/__init__.py,sha256=
|
3
|
-
lxml/_elementpath.cp312-win_amd64.pyd,sha256=
|
2
|
+
lxml/__init__.py,sha256=rBt7VwWCFTj_GOmGwri472LPRDdH2kA5UU9pRzRa92w,596
|
3
|
+
lxml/_elementpath.cp312-win_amd64.pyd,sha256=RPdcEBqIEVfKiF4gLs4e9ccJuyPs8MkDImgy82W2Gvw,149504
|
4
4
|
lxml/_elementpath.py,sha256=waZwwmgKbOlNaztLRUOXWBnHnZdQwDWwv7M0GgHwJ44,11229
|
5
5
|
lxml/apihelpers.pxi,sha256=4S__cOXO4gq5tsr453GJPeRdbqI5B830SFYsxyUPok0,65403
|
6
|
-
lxml/builder.cp312-win_amd64.pyd,sha256
|
6
|
+
lxml/builder.cp312-win_amd64.pyd,sha256=-nBoE-vvFJs-9iCVnQMFl-Dd5rfzYwAIhb5G8jtaThE,82944
|
7
7
|
lxml/builder.py,sha256=5P0LKYgwJws2fmKAZOr9gkqsBtY-lUC9LDF2W5B5Aik,8332
|
8
8
|
lxml/classlookup.pxi,sha256=rRtWHz9AajMqkm7RiG_PkOCsaQTRkgK757pRj3RvCxA,23015
|
9
9
|
lxml/cleanup.pxi,sha256=Zll_xQcmMBkUQtkWugiJ7TDQWPR0IHKjD5OesmQ0dB8,8669
|
@@ -12,30 +12,30 @@ lxml/debug.pxi,sha256=HdUEKw8hU1Wzz4nO3hheqrauZlPATsv7N4QPQxCdth4,3372
|
|
12
12
|
lxml/docloader.pxi,sha256=tP6b_zZ5s0-Zj2kf2mFksI8U5whArwOVDOVuaZcbgtM,5950
|
13
13
|
lxml/doctestcompare.py,sha256=1r23O3Ki1BypqzkVWh97FEdRq-ENvmFEWuABOWdE0Lo,18219
|
14
14
|
lxml/dtd.pxi,sha256=-M93Bx2WbDuyjTW1Btl2eG0U7q7YtkAU9sz9ZQ_5pa4,15706
|
15
|
-
lxml/etree.cp312-win_amd64.pyd,sha256=
|
16
|
-
lxml/etree.h,sha256=
|
17
|
-
lxml/etree.pyx,sha256=
|
18
|
-
lxml/etree_api.h,sha256=
|
15
|
+
lxml/etree.cp312-win_amd64.pyd,sha256=lIitINxl__BRGRZyDJNbIdKaOkkxIKWlzGgivRRazzc,4109824
|
16
|
+
lxml/etree.h,sha256=QRYm9jldpUZGAmLDcg96JAAUx9HT78fwugGaNJfR_iM,9912
|
17
|
+
lxml/etree.pyx,sha256=YpMcdi9rloD3VY-IEaiMD3LkE4_5sqF8Qb5atgqe1Nk,138193
|
18
|
+
lxml/etree_api.h,sha256=kVJ_gwZ1gF3GgGTpD324jh4RJSwSVX3XOqoNuoJur9o,17063
|
19
19
|
lxml/extensions.pxi,sha256=s3IkovN6q7I1lvAEs3rh7F-8TtTjTGXRSkptYV9012I,32921
|
20
20
|
lxml/iterparse.pxi,sha256=u-fbcHXv9WPz6aOnexe4Vwv5zHJz0-Gc8ScOL-qhcpQ,16965
|
21
|
-
lxml/lxml.etree.h,sha256=
|
22
|
-
lxml/lxml.etree_api.h,sha256=
|
21
|
+
lxml/lxml.etree.h,sha256=J3HizGvn9U8cWP2IcbQdbZ7hOl_6dC0aD-dO-YiRfAM,10160
|
22
|
+
lxml/lxml.etree_api.h,sha256=oH-6NWIKKxpOKXvnDG371oiiZ_Z5n2rCfY1ivKaUXIM,17263
|
23
23
|
lxml/nsclasses.pxi,sha256=9TiZjPbP73H8VN0Xu1RmuRB7G-D0pTTSqLPbdTJQt5U,9410
|
24
|
-
lxml/objectify.cp312-win_amd64.pyd,sha256=
|
24
|
+
lxml/objectify.cp312-win_amd64.pyd,sha256=tJyeYgZy1S3jsuoXNrc6wdMViHiNz7_HYSQPRUqjsC4,1756672
|
25
25
|
lxml/objectify.pyx,sha256=IngqdSCtxUav_NklHutFR92AuuNfr9nYchEY3Zprchc,77880
|
26
26
|
lxml/objectpath.pxi,sha256=og7LX-a88RrgJI3lUAtuJ8Hvx4RpNf57k7pmafzCuCA,11782
|
27
|
-
lxml/parser.pxi,sha256=
|
27
|
+
lxml/parser.pxi,sha256=ZvW9H2aa96jnMDG0_lsbkwijRnOYqVUfiveji_EF7KM,84040
|
28
28
|
lxml/parsertarget.pxi,sha256=0gZ5eLJ2hQ8tSApFEQx1PfzaiPqRuaRxD_GwKODIzEc,6506
|
29
29
|
lxml/proxy.pxi,sha256=phoeHZwmrN6LF3W57V5J-72ZPhGxdpI0TxgzVlD5pyU,24316
|
30
30
|
lxml/public-api.pxi,sha256=NT9BUTPhf0ZxLKm61xKT4SVmWxbb5aImmNIeTJdXNRs,6844
|
31
31
|
lxml/pyclasslookup.py,sha256=jDGYrbxuKE3Hl07PbILX_ptLkQaXYrpJSgvil4hIs3s,95
|
32
32
|
lxml/readonlytree.pxi,sha256=W3RXFM2aUGM8ZswTBP5EUW-wT1n6x7fpEGloQQa5cPE,19541
|
33
33
|
lxml/relaxng.pxi,sha256=rjTfl-rBYlHqQv4nfxVK8KZR59KqKWQp9lZv3aKYXVk,6504
|
34
|
-
lxml/sax.cp312-win_amd64.pyd,sha256=
|
34
|
+
lxml/sax.cp312-win_amd64.pyd,sha256=9OhBBjt4ZNV_3hjI2fzNfebpuumY7fJ2XA44vee24sU,129536
|
35
35
|
lxml/sax.py,sha256=8YlAeeVyPL-ksvIDkOZ7HlXSvwByoiMaIujzN4nTjQw,9578
|
36
36
|
lxml/saxparser.pxi,sha256=HWkubajdSI7_SwKO1vu0uOHTljXU6NZhhBfEdEd06R8,34197
|
37
37
|
lxml/schematron.pxi,sha256=STQpiSEjL81MVePjobPhhWYJEH2KucWW519NFiWpSG8,6076
|
38
|
-
lxml/serializer.pxi,sha256=
|
38
|
+
lxml/serializer.pxi,sha256=YbLINzPWp3KeshHc0R5R-FoHBLT2Eu7zqF6byr0HOwE,67534
|
39
39
|
lxml/usedoctest.py,sha256=cn3rXeL3F-ISj-HXNL9g4EwciH60b9NcZjXIRAF31iM,243
|
40
40
|
lxml/xinclude.pxi,sha256=DTre_KYISt1rzbf_qS75ix-ZbruSBnefIfNs4AqvF-M,2523
|
41
41
|
lxml/xmlerror.pxi,sha256=VFEO6Tn2RMVjKF9SXE15piak23lMaNrvE2pqT0hxfFw,51508
|
@@ -52,7 +52,7 @@ lxml/html/_setmixin.py,sha256=6cUyIeiMIn5zUytcWHsdWZXyMJXVsfJVVQoAIIe9h7Q,1244
|
|
52
52
|
lxml/html/builder.py,sha256=X4-ZNqczoi9h035AN-4BmfSYDfsVyKpXXGsYPUFAh48,4625
|
53
53
|
lxml/html/clean.py,sha256=B_rsm3Mz7pn_Z8LnkXeSocL257--sqWJGaxBp2LlmB8,524
|
54
54
|
lxml/html/defs.py,sha256=w_8kGoMweUNZxTjQ9UlMeUo8wyTTvzjDG4ub24j8RRg,4371
|
55
|
-
lxml/html/diff.cp312-win_amd64.pyd,sha256=
|
55
|
+
lxml/html/diff.cp312-win_amd64.pyd,sha256=nb5G5ikoByowlWH4_isARoxpyWKEB_9vVZlVvaFpDOo,276480
|
56
56
|
lxml/html/diff.py,sha256=Nygvg_a29fblqyj07CeCtl9_OV3AWPFTBjwqEOk8-PM,31271
|
57
57
|
lxml/html/formfill.py,sha256=8yXFIO4DNVY-HG8q4O4OtxIQ8qmLpXYQ8T1rFUTkK8c,9980
|
58
58
|
lxml/html/html5parser.py,sha256=iupCVDO_6I1PNWstkE6omdDh-rEc0KMaIXo1OCP9noM,8894
|
@@ -66,7 +66,7 @@ lxml/includes/dtdvalid.pxd,sha256=VOt94bqe417bxvfkfbtbsd5kVnwQj4oYSHMfnV2pcsM,70
|
|
66
66
|
lxml/includes/etree_defs.h,sha256=XXz1CliDqEBPvxGNtnmYEwE6D1Xtdib1sMk9JvvkHDM,14624
|
67
67
|
lxml/includes/etreepublic.pxd,sha256=s2HRJSuZhwlDi3oHsSBPChA4dgTnWjWWMzBb3VxrtJw,10421
|
68
68
|
lxml/includes/htmlparser.pxd,sha256=UEV2wIp8RHekwUAcPWMQe8KBfEv39u0c3LHOsdvRr0k,2858
|
69
|
-
lxml/includes/lxml-version.h,sha256=
|
69
|
+
lxml/includes/lxml-version.h,sha256=JoCAFYAZF1jSruKARv6rORoeQ7HN07_Nal3h4dD83dM,74
|
70
70
|
lxml/includes/relaxng.pxd,sha256=H5W5XObI5YtRpULeiRy6K6ldUZC0tDQauAFZ7PJSqE4,2679
|
71
71
|
lxml/includes/schematron.pxd,sha256=JmKDG9ElNPXJ7rZzOpQjPaIdzIZ1pzMEOT_GjZRK98U,1638
|
72
72
|
lxml/includes/tree.pxd,sha256=Uo6hPybaSgh6P9YdQfpr0mftCrSyYZ_w_Z0FyCtOr1c,20885
|
@@ -157,7 +157,7 @@ lxml/includes/libxslt/xsltconfig.h,sha256=xIsNA5sg1jT91U7MDQFvMSYhpY5LenQ9lMbQoe
|
|
157
157
|
lxml/includes/libxslt/xsltexports.h,sha256=GdcJL2oHi344GornuG2iAT27yqI48L9eim0ScAj9ywg,1188
|
158
158
|
lxml/includes/libxslt/xsltlocale.h,sha256=uAGe_73hvCZP5mDvHCHgcMvbdJ7FbHHSzCDInfuDub8,986
|
159
159
|
lxml/includes/libxslt/xsltutils.h,sha256=KD208ptsQHrHB1Du4biZU2iZM0Yb6M7c2SPJtjo46JE,9428
|
160
|
-
lxml/isoschematron/__init__.py,sha256
|
160
|
+
lxml/isoschematron/__init__.py,sha256=Ci8JiaKxfvu-hMRh7IP27TFhM03iEQ8CJoNsdXjLoM8,13622
|
161
161
|
lxml/isoschematron/resources/rng/iso-schematron.rng,sha256=cCM4qpfuTYAVtukjxlobPMlJ8nZ-au7DgONS2g4rYO4,19046
|
162
162
|
lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl,sha256=gy-E6xR2p35SK9wXFThraPJEI9NdoITNHd4xmqy7oxY,3247
|
163
163
|
lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl,sha256=QweRrIIM-zFcgg98GXA2CaWfIbgVE0XKEeYSfvv67A0,4563
|
@@ -167,9 +167,9 @@ lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl
|
|
167
167
|
lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl,sha256=Vo1F576odRkdLBmuEEWrLa5LF3SMTX9B6EEGnxUbv_8,73560
|
168
168
|
lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl,sha256=UI7xHx0leNXS9BaU6cyQ4CHeflufKmAE-zjOrihuH-E,20970
|
169
169
|
lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt,sha256=OGLiFswuLJEW5EPYKOeoauuCJFEtVa6jyzBE1OcJI98,3310
|
170
|
-
lxml-5.
|
171
|
-
lxml-5.
|
172
|
-
lxml-5.
|
173
|
-
lxml-5.
|
174
|
-
lxml-5.
|
175
|
-
lxml-5.
|
170
|
+
lxml-5.3.0.dist-info/LICENSE.txt,sha256=tircdrXghpYNqK2q-tqeBOMqrzXhzLFM71dCQFqu0nw,1517
|
171
|
+
lxml-5.3.0.dist-info/LICENSES.txt,sha256=zlP1CNDLiL20Yh4jbKNIgaP6GAX5ffzPOJYBKKTi6tk,1543
|
172
|
+
lxml-5.3.0.dist-info/METADATA,sha256=r9F6Kd6CTnaArO4ebcIKDj2E8FGzIR7mDgkjPLz87lM,3888
|
173
|
+
lxml-5.3.0.dist-info/WHEEL,sha256=KNRoynpGu-d6mheJI-zfvcGl1iN-y8BewbiCDXsF3cY,101
|
174
|
+
lxml-5.3.0.dist-info/top_level.txt,sha256=NjD988wqaKq512nshNdLt-uDxsjkp4Bh51m6N-dhUrk,5
|
175
|
+
lxml-5.3.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|