replace git command use with dulwich#5428
Merged
abn merged 4 commits intopython-poetry:masterfrom May 2, 2022
Merged
Conversation
c1ffb89 to
ceec851
Compare
This was referenced Apr 8, 2022
Closed
6f2feb3 to
2977953
Compare
2ec33e8 to
169ee84
Compare
finswimmer
previously requested changes
Apr 9, 2022
8c0203e to
6ced292
Compare
3 tasks
|
hi, any news for this issue ? we really need this fix |
c8a816c to
0a35fcc
Compare
finswimmer
requested changes
Apr 29, 2022
Member
Author
|
Will need to manage conflict once #5510 is merged. |
This change introduces dulwich as the git backend, instead of system git executable. Together with an LRU cache when inspecting git package, this considerable improves performance for dependency solver and reuse of source when project has git dependencies. In cases where dulwich fails with an HTTPUnauthorized error, Poetry falls back to system provided git client as a temporary measure. This will be replaced in the future once dulwich supports git credentials.
This change introduces the config option `experimental.system-git-client` defaulting to `false`. When set to `true`, the subprocess git client implementation is used when cloning a remote repository. This option will be removed in a future release.
finswimmer
approved these changes
May 2, 2022
This was referenced May 5, 2022
1 task
2 tasks
This was referenced May 30, 2022
Closed
Merged
Closed
3 tasks
|
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.
This change introduces dulwich as the git backend, instead of system git executable. Together with an LRU cache when inspecting git package, this considerable improves performance for dependency solver and reuse of source when project has git dependencies.
In cases where dulwich fails with an HTTPUnauthorized error, Poetry falls back to system provided git client as a temporary measure. This will be replaced in the future once dulwich supports git credentials.
As an effect of this, Poetry no longer relies on the subprocess git client implemented in
poetry-core. This can be removed as soon as core decouples its auto-excluded files detection from git CLI's ignored file listing.In this change, we also introduce the
experimental.system-git-clientconfiguration for users needing a escape hatch.poetry config experimental.system-git-client trueResolves: #4629
Resolves: #5002
Resolves: #3392
Resolves: #2475
Resolves: #5188
Resolves: #5105
Resolves: #5493
Resolves: #4152
Resolves: #4678
Resolves: #2694
Example Improvement
When updating a project with git dependency things are much faster.
Testing
Using pipx
pipx install --suffix=@5428 'poetry @ git+https://github.com/python-poetry/poetry.git@refs/pull/5428/head'Using a container (podman | docker)
To Do
Future Improvements
currently source clones when solving uses{cache-dir}/srcinstead of{virtual-env}/srcas provider does not have the environment available at that time