IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
This code has been broken and deprecated since version 2.6.0, released
in 2003. Because of a bug in commit 961b535c, DOCBparser.c was never
compiled since 2012. I couldn't find a Debian package using any of its
symbols, so it seems safe to remove this module.
Fix runtest and Python bindings when building --without-valid.
The Python tests still fail. There doesn't seem to be a mechanism to
disable tests depending on feature flags.
Define PY_SSIZE_T_CLEAN macro in python/libxml.c and cast the string
length (int len) explicitly to Py_ssize_t when passing a string to a
function call using PyObject_CallMethod() with the "s#" format.
In C, if expressions should be parenthesized.
PyLong_Check, PyUnicode_Check etc. happened to expand to a parenthesized
expression before, but that's not API to rely on.
Since Python 3.9.0a4 it needs to be parenthesized explicitly.
Fixes https://gitlab.gnome.org/GNOME/libxml2/issues/149
while still compiling on recent Python2:
- change the handling of files, tweak the generator, get the fd
instead of the FILE *, dup it and fdopen based on mode, add a
Release function on Python3 and call to flush from the generated
python stubs
- switch to using Capsules instead of CObjects
- fix PyString to PyBytes
- fix PyInt to PyLong
- tweak the module registration to compile on both versions
- drop PyInstance check for passed xmlNodes and instead check
attributes presence
Daniel
1. Setting entity loader does not increment the refcount on the Python object
passed in. This works only if the object is not deleted. For example, the
following code results in segmentation fault in Python interpreter when
attempting to process any document:
[[[
def register_entity_loader():
def entity_loader(URL, ID, ctxt):
...
libxml2.setEntityLoader(entity_loader
register_entity_loader()
]]]
2. setEntityLoader() does not verify if the passed object is callable. If it
is not, current implementation attempts to call it anyway and failing that,
silently moves on to default entity loader. Attached patch makes
setEntityLoader raise ValueError exception if non-callable object is
passed.
3. In debug mode, pythonExternalEntityLoader() outputs the result object to
stderr, while the messages before and after the object (description + newline)
go to stdout. Attached patch makes them all go to stdout.
It is possible to make xmlIO handle any protocol by means of
xmlRegisterInputCallback(). However, that function is currently only
available in C API. So, the natural solution seems to be implementing Python
bindings for the xmlRegisterInputCallback.
* python/generator.py: skip xmlPopInputCallbacks
* python/libxml.c python/libxml.py python/libxml_wrap.h: implement the
wrappers
* python/tests/input_callback.py python/tests/Makefile.am: also add a test case
* SAX2.c dict.c error.c hash.c nanohttp.c parser.c python/libxml.c
relaxng.c runtest.c tree.c valid.c xinclude.c xmlregexp.c xmlsave.c
xmlschemas.c xpath.c xpointer.c: mostly removing unneded affectations,
but this led to a few real bugs and some part not yet understood
(relaxng/interleave)
* trionan.c: Borland C fix from Moritz Both
* testapi.c: regenerate, workaround a problem for buffer testing
* xmlIO.c HTMLtree.c: new internal entry point to hide even better
xmlAllocOutputBufferInternal
* tree.c: harden the code around buffer allocation schemes
* parser.c: restore the warning when namespace names are not absolute
URIs
* runxmlconf.c: continue regression tests if we get the expected
number of errors
* Makefile.am: run the python tests on make check
* xmlsave.c: handle the HTML documents and trees
* python/libxml.c: convert python serialization to the xmlSave APIs
and avoid some horrible hacks
Daniel
svn path=/trunk/; revision=3790
* xmlschemas.c runtest.c testapi.c include/libxml/xmlreader.h
python/types.c python/libxml_wrap.h python/libxml.c: fx compilation
when configured without the reader should fix#513110
* doc/*: regenerated
Daniel
svn path=/trunk/; revision=3743
* python/libxml.c: fix a memory leak in the python string handling
when SAX event are passed back to the python handlers
Daniel
svn path=/trunk/; revision=3573
* python/libxml.c, python/libxml.py, python/tests/compareNodes.py,
python/tests/Makefile.am:
Added code submitted by Andreas Pakulat to provide node
equality, inequality and hash functions, plus a single
test program to check the functions (bugs 345779 + 345961).
* python/libxml.c python/libxml.py: applied patch from Brent Hendricks
adding namespace removal at the python level #300209
* python/tests/Makefile.am python/tests/nsdel.py: added the regression
test
Daniel
* Makefile.am doc/examples/Makefile.am python/tests/Makefile.am
xstc/Makefile.am: try to fix a problem with valgrind.
* python/generator.py python/libxml.c python/tests/Makefile.am
python/tests/tstmem.py: applied memory leak fix from Brent Hendricks
c.f. bug #165349
Daniel
* python/generator.py python/libxml.c python/libxml2class.txt
python/libxml_wrap.h python/types.c: Applied patch from Brent
Hendricks adding support for late DTD validation.
* python/tests/Makefile.am python/tests/dtdvalid.py
python/tests/test.dtd: integrated the provided regression test
Daniel
* python/libxml.c: register xmlSchemaSetValidErrors, patch from
Brent Hendricks in the mailing-list
* include/libxml/valid.h HTMLparser.c SAX2.c valid.c
parserInternals.c: fix#156626 and more generally how to find out
if a validation contect is part of a parsing context or not. This
can probably be improved to make 100% sure that vctxt->userData
is the parser context too. It's a bit hairy because we can't
change the xmlValidCtxt structure without breaking the ABI since
this change xmlParserCtxt information indexes.
Daniel
* python/generator.py python/libxml.c python/tests/outbuf.py:
applied patch from Malcolm Tredinnick fixing bug #154294
related to saving to python file objects.
Daniel
* xmllint.c xpath.c include/libxml/xpath.h
include/libxml/xpathInternals.h python/libxml.c
python/libxml_wrap.h: trying to remove some warning when compiling
on Fedora Core 3 and 64bits
Daniel
* xmlschemas.c include/libxml/xmlschemas.h python/generator.py
python/libxml.c python/libxml_wrap.h python/types.c
python/tests/schema.py python/tests/Makefile.am: Applied patch
from Torkel Lyng to add Schemas support to the Python bindings
and extend the schemas error API, registered a new test.
* doc/* elfgcchack.h: rebuilt to regenerate the bindings
Daniel
* python/generator.py: added a check on the argument for some
classes (e.g. xmlDoc and xmlNode) to prevent a segfault (as
reported on the list). Further enhancement should be done
to auto-create the appropriate object.
* python/libxml.c: minor fix for a warning message; added a
routine, currently not used, to report the description of a
PyCObject.
* python/libxml2class.txt: regenerated
* python/libxml.c: Changed the number of XPath extension functions
allowed to be variable-length (patch supplied by Marc-Antoine
Parent, bug 143805). Added code to "unregister" the functions
when the parser cleanup takes place.
* xmlmemory.c python/libxml.c python/libxml2-python-api.xml:
some updates with memory debugging facilities while messing
with libxslt python bindings
Daniel
* python/libxml.c python/generator.py python/libxml.py
python/libxml2-python-api.xml python/libxml2class.txt:
applied patch from Stphane Bidoul to fix some Python bindings
initialization, then had to change the parserCleanup()
to handle memory released there.
* xmlmemory.c: added more debugging comments.
Daniel