diff --git a/pipenv/core.py b/pipenv/core.py index 4346f48727..7b30af909a 100644 --- a/pipenv/core.py +++ b/pipenv/core.py @@ -2127,8 +2127,7 @@ def do_uninstall( bold=True, ) ) - package_names = project.parsed_pipfile['dev-packages'] - package_names = package_names.keys() + package_names = project.dev_packages.keys() if package_name is False and not all_dev: click.echo(crayons.red('No package provided!'), err=True) sys.exit(1) diff --git a/pipenv/patched/prettytoml/elements/abstracttable.py b/pipenv/patched/prettytoml/elements/abstracttable.py index 48663aed3f..6a2c174aec 100644 --- a/pipenv/patched/prettytoml/elements/abstracttable.py +++ b/pipenv/patched/prettytoml/elements/abstracttable.py @@ -24,7 +24,10 @@ def _enumerate_items(self): """ non_metadata = self._enumerate_non_metadata_sub_elements() while True: - yield next(non_metadata), next(non_metadata) + try: + yield next(non_metadata), next(non_metadata) + except StopIteration: + return def items(self): for (key_i, key), (value_i, value) in self._enumerate_items(): diff --git a/pipenv/project.py b/pipenv/project.py index 0a9e04be0e..db515acf8e 100644 --- a/pipenv/project.py +++ b/pipenv/project.py @@ -624,7 +624,7 @@ def write_toml(self, data, path=None): formatted_data = contoml.dumps(data).rstrip() except Exception: for section in ('packages', 'dev-packages'): - for package in data[section]: + for package in data.get(section, {}): # Convert things to inline tables — fancy :) if hasattr(data[section][package], 'keys'): _data = data[section][package] diff --git a/tests/integration/test_install_markers.py b/tests/integration/test_install_markers.py index 0b88549399..ca6b70fe99 100644 --- a/tests/integration/test_install_markers.py +++ b/tests/integration/test_install_markers.py @@ -11,6 +11,7 @@ py3_only = pytest.mark.skipif(sys.version_info < (3, 0), reason="requires Python3") +skip_py37 = pytest.mark.skipif(sys.version_info >= (3, 7), reason="Skip for python 3.7") @pytest.mark.markers @@ -127,6 +128,7 @@ def test_global_overrides_environment_markers(PipenvInstance, pypi): @pytest.mark.complex @flaky @py3_only +@skip_py37 def test_resolver_unique_markers(PipenvInstance, pypi): """vcrpy has a dependency on `yarl` which comes with a marker of 'python version in "3.4, 3.5, 3.6" - this marker duplicates itself: