Collisions of virtual environments #3151
Labels
OS: Linux
This issue affects the Linux Operating System.
Type: Bug 🐛
This issue is a bug.
Type: Regression
This issue is a regression of a previous behavior.
Issue description
On OS which handles file systems in case-sensitive manner (e.g. Linux based),
pipenv
mistakenly uses virtual environment which corresponds to similar-named directory if it exists.Expected result
pipenv
creates and uses different virtual environments for projects in different directories which names are equals when they are normalized to lower or upper case.Actual result
pipenv
uses single virtual environment for different projects.Steps to replicate
Here is what I've got using d985784 revision of
pipenv
(currentmaster
):As you can see,
/home/mim/.local/share/virtualenvs/test-Ic8GqeXz
was used for bothtest
andTEST
projects.Environment
$ pipenv --support
Pipenv version:
'2018.10.14.dev0'
Pipenv location:
'/home/mim/.local/lib/python3.6/site-packages/pipenv'
Python location:
'/usr/bin/python3'
Python installations found:
3.7.0
:/usr/bin/python3.7m
3.7.0
:/usr/bin/python3.7
3.6.6
:/usr/bin/python3.6
3.6.6
:/usr/bin/python3.6m
2.7.15rc1
:/usr/bin/python2
PEP 508 Information:
System environment variables:
CLUTTER_IM_MODULE
LS_COLORS
LC_MEASUREMENT
LESSCLOSE
LC_PAPER
LC_MONETARY
XDG_MENU_PREFIX
LANG
DISPLAY
GNOME_SHELL_SESSION_MODE
COLORTERM
USERNAME
XDG_VTNR
SSH_AUTH_SOCK
MANDATORY_PATH
LC_NAME
XDG_SESSION_ID
USER
DESKTOP_SESSION
QT4_IM_MODULE
TEXTDOMAINDIR
GNOME_TERMINAL_SCREEN
DEFAULTS_PATH
PWD
HOME
TEXTDOMAIN
SSH_AGENT_PID
QT_ACCESSIBILITY
XDG_SESSION_TYPE
XDG_DATA_DIRS
XDG_SESSION_DESKTOP
LC_ADDRESS
GJS_DEBUG_OUTPUT
LC_NUMERIC
GTK_MODULES
PAPERSIZE
WINDOWPATH
VTE_VERSION
TERM
SHELL
QT_IM_MODULE
XMODIFIERS
IM_CONFIG_PHASE
XDG_CURRENT_DESKTOP
GPG_AGENT_INFO
GNOME_TERMINAL_SERVICE
XDG_SEAT
SHLVL
LC_TELEPHONE
GDMSESSION
GNOME_DESKTOP_SESSION_ID
LOGNAME
DBUS_SESSION_BUS_ADDRESS
XDG_RUNTIME_DIR
XAUTHORITY
XDG_CONFIG_DIRS
PATH
LC_IDENTIFICATION
GJS_DEBUG_TOPICS
SESSION_MANAGER
LESSOPEN
GTK_IM_MODULE
LC_TIME
_
OLDPWD
PIP_DISABLE_PIP_VERSION_CHECK
PIP_SHIMS_BASE_MODULE
PYTHONDONTWRITEBYTECODE
PIP_PYTHON_PATH
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/home/mim/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
SHELL
:/bin/bash
LANG
:en_US.UTF-8
PWD
:/home/mim/projects
Root cause
I tried to investigate this bug and found that it was introduced by #2513.
The root cause of the issue is that
os.name != "nt"
condition was mistakenly converted tofnmatch.fnmatch('A', 'a')
when it should have been converted tonot fnmatch.fnmatch('A', 'a')
.Solution
I created a PR #2883 that fixes this issue.
The text was updated successfully, but these errors were encountered: