Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix python 37 build failures #2436

Merged
merged 4 commits into from
Jun 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pipenv/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 4 additions & 1 deletion pipenv/patched/prettytoml/elements/abstracttable.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
2 changes: 1 addition & 1 deletion pipenv/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/test_install_markers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down