Skip to content

PIPENV_QUIET seems to bug the lock command #6207

@ardeidae

Description

@ardeidae

Issue description

I have some PIPENV environment variables set.

export PIPENV_DONT_LOAD_ENV=1
export PIPENV_DONT_USE_ASDF=1
export PIPENV_NOSPIN=1
export PIPENV_QUIET=1
export PIPENV_IGNORE_VIRTUALENVS=1
export PIPENV_VENV_IN_PROJECT=1
export PIPENV_VIRTUALENV_COPIES=1
export PIPENV_YES=1

After a git merge conflict, I wanted to lock Pipfile.lock again so I ran:

pipenv lock
Building requirements...
Resolving dependencies...
✔ Success!
Building requirements...
Resolving dependencies...
✔ Success!

Expected result

Pipfile.lock should be up to date.

Actual result

Pipfile.lock was out of date and pipenv verify asked to rerun lock.

pipenv verify
Pipfile.lock is out-of-date. Run $ pipenv lock to update.

So, I tried the verbose flag:

pipenv lock -v
Usage: pipenv lock [OPTIONS]
Try 'pipenv lock -h' for help.

Error: --verbose and --quiet are mutually exclusive! Please choose one!

This quiet and verbose conflict comes from the PIPENV_QUIET variable, so I unset it to see what's happening and reran the command.

unset PIPENV_QUIET

pipenv lock -v
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.starting()
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('mod-wsgi~=5.0'), None)
INFO:pipenv.patched.pip._internal.operations.prepare:Collecting mod-wsgi~=5.0 (from -r /tmp/pipenv-_ygmpekz-requirements/pipenv-u71xh8sj-constraints.txt (line 6))
INFO:pipenv.patched.pip._internal.operations.prepare:Using cached mod_wsgi-5.0.0-cp311-cp311-linux_x86_64.whl
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('pytz~=2024.1'), None)

Now, the lock command is working again. PIPENV_QUIET does not only hide output, but it changes command behaviour.

Steps to replicate

Define the PIPENV_QUIET environment variable and run lock command.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions