Skip to content

Conversation

@mziv
Copy link

@mziv mziv commented Oct 13, 2025

Summary

Updates lxml dependency to 6.0.

List of files changed and why

To upgrade the lxml constraint and regenerate the lock file, these files were touched:
pyproject.toml
uv.lock

How Has This Been Tested?

Tested parsing markdown of websites locally.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added/updated unit tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Summary by CodeRabbit

  • Chores
    • Updated dependency constraint to allow the newer lxml 6.x series, so installations may pull a newer lxml on next update.
    • Minor dependency list formatting tweak (no behavioral impact).
    • No changes to public APIs or user-facing functionality; app behavior remains the same.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 13, 2025

Walkthrough

Change lxml version constraint in pyproject.toml from ~=5.3 to ~=6.0 and add a trailing comma to the final dependency entry; Shapely remains >=2.0.0. No other files or public interfaces changed.

Changes

Cohort / File(s) Summary
Dependency pinning & formatting
pyproject.toml
Update lxml constraint from ~=5.3 to ~=6.0; keep Shapely >=2.0.0; add trailing comma to the last dependency entry (formatting only).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I twitch my nose at versions new,
From five to six the change flew through.
A gentle comma rests at end,
The dependency list does mend.
Hop-hop—builds tidy, snug, and true. 🥕🐇

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title cleanly and concisely summarizes the primary change by indicating the dependency update for lxml without unnecessary detail or noise, making it clear to anyone scanning the history what this change accomplishes.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Description Check ✅ Passed The pull request description follows the repository’s template by including a clear summary of the change, a list of affected files with explanations, a concise testing section, and a populated checklist. The summary accurately describes the lxml dependency update and the file list matches the actual modifications. The testing section explains how the change was verified locally, and the checklist shows which items are complete or pending. All required sections are present and sufficiently detailed for review.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mziv mziv marked this pull request as ready for review October 13, 2025 20:51
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
pyproject.toml (1)

20-20: Use a compatible version constraint for lxml

Pinning to 6.0 prevents patch-level bugfix/security updates; loosen the constraint:

-    "lxml==6.0",
+    "lxml~=6.0",

(lxml 6.x requires Python ≥ 3.8, covering 3.9–3.13)

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e651e04 and c00cfa2.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • pyproject.toml (2 hunks)
🔇 Additional comments (1)
pyproject.toml (1)

48-48: Formatting-only touch on shapely entry looks fine

No semantic change detected; OK to keep.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c00cfa2 and 35ea6ad.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • pyproject.toml (2 hunks)
🔇 Additional comments (1)
pyproject.toml (1)

48-48: LGTM: trailing comma is fine

Trailing commas in TOML arrays are valid; no action needed.

"aiosqlite~=0.20",
"anyio>=4.0.0",
"lxml~=5.3",
"lxml~=6.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Confirm lxml 6.0 compat (Py3.9 and API removals); consider conditional spec if needed

Major-version bumps can break Python 3.9 and remove deprecated APIs. This may silently break users on 3.9 (classifiers list 3.9–3.13).

If lxml 6 drops 3.9 or you use removed APIs, use conditional markers to keep 5.x for older Pythons:

-    "lxml~=6.0",
+    "lxml~=6.0; python_version >= '3.10'",
+    "lxml>=5.3,<6; python_version < '3.10'",

Run these checks:

Also confirm lxml 6.0 Python support and breaking changes:


🏁 Script executed:

#!/bin/bash
# 1) Find lxml imports
ast-grep --pattern $'from lxml import $$$'
ast-grep --pattern $'import lxml'

# 2) Look for commonly removed/deprecated APIs
rg -nP --type=py -C2 '\b(getchildren|getiterator)\s*\('

# 3) Show declared Python support in this repo (for cross-check)
rg -nP -C2 'requires-python|Programming Language :: Python ::'

Length of output: 3071


🌐 Web query:

What Python versions are supported by lxml 6.0, and what breaking changes were introduced in lxml 6.0 release notes?

💡 Result:

Short answer

  • Supported Python: lxml 6.0 requires Python 3.8 or newer (binary wheels published for CPython 3.8–3.13 at release). [1][2]

Breaking / potentially breaking changes from the 6.0.0 release notes

  • Support for Python < 3.8 removed (upgrade your Python if still on 3.7 or older). [1][2]
  • Parsing directly from zlib/lzma-compressed data is no longer guaranteed (treated as optional and may be removed later). Code relying on automatic compressed-input parsing may break. [1]
  • New parser option decompress=False (changes default behavior for automatic input decompression once libxml2 ≥ 2.15 is used); code depending on automatic decompression must opt-in. [1]
  • Binary wheels use newer libxml2/libxslt versions that disable direct HTTP/FTP URL parsing — code that parsed URLs via libxml2 should switch to Python URL tools. [1]
  • Schematron class deprecated (will become non-functional in a future version). [1]
  • MemDebug.dump() and MemDebug.show() removed (libxml2 removed those). [1]

Sources
[1] lxml changelog / 6.0.0 (release notes).
[2] lxml PyPI release page for 6.0.0 (wheel interpreter tags and summary).


Update deprecated lxml APIs for 6.0
lxml 6.0 drops getchildren()/getiterator(); replace all el.getchildren() calls (e.g. use list(el) or el.iterchildren()) to prevent runtime errors. No Python version markers needed—lxml 6.0 supports Python 3.9+.

🤖 Prompt for AI Agents
In pyproject.toml around line 20, the project pins lxml~=6.0 which removes
deprecated Element.getchildren()/getiterator() APIs; search the codebase for any
.getchildren() and .getiterator() usages and replace them with supported
equivalents (use list(el) or el.iterchildren() instead of el.getchildren(), and
el.iter() or el.iterchildren() instead of el.getiterator()), update any call
sites that rely on mutation semantics accordingly, run tests/lint to ensure no
regressions.

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.

1 participant