Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-Optional html5lib-modern introduces non-optional lxml dependency, defeats optional LXML. #2945

Open
ashleysommer opened this issue Oct 23, 2024 · 0 comments

Comments

@ashleysommer
Copy link
Contributor

html5lib used to be an optional dependency in RDFLib (installed with the extra named rdflib[html]).

When replacing it with html5lib-modern, I ran some tests with it installed and without, and I noticed there are a bunch of RDFLib tests that fail if html5lib is not installed. Loading any literal with datatype xsd:html causes a very complicated code path that ends with a runtime error, when html5lib is not installed. So I changed it to non-optional, html5lib-modern is always installed as a dependency of RDFLib, and there is no [html] extra anymore in RDFLib 7.1.0.

However I just noticed that html5lib (and html5lib-modern) both depend on lxml. And lxml is an Optional dependency in RDFLib (some users don't want that overhead). So I suppose thats why html5lib was optional too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@ashleysommer and others