Fix: Widen lxml dependency ceiling (resolves #2019)fix: widen lxml dependency ceiling to allow lxml>=6.x, fixing scrapli…#2050
Open
mrinal22258 wants to merge 1 commit into
Conversation
Author
|
Hi @ntohidi, I noticed your feedback on the dependency upgrade PR about splitting the changes into smaller PRs. I already opened this focused PR (#2050), which only widens the If this issue is still open and this approach aligns with the project's direction, I'd appreciate it if you could take a look when you have time. If there's anything you'd like changed, I'm happy to update it. If this is no longer needed or another fix has already been merged, just let me know and I'll close the PR accordingly. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2019
Root Cause
Currently,
crawl4aipinslxmlto~=5.3(resolving to>=5.3,<6.0). However, packages commonly co-installed alongside it, such asscrapling(used for bypassing bot detection), requirelxml>=6.1.1.Because these two ranges have zero overlap:
version solving failed.lxml 5.4.0last, silently breaking whichever package expected6.xAPI compatibility.In addition, the rigid
<6.0pin causes build failures on Python 3.14 (#1903) where prebuilt wheels for 5.x are not available and compiling from source fails, whereaslxml>=6.0.2has been confirmed to work.Proposed Changes
We widen the constraint to
lxml>=5.3,<7. This sets a safe upper ceiling under version 7.0 while allowing6.xversions to be successfully resolved.Dependency Diff
Verification & Testing
Pip Co-installation: Verified in a clean virtual environment:
Poetry Resolution: Verified in a clean Poetry project:
Test Suite: Ran the regression extraction strategies and GFM table parsing tests to ensure no APIs broke between lxml 5.x and 6.x:
Note: This change may also resolve or mitigate Python 3.14 build issues described in #1903 by allowing the compiler/resolver to pick a newer lxml wheel, though this has not been independently verified on Python 3.14.