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

Fix test in combination with lxml 5+ due to namespace changes. #88

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

mauritsvanrees
Copy link
Member

In this example, an xpath /html/body/include cannot be found because lxml 5 sees it as /html/body/esi:include, but this cannot easily be used as an xpath.

Fixes #87

In this example, an xpath `/html/body/include` cannot be found because lxml 5 sees it as `/html/body/esi:include`, but this cannot easily be used as an xpath.
Fixes #87
@mister-roboto
Copy link

@mauritsvanrees thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

@mauritsvanrees
Copy link
Member Author

@jenkins-plone-org please run jobs

@mauritsvanrees mauritsvanrees requested a review from lrowe April 23, 2024 21:58
mauritsvanrees added a commit to plone/buildout.coredev that referenced this pull request Apr 23, 2024
* We are using verion 4 until now.
* Version 5 gives a test error in Diazo.  That is fixed in plone/diazo#88.
* In lxml 5.2.0 and higher, `lxml.html.clean` was factored out into an extra package, and not pulled in by default.  Fixed by plone/Products.PortalTransforms#62.
* This coredev PR for 6.0 checks out branches for those two packages, it updates lxml to latest, and it adds a pin for the new `lxml_html_cleaner` package.

Once green, this PR should not be merged, because we do not want to use those PR branches.
The right order would be something like this:

* Merge the Diazo PR, it is fine for lxml 4 and 5.
* Add `lxml-html-clean = 0.1.1` to the versions in 6.0 and 6.1.
* Merge the PortalTransforms PR, which then pulls in the new package without giving an error for a missing version pin.
* Update the lxml version to latest 5.2.1.
@mauritsvanrees mauritsvanrees merged commit abff129 into master Apr 24, 2024
11 checks passed
@mauritsvanrees mauritsvanrees deleted the maurits-fix-tests-lxml-5 branch April 24, 2024 18:45
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.

ESI test fails with lxml 5 due to namespace changes
3 participants