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

Handle changed behaviour of lxml addnext method #484

Merged
merged 4 commits into from
Jan 23, 2024

Conversation

knit-bee
Copy link
Contributor

I removed the two usages of addnext and replaced them by insert. The code is maybe a bit harder to read now, but I thought this would be easier than to check the lxml version or how tails are handled by the addnext method.

I had to adjust two test cases, since some elements now have whitespace instead of None as tail. However, I thought this to be an acceptable change in behaviour.

I tested the changes with lxml==4.9.4 and lxml==5.1.0 and it works with both versions.

Luise Köhler added 3 commits January 23, 2024 11:47
Some tails on elements now contain whitespace instead of None, affected test cases where changed
to reflect this behaviour.
Copy link

codecov bot commented Jan 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (eec05b2) 97.06% compared to head (e9b33e1) 97.06%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #484   +/-   ##
=======================================
  Coverage   97.06%   97.06%           
=======================================
  Files          22       22           
  Lines        3404     3408    +4     
=======================================
+ Hits         3304     3308    +4     
  Misses        100      100           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adbar adbar linked an issue Jan 23, 2024 that may be closed by this pull request
@adbar
Copy link
Owner

adbar commented Jan 23, 2024

Everything works great, thanks!

@adbar adbar merged commit c703271 into adbar:master Jan 23, 2024
16 checks passed
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.

Update LXML to version 5.1+
2 participants