Code Monkey home page Code Monkey logo

Comments (5)

jonathangreen avatar jonathangreen commented on July 28, 2024 1

@scoder is there a way check what version of libxml2 lxml is using via the C api?

Maybe a way to approach this is to check the libxml2 version being used by both lxml and xmlsec and raise and exception if it is not compatible.

It's not as elegant as your suggestion but it seems like an easier change to make and it would at least alert users of the issue instead of having to try to figure out what is causing a segfault.

from python-xmlsec.

akx avatar akx commented on July 28, 2024

Looks like python-xmlsec uses both the libxml APIs and the lxml C API ๐Ÿ˜…

Unfortunately it looks like this repo is pretty unmaintained at the moment (but here's hoping someone steps up to do something about that!).

from python-xmlsec.

eljeffeg avatar eljeffeg commented on July 28, 2024

I think @jimjag is gonna fork it. ๐Ÿ™

from python-xmlsec.

yhlee-tw avatar yhlee-tw commented on July 28, 2024

@jonathangreen does it have to be C API?

from lxml import etree

print("%-20s: %s" % ('libxml used',      etree.LIBXML_VERSION))
print("%-20s: %s" % ('libxml compiled',  etree.LIBXML_COMPILED_VERSION))

from https://lxml.de/1.3/FAQ.html#i-think-i-have-found-a-bug-in-lxml-what-should-i-do

That's how I am testing a few combinations on macOS today with your xmlsec.get_libxml_version() in 3191662

from python-xmlsec.

jonathangreen avatar jonathangreen commented on July 28, 2024

@yhlee-tw it would be much easier if we could do the comparison in python but unfortunately the integration with lxml is done via the lxml c api. There really isn't any python code as part of this package.

I took a look at the lxml c api and I don't see a way to get the libxml2 version being used, but I was hoping @scoder or someone more familiar with the lxml c api might have a suggestion.

from python-xmlsec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.