-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replace git command use with dulwich #5428
Merged
Merged
Conversation
This file contains 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
abn
force-pushed
the
use-dulwich
branch
2 times, most recently
from
April 8, 2022 21:09
c1ffb89
to
ceec851
Compare
This was referenced Apr 8, 2022
Closed
abn
force-pushed
the
use-dulwich
branch
2 times, most recently
from
April 9, 2022 00:09
6f2feb3
to
2977953
Compare
3 tasks
abn
force-pushed
the
use-dulwich
branch
2 times, most recently
from
April 9, 2022 01:56
2ec33e8
to
169ee84
Compare
finswimmer
previously requested changes
Apr 9, 2022
abn
force-pushed
the
use-dulwich
branch
8 times, most recently
from
April 11, 2022 08:42
8c0203e
to
6ced292
Compare
3 tasks
hi, any news for this issue ? we really need this fix |
abn
force-pushed
the
use-dulwich
branch
2 times, most recently
from
April 28, 2022 01:44
c8a816c
to
0a35fcc
Compare
finswimmer
requested changes
Apr 29, 2022
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. |
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-client
configuration for users needing a escape hatch.poetry config experimental.system-git-client true
Resolves: #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}/src
instead of{virtual-env}/src
as provider does not have the environment available at that time