Skip to content
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

Don't normalize name when writing Pipfile #3338

Merged
merged 4 commits into from
Dec 2, 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
1 change: 1 addition & 0 deletions news/3324.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Don't normalize the package name user passes in.
2 changes: 1 addition & 1 deletion pipenv/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ def add_package_to_pipfile(self, package, dev=False):
# Skip for wildcard version
return
# Add the package to the group.
p[key][name or package.normalized_name] = converted
p[key][name or pep423_name(package.name)] = converted
# Write Pipfile.
self.write_toml(p)

Expand Down
8 changes: 8 additions & 0 deletions tests/integration/test_install_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,3 +438,11 @@ def test_install_non_exist_dep(PipenvInstance, pypi):
c = p.pipenv("install dateutil")
assert not c.ok
assert "dateutil" not in p.pipfile["packages"]


@pytest.mark.install
def test_install_package_with_dots(PipenvInstance, pypi):
with PipenvInstance(pypi=pypi, chdir=True) as p:
c = p.pipenv("install backports.html")
assert c.ok
assert "backports.html" in p.pipfile["packages"]
Binary file not shown.