Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: disable wheel content validation #7987

Merged
merged 1 commit into from
May 29, 2023

Conversation

ralbertazzi
Copy link
Contributor

@ralbertazzi ralbertazzi commented May 23, 2023

Pull Request Check List

Closes: #7983

First commit is a temporary solution to #7983 until pypa/installer#183 gets released.

Second commit is a permanent solution that also provides faster installation times.

@ralbertazzi
Copy link
Contributor Author

I added another commit where I achieve what I was saying here: #7983 (comment)

This:

  • Requires no release of pypa/installer
  • Makes the installation process faster, as we compute file hashes just once
  • Does not lose any validation capabilities. They are just handled a bit later

Cons: some pypa/installer code spilling into the Poetry codebase

@radoering
Copy link
Member

Not sure if the second commit is worth it or if we should just turn off validation until there is a solution in installer (or we really need validation for some reason). For a patch release I'd probably go with the first commit only (and include the second commit in the next minor if we want to include it).

First commit is a temporary solution to #7983 until pypa/installer#183 gets released.

The installer PR only reduces the memory consumption, the hash will still be computed twice, won't it?

@ralbertazzi
Copy link
Contributor Author

Correct, we would still need either a more invasive change of installer or this second commit

src/poetry/installation/wheel_installer.py Outdated Show resolved Hide resolved
src/poetry/installation/wheel_installer.py Outdated Show resolved Hide resolved
@ralbertazzi
Copy link
Contributor Author

@radoering yes, I agree the PR still needs some touches. The way I got it is that we wouldn't have merged the additional work on top of the simple validate_contents=False, am I right?

@radoering
Copy link
Member

Yes, I think for 1.5.1 the first commit is fine. The second commit needs more work and testing. You can split the second commit into a separate PR if you want to keep working on it.

@radoering radoering added impact/backport Requires backport to stable branch backport/1.5 labels May 29, 2023
@radoering radoering merged commit 3ba800f into python-poetry:master May 29, 2023
poetry-bot bot pushed a commit that referenced this pull request May 29, 2023
avoid out of memory issues

(cherry picked from commit 3ba800f)
radoering pushed a commit that referenced this pull request May 29, 2023
avoid out of memory issues

(cherry picked from commit 3ba800f)
@ralbertazzi ralbertazzi deleted the fix/installer-oom branch May 29, 2023 16:33
Copy link

github-actions bot commented Mar 3, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
impact/backport Requires backport to stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modern installer eats a lot of RAM when installing big wheels
2 participants