diff --git a/poetry.lock b/poetry.lock index 2588298f006..dff3d459c4c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry and should not be changed by hand. +# This file is automatically @generated by Poetry 1.4.0 and should not be changed by hand. [[package]] name = "attrs" @@ -731,14 +731,14 @@ files = [ [[package]] name = "installer" -version = "0.6.0" +version = "0.7.0" description = "A library for installing Python wheels." category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "installer-0.6.0-py3-none-any.whl", hash = "sha256:ae7c62d1d6158b5c096419102ad0d01fdccebf857e784cee57f94165635fe038"}, - {file = "installer-0.6.0.tar.gz", hash = "sha256:f3bd36cd261b440a88a1190b1becca0578fee90b4b62decc796932fdd5ae8839"}, + {file = "installer-0.7.0-py3-none-any.whl", hash = "sha256:05d1933f0a5ba7d8d6296bb6d5018e7c94fa473ceb10cf198a92ccea19c27b53"}, + {file = "installer-0.7.0.tar.gz", hash = "sha256:a26d3e3116289bb08216e0d0f7d925fcef0b0194eedfa0c944bcaaa106c4b631"}, ] [[package]] @@ -1983,4 +1983,4 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools" [metadata] lock-version = "2.0" python-versions = "^3.7" -content-hash = "d00f73e992cf3ea9c61769fe7841ce475d119422476025bab8415cd4f278ad26" +content-hash = "1b804b8be7ae9a7e94c4959d138908d8647410750fc9de0a5b524870a4238bdd" diff --git a/pyproject.toml b/pyproject.toml index 3e3fdb7c3e4..27a02f2a2a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ dulwich = "^0.21.2" filelock = "^3.8.0" html5lib = "^1.0" importlib-metadata = { version = ">=4.4", python = "<3.10" } -installer = "^0.6.0" +installer = "^0.7.0" jsonschema = "^4.10.0" keyring = "^23.9.0" lockfile = "^0.12.2" diff --git a/src/poetry/installation/wheel_installer.py b/src/poetry/installation/wheel_installer.py index c8df26960f8..16de86e3022 100644 --- a/src/poetry/installation/wheel_installer.py +++ b/src/poetry/installation/wheel_installer.py @@ -97,7 +97,8 @@ def enable_bytecode_compilation(self, enable: bool = True) -> None: self._destination.bytecode_optimization_levels = (1,) if enable else () def install(self, wheel: Path) -> None: - with WheelFile.open(Path(wheel.as_posix())) as source: + with WheelFile.open(wheel) as source: + source.validate_record() install( source=source, destination=self._destination.for_source(source), diff --git a/tests/fixtures/distributions/demo-0.1.2-py2.py3-none-any.whl b/tests/fixtures/distributions/demo-0.1.2-py2.py3-none-any.whl index a01175c144e..9f1ce9264e8 100644 Binary files a/tests/fixtures/distributions/demo-0.1.2-py2.py3-none-any.whl and b/tests/fixtures/distributions/demo-0.1.2-py2.py3-none-any.whl differ diff --git a/tests/repositories/fixtures/pypi.org/dists/pytest-3.5.1-py2.py3-none-any.whl b/tests/repositories/fixtures/pypi.org/dists/pytest-3.5.1-py2.py3-none-any.whl index c3a868e5caa..4eb8ce84187 100644 Binary files a/tests/repositories/fixtures/pypi.org/dists/pytest-3.5.1-py2.py3-none-any.whl and b/tests/repositories/fixtures/pypi.org/dists/pytest-3.5.1-py2.py3-none-any.whl differ