fix: remove dead code from utils and adaptive_crawler#2042
Open
RajanChavada wants to merge 7 commits into
Open
fix: remove dead code from utils and adaptive_crawler#2042RajanChavada wants to merge 7 commits into
RajanChavada wants to merge 7 commits into
Conversation
fix(docker): make read-only tmpfs writable
fix: close browser contexts from snapshot
adaptive_crawler copy.py was an uncommitted editor artifact that ended up tracked in the repo. It is byte-for-byte identical to adaptive_crawler.py and is not imported anywhere.
Two unreachable functions in utils.py: - The first `normalize_url` (plain urljoin wrapper) was silently shadowed by the extended `normalize_url` defined ~20 lines later. Python last-write wins, so the first definition was never callable. - `normalize_url_tmp` was a hand-rolled URL joiner (string split on "/") with no callers outside utils.py itself. `urllib.parse.urljoin` already covers this correctly.
Author
|
Requesting a review on this PR (tagging @unclecode) as the lead maintainer :) |
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.
Summary
Please include a summary of the change and/or which issues are fixed.
Removes unreachable and abandoned code that accumulated over time. No behaviour change.
List of files changed and why
crawl4ai/adaptive_crawler copy.py: editor artifact committed by mistake; byte-for-byte duplicate ofadaptive_crawler.py, not imported anywhere. Deleted.crawl4ai/utils.py: two deadnormalize_urlvariants removed:normalize_urldefinition was silently shadowed by the extended definition ~20 lines below it.Python last-write wins, so it was never callable.
normalize_url_tmphad zero callers outsideutils.pyitself and reimplemented whaturllib.parse.urljoinalreadydoes correctly.
How Has This Been Tested?
Existing test suite passes (pytest). No callers of removed code exist -> confirmed by grep across the full codebase before removal.
extract_xml_data_legacy(also "legacy"-named) was left in place becausetests/regression/test_reg_utils.pyuses it.Checklist: