Skip to content

Commit

Permalink
don't use escape_version()
Browse files Browse the repository at this point in the history
version.to_string() already gave an escaped version
  • Loading branch information
dimbleby committed Sep 11, 2022
1 parent 1e46417 commit 475f5f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 1 addition & 5 deletions src/poetry/publishing/uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

from poetry.core.masonry.metadata import Metadata
from poetry.core.masonry.utils.helpers import escape_name
from poetry.core.masonry.utils.helpers import escape_version
from requests import adapters
from requests.exceptions import ConnectionError
from requests.exceptions import HTTPError
Expand Down Expand Up @@ -80,10 +79,7 @@ def files(self) -> list[Path]:
version = self._package.version.to_string()

wheels = list(
dist.glob(
f"{escape_name(self._package.pretty_name)}-{escape_version(version)}"
"-*.whl"
)
dist.glob(f"{escape_name(self._package.pretty_name)}-{version}-*.whl")
)
tars = list(dist.glob(f"{self._package.pretty_name}-{version}.tar.gz"))

Expand Down
3 changes: 1 addition & 2 deletions tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from typing import Any

from poetry.core.masonry.utils.helpers import escape_name
from poetry.core.masonry.utils.helpers import escape_version
from poetry.core.packages.package import Package
from poetry.core.packages.utils.link import Link
from poetry.core.toml.file import TOMLFile
Expand Down Expand Up @@ -237,7 +236,7 @@ def find_links_for_package(self, package: Package) -> list[Link]:
return [
Link(
f"https://foo.bar/files/{escape_name(package.name)}"
f"-{escape_version(package.version.text)}-py2.py3-none-any.whl"
f"-{package.version.to_string()}-py2.py3-none-any.whl"
)
]

Expand Down

0 comments on commit 475f5f4

Please sign in to comment.