From 6525e31e51e9ce1489e6f9bc85e761d1db4d94fe Mon Sep 17 00:00:00 2001 From: jxltom Date: Sun, 30 Sep 2018 17:43:39 +0800 Subject: [PATCH 1/3] Add test on locking editable package with markers --- tests/integration/test_lock.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/integration/test_lock.py b/tests/integration/test_lock.py index 23d75f8e..ac296476 100644 --- a/tests/integration/test_lock.py +++ b/tests/integration/test_lock.py @@ -368,6 +368,25 @@ requests = {git = "https://github.com/requests/requests.git", editable = true, e assert c.return_code == 0 +@pytest.mark.lock +@pytest.mark.vcs +@pytest.mark.needs_internet +def test_lock_editable_vcs_with_markers_without_install(PipenvInstance, pypi): + with PipenvInstance(pypi=pypi, chdir=True) as p: + with open(p.pipfile_path, 'w') as f: + f.write(""" +[packages] +requests = {git = "https://github.com/requests/requests.git", ref = "master", editable = true, markers = "python_version >= '2.6'"} + """.strip()) + c = p.pipenv('lock') + assert c.return_code == 0 + assert 'requests' in p.lockfile['default'] + assert 'idna' in p.lockfile['default'] + assert 'chardet' in p.lockfile['default'] + c = p.pipenv('install') + assert c.return_code == 0 + + @pytest.mark.lock @pytest.mark.skip(reason="This doesn't work for some reason.") def test_lock_respecting_python_version(PipenvInstance, pypi): From 1cd913fa2cb3e176043bf903ccf316d680d0109e Mon Sep 17 00:00:00 2001 From: Grey Baker Date: Mon, 8 Oct 2018 15:55:17 +0100 Subject: [PATCH 2/3] Remove unused pased_pure_pipfile property --- pipenv/project.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pipenv/project.py b/pipenv/project.py index 0722619f..77f09009 100644 --- a/pipenv/project.py +++ b/pipenv/project.py @@ -457,12 +457,6 @@ class Project(object): return contents - @property - def pased_pure_pipfile(self): - contents = self.read_pipfile() - - return self._parse_pipfile(contents) - def clear_pipfile_cache(self): """Clear pipfile cache (e.g., so we can mutate parsed pipfile)""" _pipfile_cache.clear() From 3a46aed65287288e902b94f52963c7c8392e5aab Mon Sep 17 00:00:00 2001 From: RafalSkolasinski Date: Thu, 11 Oct 2018 14:32:56 +0200 Subject: [PATCH 3/3] Add trailing white space to --prompt argument in do_create_virtualenv; closes #2990 --- pipenv/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipenv/core.py b/pipenv/core.py index 8a983dc4..a049da7c 100644 --- a/pipenv/core.py +++ b/pipenv/core.py @@ -874,7 +874,7 @@ def do_create_virtualenv(python=None, site_packages=False, pypi_mirror=None): sys.executable, "-m", "virtualenv", - "--prompt=({0})".format(project.name), + "--prompt=({0}) ".format(project.name), "--python={0}".format(python), project.get_location_for_virtualenv(), ]