Skip to content
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

pipenv run pip freeze > requirements.txt adds a first line "Loading .env environment variables..." with pipenv version 2022.3.23 #5003

Closed
felixdjost opened this issue Mar 23, 2022 · 3 comments
Assignees
Labels
PR: merged The PR related to this issue has been merged.

Comments

@felixdjost
Copy link

According to https://pipenv-fork.readthedocs.io/en/latest/basics.html
you can use
"pipenv run pip freeze > requirements.txt" to generate a requirements.txt file from a Pipfile file.

Expected result

Generate a requirements.txt file with the dependencies only

Actual result

a requirements file which contains a first line "Loading .env environment variables..." plus the dependencies on the next lines.

Steps to replicate

python -m pip install pipenv
pipenv run pip freeze > requirements.txt

The issue does not seems to occur with an older version:
python -m pip install pipenv==2022.1.8
pipenv run pip freeze > requirements.txt

@matteius
Copy link
Member

matteius commented Mar 23, 2022

Thanks for your report @felixdjost -- That explains why it was a stderr before. I don't love that fact that was for good reason, but you are most certainly right. Ref: https://github.com/pypa/pipenv/pull/4979/files#diff-93789237e89bd5f9dd10311cd7aa3e15406e4893b0bbb52911c7dc48697ff91e

I will most likely be changing it back, or just hypothetically I wonder if we even really need that logging at all? There is a separate report about it annoying someone on: #4027 (comment)

Especially since it prints always now prints its loading the .env always whether there is one or not, and even if we fixed that it would be an issue for requirements.txt generation when there is a .env file.

@matteius matteius self-assigned this Mar 23, 2022
@matteius matteius added the PR: awaiting-review The PR related to this issue is awaiting review by a maintainer. label Mar 23, 2022
@matteius
Copy link
Member

TODO: We fixed the regression in master, and a new release should go out tonight, but is important we get a unit test in for this case as well, and I should be able to work on that at some point soon.

@oz123 oz123 added PR: merged The PR related to this issue has been merged. and removed PR: awaiting-review The PR related to this issue is awaiting review by a maintainer. labels Mar 23, 2022
@matteius
Copy link
Member

@felixdjost The fix for this has been released under pipenv==2022.3.24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: merged The PR related to this issue has been merged.
Projects
None yet
Development

No branches or pull requests

3 participants