astral-sh / uv

An extremely fast Python package and project manager, written in Rust.
https://docs.astral.sh/uv
Apache License 2.0
21.5k stars 631 forks source link

Git prompt hidden without `--verbose` flag #5107

Open zanieb opened 2 months ago

zanieb commented 2 months ago

The following command hung for a while:

❯ uv pip compile docs/requirements-insiders.in -o docs/requirements-insiders.txt --universal -p 3.12
Updating ssh://git@github.com/astral-sh/mkdocs-material-insiders.git (38c0b8187325c3bab386b666daf3518ac036f2f4)
The authenticity of host 'github.com (140.82.112.4)' can't be established.                                                            
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
Updating ssh://git@github.com/astral-sh/mkdocs-material-insiders.git (38c0b8187325c3bab386b666daf3518ac036f2f4)
⠹ Resolving dependencies...                                                                                             
              ^C

I cancelled it and re-ran with --verbose:

❯ uv pip compile docs/requirements-insiders.in -o docs/requirements-insiders.txt --universal -p 3.12 -v
DEBUG uv 0.2.23
DEBUG Starting Python discovery for Python 3.12
DEBUG Looking for exact match for request Python 3.12
DEBUG Searching for Python 3.12 in system path
DEBUG Found cpython 3.12.1 at `/Users/zb/workspace/uv/.venv/bin/python3` (virtual environment)
DEBUG Using Python 3.12.1 interpreter at .venv/bin/python3 for builds
DEBUG Using request timeout of 30s
DEBUG Fetching source distribution from Git: ssh://git@github.com/astral-sh/mkdocs-material-insiders.git
DEBUG Acquired lock for `ssh://github.com/astral-sh/mkdocs-material-insiders`
DEBUG Updating git source `Url { scheme: "ssh", cannot_be_a_base: false, username: "git", password: None, host: Some(Domain("github.com")), port: None, path: "/astral-sh/mkdocs-material-insiders.git", query: None, fragment: None }`
DEBUG Attempting GitHub fast path for: https://api.github.com/repos/astral-sh/mkdocs-material-insiders/commits/38c0b8187325c3bab386b666daf3518ac036f2f4
DEBUG failed to check github HTTP status client error (404 Not Found) for url (https://api.github.com/repos/astral-sh/mkdocs-material-insiders/commits/38c0b8187325c3bab386b666daf3518ac036f2f4)
DEBUG Performing a Git fetch for: ssh://git@github.com/astral-sh/mkdocs-material-insiders.git
The authenticity of host 'github.com (140.82.112.4)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? 

Then I could provide the information for the git prompt and move forward.

charliermarsh commented 2 months ago

@ibraheemdev - Is this straightforward?

zanieb commented 2 months ago

I don't see where we're gating this with the verbose flag with a casual look.

charliermarsh commented 2 months ago

Not clear to me how this is appearing even with --verbose.

zanieb commented 2 months ago

Yeah I was confused... haha. Tried to write a MRE but it just fails:

❯ cat ~/bin/git
#/usr/bin/env bash

echo "Content please"
read test

❯ uv pip install --no-cache "git+https://github.com/astral-test/uv-public-pypackage@0dacfd662c64cb4ceb16e6cf65a157a8b715b979"
Updating https://github.com/astral-test/uv-public-pypackage (0dacfd662c64cb4ceb16e6cf65a157a8b715b979)                                error: Git operation failed
  Caused by: process didn't exit successfully: `git init` (exit status: 1)
--- stdout
Content please

❯ uv pip install --no-cache "git+https://github.com/astral-test/uv-public-pypackage@0dacfd662c64cb4ceb16e6cf65a157a8b715b979" --verbose
DEBUG uv 0.2.26
DEBUG Searching for Python interpreter in system path
DEBUG Found cpython 3.12.3 at `/Users/zb/workspace/uv/.venv/bin/python3` (virtual environment)
DEBUG Using Python 3.12.3 environment at .venv/bin/python3
DEBUG Acquired lock for `.venv`
DEBUG At least one requirement is not satisfied: git+https://github.com/astral-test/uv-public-pypackage@0dacfd662c64cb4ceb16e6cf65a157a8b715b979
DEBUG Using request timeout of 30s
DEBUG Fetching source distribution from Git: https://github.com/astral-test/uv-public-pypackage
DEBUG Acquired lock for `https://github.com/astral-test/uv-public-pypackage`
DEBUG Updating git source `Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("github.com")), port: None, path: "/astral-test/uv-public-pypackage", query: None, fragment: None }`
error: Git operation failed
  Caused by: process didn't exit successfully: `git init` (exit status: 1)
--- stdout
Content please