Closed
Conversation
PEELED_TAG_SUFFIX was renamed in dulwich 0.21.2: jelmer/dulwich@beb8f959 but it was kept for backwards compatibility until it was completely removed in 0.25.0: jelmer/dulwich@b5674746 In 0.25, it also moved to dulwich.protocol.
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates Poetry’s Git backend to be compatible with dulwich 0.25 by switching from the removed ANNOTATED_TAG_SUFFIX constant to the new PEELED_TAG_SUFFIX and bumping the dulwich dependency range accordingly. Class diagram for git backend changes using PEELED_TAG_SUFFIXclassDiagram
class GitBackendModule {
+annotated_tag(ref) bytes
+_clone(url, refspec, target) Repo
}
class DulwichProtocol {
<<external>>
+PEELED_TAG_SUFFIX bytes
}
GitBackendModule ..> DulwichProtocol : uses PEELED_TAG_SUFFIX
class annotated_tag {
+ref str_or_bytes
+return bytes
}
class _clone {
+url str
+refspec GitRefSpec
+target Path
+return Repo
}
GitBackendModule o-- annotated_tag : defines
GitBackendModule o-- _clone : defines
annotated_tag ..> DulwichProtocol : appends PEELED_TAG_SUFFIX
_clone ..> DulwichProtocol : filters refs not ending with PEELED_TAG_SUFFIX
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
- Since
PEELED_TAG_SUFFIXmoved todulwich.protocolin 0.25, make sure the imports are updated accordingly and thatANNOTATED_TAG_SUFFIXis removed or no longer referenced anywhere in the codebase. - Given the minimum dulwich version is now 0.25, consider checking whether any other dulwich APIs used in this module changed between 0.24 and 0.25 to avoid subtle runtime issues (e.g., renamed or relocated symbols).
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Since `PEELED_TAG_SUFFIX` moved to `dulwich.protocol` in 0.25, make sure the imports are updated accordingly and that `ANNOTATED_TAG_SUFFIX` is removed or no longer referenced anywhere in the codebase.
- Given the minimum dulwich version is now 0.25, consider checking whether any other dulwich APIs used in this module changed between 0.24 and 0.25 to avoid subtle runtime issues (e.g., renamed or relocated symbols).Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Contributor
Author
|
seems like mypy has exploded. Perhaps this is less ready than I thought. I won't be able to update the annotations if they are caused by new dulwich types :/ EDIT: They are. Changes like this are needed, but not all of them re so trivial + from dulwich.refs import HEADREF, Ref
...
- ref: bytes = dataclasses.field(default_factory=lambda: b"HEAD")
+ ref: Ref = dataclasses.field(default_factory=lambda: HEADREF) |
Member
|
Superseded by #10674 |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
PEELED_TAG_SUFFIX was renamed in dulwich 0.21.2: jelmer/dulwich@beb8f959 but it was kept for backwards compatibility until it was completely removed in 0.25.0: jelmer/dulwich@b5674746
In 0.25, it also moved to dulwich.protocol.
Pull Request Check List
Summary by Sourcery
Update Git backend to use the renamed peeled tag suffix from dulwich and bump the dulwich dependency to the 0.25.x series.
Enhancements:
Build: