From 603bf152e0a168da685e464ef54f29ccc7882054 Mon Sep 17 00:00:00 2001 From: David Hotham Date: Fri, 17 Mar 2023 21:33:59 +0000 Subject: [PATCH 1/2] installer 0.7.0 --- poetry.lock | 10 +++++----- pyproject.toml | 2 +- src/poetry/installation/wheel_installer.py | 1 + .../demo-0.1.2-py2.py3-none-any.whl | Bin 1537 -> 1552 bytes .../dists/pytest-3.5.1-py2.py3-none-any.whl | Bin 3693 -> 3708 bytes 5 files changed, 7 insertions(+), 6 deletions(-) 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..0d9eecb1674 100644 --- a/src/poetry/installation/wheel_installer.py +++ b/src/poetry/installation/wheel_installer.py @@ -98,6 +98,7 @@ def enable_bytecode_compilation(self, enable: bool = True) -> None: def install(self, wheel: Path) -> None: with WheelFile.open(Path(wheel.as_posix())) 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 a01175c144ef549ae2f4e407eb436e3a1270106d..9f1ce9264e8701f49071acecb57f0cfe9dffea1b 100644 GIT binary patch delta 380 zcmZqVnZUDQ1ET~30|N&G`I2oAZ?uev- zaA^fM10%}|W(Ec@k$cWDyjg*P;lb}ZZmU)n%aRQVm(4r2r5E3B4WHn3YsH4I*VeE1 zp8Jh`-}jr(!|ku%lD)g6^iLVv!ul4;ee0f_RuG-F@7LGwKX$IItvet;=Y!rN{+6tb zF`mLw8+S>5V>mSPZ)*A?6~APOXz^tyWTWl#z0Mt#k62dv+~Z`~-HvM&xAkTvTzsc_ zTHIUs?q`+E=;ZfW3#Ir!{V~$0jNPzE@89HR$1d!)$Hik< zb56sq!r{^rqg@ZTXB}pk@t0xqdL~vT4LN2J9N_^9Ck6&!&@e1%T+KMqUK|uS5}_fi mkibC;n8~uNT1=;yK*|zWgBhbHZ(()jieX}4mgRcTtl81H*;A z>7D`}KX<%nnx(+EP^63HPKpSZ%gRjODEsB*F*`oXKG+(6zv$FX3y!lpKNd4)-MG>B zdzVkyZxz>HCMnlHuGd+zzpVd=vhAF;dnA{4TV#qX{&;&I+cw*s<`+zK4x2?SG!bd{ z^NV!hsBM`T`sGk}!PS0^;?sIQDXUzsUi*01mD#={vn=-VKK;y7Dj)tnPju>HV0Zms z@$lL7w%t1SPH7z1pK;c7{o{|DomSbj{ePaNk@W}K|ZA`bGtG#7&cSeTJPf`Nf`;qlFx*BKd%E}a0< lllxgECR?*gGp%O=E6-;QX0)GtnAMppgNcEm85pb#3;S8EEx{v>SAISb?oF)}d7GRRE6%PvYi~N5V|8ID1WxLqx-KpM-wvm8dDt*(~3=NK3mgcunZWG4nlO|IuaO~sm z&ihLYy4F74sX#g}g~^ZxvMo6&V}$6Jmz=XZ~v z20y;>-{+%Gd28RK`BzqDth)bMuS6}m%TDUh+2hOem) Date: Fri, 17 Mar 2023 22:03:14 +0000 Subject: [PATCH 2/2] WheelFile.open() accepts a path --- src/poetry/installation/wheel_installer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/poetry/installation/wheel_installer.py b/src/poetry/installation/wheel_installer.py index 0d9eecb1674..16de86e3022 100644 --- a/src/poetry/installation/wheel_installer.py +++ b/src/poetry/installation/wheel_installer.py @@ -97,7 +97,7 @@ 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,