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

v2.4.0 did not fix ImportError raised by lxml #40

Closed
waldeck-dev opened this issue Apr 1, 2024 · 0 comments · Fixed by #41
Closed

v2.4.0 did not fix ImportError raised by lxml #40

waldeck-dev opened this issue Apr 1, 2024 · 0 comments · Fixed by #41

Comments

@waldeck-dev
Copy link
Contributor

Hello,

The changes made on v2.4.0 do not fix the original issue (#38). When installing html_sanitizer as a dependency (using pip) we still have the same ImportError :

ImportError: lxml.html.clean module is now a separate project lxml_html_clean.
Install lxml[html_clean] or lxml_html_clean directly.

During pip install, we receive this warning:

Collecting lxml[html-clean]>=5.2.0 (from html_sanitizer>=2.4.0->-r .\req-htmls.txt (line 1))
  Obtaining dependency information for lxml[html-clean]>=5.2.0 from https://files.pythonhosted.org/packages/a7/64/eedb4435eb693812b9b517c6ce0beac932c1e45c4031df33688484fd83ea/lxml-5.2.0-cp311-cp311-win_amd64.whl.metadata
  Using cached lxml-5.2.0-cp311-cp311-win_amd64.whl.metadata (4.0 kB)
WARNING: lxml 5.2.0 does not provide the extra 'html-clean'

There seems to be a ongoing issue with pip (pypa/pip#11445) not properly resolving extras when they contain underscores.

waldeck-dev added a commit to waldeck-dev/html-sanitizer that referenced this issue Apr 1, 2024
Fixes matthiask#40

This PR drops dependency `lxml[html_clean]` since the extra is not resolved properly by `pip`.
Instead, we use both `lxml` (5.2.0) and `lxml-html-clean` (0.1.0).

Signed-off-by: Valentin <valentin@waldeck.dev>
matthiask pushed a commit that referenced this issue Apr 1, 2024
Fixes #40

This PR drops dependency `lxml[html_clean]` since the extra is not resolved properly by `pip`.
Instead, we use both `lxml` (5.2.0) and `lxml-html-clean` (0.1.0).

Signed-off-by: Valentin <valentin@waldeck.dev>
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

Successfully merging a pull request may close this issue.

1 participant