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 creates empty Pipfile in some folders #3908
Comments
Same with Emacs pipenv.el |
It is likely due to some auto-execution of pipenv commands. Pipenv looks for Pipfile up to 3 layers deep by default. And if not found, one Pipfile will be created in the current directory. The max searching depth is controlled by |
Indeed, I have verified that I can reproduce the issue consistently with vim and my plugins. I just need to edit a file that is 3 subfolders deep to see an extra Why would Pipfile create an empty file though? |
@charlax Yes, it is the current design, Pipenv needs Pipfile to locate its project root. Does |
Plus, I recommend filing an issue to |
Indeed, it looks like ALE executes pipenv,
And I have I'll open a ticket with ALE. I guess a proper solution would be to use |
Hi @frostming, I'm interested what the Use case is for where pipenv by design will create a new Pipfile where depth exceeds Perhaps you can have a
thanks |
@richyfish Yes, why not? |
That's fine. I was trying to understand the design decisions behind why pipenv only searches within 3 depth. thanks. |
Issue description
Empty
Pipfile
are created from time to time in some folders of my app. They always appear in the same folders, and it seems that they appear when I have opened a file in the same directory in Vim. They can appear in 9 different locations at time of writing.Expected result
pipenv should not create those empty files.
Actual result
Example paths:
The only thing they seem to have in common is that they are 3 layers deep.
Steps to replicate
Actually, I really don't know how to replicate this and would appreciate some guidance. Since it seems to happen only when I'm working on the files, could it be related to my editing setup? I'm using:
$ pipenv --support
NOTE: I have redacted the areas I assume are irrelevant.
Pipenv version:
'2018.11.26'
Pipenv location:
'/Users/ca/Library/Python/3.7/lib/python/site-packages/pipenv'
Python location:
'/usr/local/opt/python/bin/python3.7'
Python installations found:
3.7.4
:/usr/local/bin/python3
3.7.4
:/usr/local/bin/python3.7m
2.7.16
:/usr/local/bin/python
2.7.16
:/usr/local/bin/pythonw
2.7.10
:/usr/bin/python
2.7.10
:/usr/bin/pythonw
2.7.10
:/usr/bin/python2.7
PEP 508 Information:
System environment variables:
TERM_SESSION_ID
LC_TERMINAL_VERSION
COLORFGBG
XPC_FLAGS
PWD
SHELL
LC_CTYPE
TERM_PROGRAM_VERSION
TERM_PROGRAM
PATH
LC_TERMINAL
COLORTERM
TERM
HOME
TMPDIR
USER
LOGNAME
SHLVL
OLDPWD
ZSH
EDITOR
EDITOR_GUI
CODE_PATH
FORK_PATH
GOPATH
VIM_DOTFILES
PYENV_ROOT
MANPATH
DOTFILES
VIRTUAL_ENV_DISABLE_PROMPT
PROMPT
PIP_DISABLE_PIP_VERSION_CHECK
PYTHONDONTWRITEBYTECODE
PIP_SHIMS_BASE_MODULE
PIP_PYTHON_PATH
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/Users/ca/.pyenv/bin:/usr/local/opt/gettext/bin:/usr/local/bin:/usr/local/sbin:/Users/ca/.dotfiles/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Users/ca/bin:/Users/ca/Library/Python/3.7/bin:/Users/ca/.local/bin
SHELL
:/usr/local/bin/zsh
EDITOR
:nvim
LANG
:en_US.UTF-8
PWD
:[redacted]/api
Contents of
Pipfile
('[redacted]/api/Pipfile'):Contents of
Pipfile.lock
('[redacted]/api/Pipfile.lock'):The text was updated successfully, but these errors were encountered: