Remove the beautifulsoup4 dependency
🙂 Looking for an issue? Welcome! This issue is open for contribution. If this is the first time you’re requesting an issue, please:
- Read Contributing guidelines carefully. Pay extra attention to Using generative AI. Pull requests and comments that don’t follow the guidelines won’t be answered.
- Confirm that you’ve read the guidelines in your comment.
Overview
build_tools/install_cexts.py is the only code that imports beautifulsoup4. It uses it only to collect <a> tags from a PyPI/piwheels simple-index page. The pin is held at 4.8.2 because 4.15.0 dropped Python 3.6, which broke the 3.6 CI jobs in #15450.
Complexity: Low Target branch: develop
Context
- Inline script dependency:
install_cexts.py#L3 - Uses:
find_all("a")/.stringinparse_package_pageandBeautifulSoup(r.content, "html.parser") - The
testgroup pin inpyproject.toml#L108exists becausetest/test_install_cexts.pyimports the script. - The script runs via
uv run --script(make staticdeps-cext) and declaresrequires-python = ">=3.6".
The Change
install_cexts.pyshould extract wheel link names from the index page using only the standard library, so thatbeautifulsoup4can be dropped everywhere.
Acceptance Criteria
- [ ] No
bs4/beautifulsoup4reference remains inbuild_tools/,test/,pyproject.toml, oruv.lock. - [ ]
install_cexts.pystill runs on Python 3.6. - [ ]
parse_package_pageselects the same wheels as before from a real PyPI simple-index page for a package inrequirements/cext.txt. - [ ] Unit tests cover link extraction from a sample index page, including non-
.whllinks being skipped. - [ ] Python tests pass on all CI Python versions, including 3.6.
AI usage
@rtibbles asked for this follow-up on #15450. Claude Code (rtibblesbot) traced the bs4 usages on develop and drafted the issue.
Hi! 👋
This issue is available for contribution and supports self-assignment. Here's how to get started:
- Comment
/assignto assign yourself to this issue - You can have up to 2 issues assigned at a time across all community repos
- Dropping an issue has a 7-day cooldown before the slot opens up
- Link your pull request to this issue when you submit it
📖 Read the Contributing guidelines before starting.
Are you preparing for Google Summer of Code? See our GSoC guidelines.
/assign
Hi! 👋
You've been assigned to this issue. Here's what to do next:
- Read the issue description carefully and make sure you understand the requirements
- Link your pull request to this issue when you submit it
- If you can no longer work on this, unassign yourself so others can pick it up
Good luck! 😊
Are you preparing for Google Summer of Code? See our GSoC guidelines.