Accept .lock files (e.g. uv.lock) in file-extension validation - #228
Open
priya-sundaram-dev wants to merge 1 commit into
Open
Accept .lock files (e.g. uv.lock) in file-extension validation#228priya-sundaram-dev wants to merge 1 commit into
.lock files (e.g. uv.lock) in file-extension validation#228priya-sundaram-dev wants to merge 1 commit into
Conversation
Lock files such as uv.lock are committed to keep CI reproducible. A transitive dependency bump (e.g. bumping the pinned typing-extensions so the build passes on a new Python) lives only in uv.lock, which the file extension check previously rejected as an invalid file. Add .lock to the accepted extensions so those PRs are allowed, with a test covering it.
cclauss
approved these changes
Aug 29, 2026
cclauss
left a comment
Member
There was a problem hiding this comment.
@dhruvmanila Your review please. @priya-sundaram-dev has been doing great work on modernizing the Python repo and could be unblocked by this change to the keeper.
Thanks for all your wonderful achievements since we met working on the repo!
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.
As discussed with @cclauss in TheAlgorithms/Python#15105, the changed-file extension check currently rejects any PR that touches
uv.lock, because.lockis not inACCEPTED_EXTENSIONS.uv.lockis committed to keep CI reproducible, and some fixes live only there — e.g. bumping the pinned transitivetyping-extensionsso the build passes on a new Python release. Those PRs are currently blocked by the keeper even though they're legitimate.Change: add
.locktoPythonParser.ACCEPTED_EXTENSIONS(coversuv.lock,poetry.lock, etc.) and add a test case assertinguv.lockis now valid..pyfiles are parsed), so this only affects the file-validity check.Ref: TheAlgorithms/Python#15105