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

use pypi package name in pyproject.toml #2305

Merged
merged 2 commits into from
Aug 16, 2020
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
2 changes: 1 addition & 1 deletion poetry/repositories/pypi_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def find_packages(
continue

try:
package = Package(name, version)
package = Package(info["info"]["name"], version)
except ParseVersionError:
self._log(
'Unable to parse version "{}" for the {} package, skipping'.format(
Expand Down
8 changes: 8 additions & 0 deletions tests/repositories/test_pypi_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,11 @@ def test_urls():

assert "https://pypi.org/simple/" == repository.url
assert "https://pypi.org/simple/" == repository.authenticated_url


def test_use_pypi_pretty_name():
repo = MockRepository(fallback=True)

package = repo.find_packages("twisted")
assert len(package) == 1
assert package[0].pretty_name == "Twisted"