diff --git a/poetry.lock b/poetry.lock index cb6f90a7d30..cd5902dbae3 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.3.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.4.0.dev0 and should not be changed by hand. [[package]] name = "anyio" @@ -42,7 +42,7 @@ name = "build" version = "1.4.0" description = "A simple, correct Python build frontend" optional = false -python-versions = ">=3.9" +python-versions = ">= 3.9" groups = ["main"] files = [ {file = "build-1.4.0-py3-none-any.whl", hash = "sha256:6a07c1b8eb6f2b311b96fcbdbce5dab5fe637ffda0fd83c9cac622e927501596"}, @@ -481,7 +481,7 @@ name = "cryptography" version = "46.0.3" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." optional = false -python-versions = "!=3.9.0,!=3.9.1,>=3.8" +python-versions = ">=3.8, !=3.9.0, !=3.9.1" groups = ["main"] markers = "sys_platform == \"linux\"" files = [ @@ -848,14 +848,14 @@ files = [ [[package]] name = "installer" -version = "0.7.0" +version = "1.0.0" description = "A library for installing Python wheels." optional = false -python-versions = ">=3.7" +python-versions = ">=3.10" groups = ["main"] files = [ - {file = "installer-0.7.0-py3-none-any.whl", hash = "sha256:05d1933f0a5ba7d8d6296bb6d5018e7c94fa473ceb10cf198a92ccea19c27b53"}, - {file = "installer-0.7.0.tar.gz", hash = "sha256:a26d3e3116289bb08216e0d0f7d925fcef0b0194eedfa0c944bcaaa106c4b631"}, + {file = "installer-1.0.0-py3-none-any.whl", hash = "sha256:7b46327ded20d8544bfe2d8561618bbcd12d88e7e3645333af1ed141d8bc1bfe"}, + {file = "installer-1.0.0.tar.gz", hash = "sha256:c6d691331621cf3fec4822f5c6f83cab3705f79b316225dc454127411677c71f"}, ] [[package]] @@ -1220,7 +1220,7 @@ name = "nodeenv" version = "1.10.0" description = "Node.js virtual environment builder" optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" groups = ["dev"] files = [ {file = "nodeenv-1.10.0-py2.py3-none-any.whl", hash = "sha256:5bb13e3eed2923615535339b3c620e76779af4cb4c6a90deccc9e36b274d3827"}, @@ -2196,4 +2196,4 @@ cffi = ["cffi (>=1.17,<2.0) ; platform_python_implementation != \"PyPy\" and pyt [metadata] lock-version = "2.1" python-versions = ">=3.10,<4.0" -content-hash = "69cddd52ffdedc12c4b7445a9f359d67a4a1dc4b5d139d261a2c228a832bf39a" +content-hash = "87a4bf2b38de33bfe10bbe8ccb04b571efabdf2fef0757b127740831e44410b7" diff --git a/pyproject.toml b/pyproject.toml index 8c203340242..8d3378136c8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ dependencies = [ "cleo (>=2.1.0,<3.0.0)", "dulwich (>=0.25.0,<2)", "fastjsonschema (>=2.18.0,<3.0.0)", - "installer (>=0.7.0,<0.8.0)", + "installer (>=1,<2)", "keyring (>=25.1.0,<26.0.0)", # packaging uses calver, so version is unclamped "packaging (>=24.2)", # PEP 639 support was added in 24.2 diff --git a/src/poetry/installation/wheel_installer.py b/src/poetry/installation/wheel_installer.py index 3f132692422..c5d52efad21 100644 --- a/src/poetry/installation/wheel_installer.py +++ b/src/poetry/installation/wheel_installer.py @@ -102,10 +102,7 @@ def enable_bytecode_compilation(self, enable: bool = True) -> None: def install(self, wheel: Path) -> None: with WheelFile.open(wheel) as source: try: - # Content validation is temporarily disabled because of - # pypa/installer's out of memory issues with big wheels. See - # https://github.com/python-poetry/poetry/issues/7983 - source.validate_record(validate_contents=False) + source.validate_record() except _WheelFileValidationError as e: self.invalid_wheels[wheel] = e.issues diff --git a/tests/installation/test_executor.py b/tests/installation/test_executor.py index 08aa1bf294b..6cd5fa7450f 100644 --- a/tests/installation/test_executor.py +++ b/tests/installation/test_executor.py @@ -503,37 +503,37 @@ def test_execute_prints_warning_for_yanked_package( assert error.count("yanked") == 0 -@pytest.mark.skip(reason="https://github.com/python-poetry/poetry/issues/7983") def test_execute_prints_warning_for_invalid_wheels( config: Config, pool: RepositoryPool, io: BufferedIO, tmp_path: Path, env: MockEnv, + fixture_dir: FixtureDirGetter, ) -> None: config.merge({"cache-dir": str(tmp_path)}) executor = Executor(env, pool, config, io) - base_url = "https://files.pythonhosted.org/" wheel1 = "demo_invalid_record-0.1.0-py2.py3-none-any.whl" wheel2 = "demo_invalid_record2-0.1.0-py2.py3-none-any.whl" + dist_dir = fixture_dir("distributions") return_code = executor.execute( [ Install( Package( "demo-invalid-record", "0.1.0", - source_type="url", - source_url=f"{base_url}/{wheel1}", + source_type="file", + source_url=(dist_dir / wheel1).resolve().as_posix(), ) ), Install( Package( "demo-invalid-record2", "0.1.0", - source_type="url", - source_url=f"{base_url}/{wheel2}", + source_type="file", + source_url=(dist_dir / wheel2).resolve().as_posix(), ) ), ]