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

Use cssselect2 instead of cssselect + lxml #485

Merged
merged 15 commits into from
Jul 11, 2017
Merged

Use cssselect2 instead of cssselect + lxml #485

merged 15 commits into from
Jul 11, 2017

Conversation

liZe
Copy link
Member

@liZe liZe commented Jul 7, 2017

Using cssselect2 makes WeasyPrint free from lxml (close #440), and gives us hope on our long way to close #57. A lot of things in the private API have changed, mainly to bring the base URL everywhere, but there's no real big change.

The only real downside is the loss of the source line in various logging messages. ElementTree and html5lib don't store the sourceline attributes in elements (see html5lib/html5lib-python#97), WeasyPrint can't do anything without this.

If anyone is interested in this change (and in cssselect2), please read Kozea/cssselect2#5. And don't hesitate to contribute if you're interested in CSS Selectors Level 4!

@liZe liZe added this to the v0.40 milestone Jul 7, 2017
@liZe
Copy link
Member Author

liZe commented Jul 11, 2017

Let's go!

@liZe liZe merged commit 140522c into master Jul 11, 2017
@liZe liZe deleted the cssselect2 branch July 11, 2017 16:15
@SimonSapin SimonSapin mentioned this pull request Jul 11, 2017
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 this pull request may close these issues.

Get rid of lxml dependency Named pages
2 participants