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

refactor installer extras handling, fix small bug, drop support for very old lock files #9345

Merged

Conversation

radoering
Copy link
Member

@radoering radoering commented Apr 28, 2024

Requires: python-poetry/poetry-plugin-export#279

should not be squashed

motivation:

  • simplify logic for calculating operations regarding extras
  • dermine operations completely in Transaction.calculate_operations() and do not merge operations from several calculations in installer

side effects:

  • fix a bug concerning extras that are not requested: poetry install (without extras) uninstalled them if there was a lock file but did not if there was none, now it always uninstalls them
  • drop support for reading very old lock files (prior lock file version 1.0 and Poetry 1.1)

@radoering radoering marked this pull request as draft May 3, 2024 04:02
@radoering radoering force-pushed the refactor/installer-extras-handling branch from 923c08e to c0ade62 Compare May 3, 2024 04:31
radoering added a commit to radoering/poetry that referenced this pull request May 12, 2024
… and fix small bug (python-poetry#9345)

* Operations are completely calculated in `Transaction.calculate_operations()` so that we do not have to remember extra uninstalls between two calculations.
* Previously, extras that were not requested were not uninstalled when running `poetry install` (without extras) if there was no lockfile, now it does not matter if there was a lockfile or not.
* In `installer._get_extra_packages()` we do not have to distinguish between locked extras and extras in the pyproject.toml because both must be consistent.
radoering added a commit to radoering/poetry that referenced this pull request May 12, 2024
@radoering radoering force-pushed the refactor/installer-extras-handling branch from c0ade62 to 298443b Compare May 12, 2024 19:59
@radoering radoering marked this pull request as ready for review May 12, 2024 20:05
@radoering radoering requested a review from a team May 12, 2024 20:07
@radoering radoering force-pushed the refactor/installer-extras-handling branch from 298443b to 440f62f Compare May 16, 2024 03:53
radoering added a commit to radoering/poetry that referenced this pull request May 16, 2024
… and fix small bug (python-poetry#9345)

* Operations are completely calculated in `Transaction.calculate_operations()` so that we do not have to remember extra uninstalls between two calculations.
* Previously, extras that were not requested were not uninstalled when running `poetry install` (without extras) if there was no lockfile, now it does not matter if there was a lockfile or not.
* In `installer._get_extra_packages()` we do not have to distinguish between locked extras and extras in the pyproject.toml because both must be consistent.
radoering added a commit to radoering/poetry that referenced this pull request May 16, 2024
radoering added a commit to radoering/poetry that referenced this pull request May 19, 2024
… and fix small bug (python-poetry#9345)

* Operations are completely calculated in `Transaction.calculate_operations()` so that we do not have to remember extra uninstalls between two calculations.
* Previously, extras that were not requested were not uninstalled when running `poetry install` (without extras) if there was no lockfile, now it does not matter if there was a lockfile or not.
* In `installer._get_extra_packages()` we do not have to distinguish between locked extras and extras in the pyproject.toml because both must be consistent.
radoering added a commit to radoering/poetry that referenced this pull request May 19, 2024
@radoering radoering mentioned this pull request May 20, 2024
2 tasks
radoering added a commit to radoering/poetry that referenced this pull request May 21, 2024
… and fix small bug (python-poetry#9345)

* Operations are completely calculated in `Transaction.calculate_operations()` so that we do not have to remember extra uninstalls between two calculations.
* Previously, extras that were not requested were not uninstalled when running `poetry install` (without extras) if there was no lockfile, now it does not matter if there was a lockfile or not.
* In `installer._get_extra_packages()` we do not have to distinguish between locked extras and extras in the pyproject.toml because both must be consistent.
radoering added a commit to radoering/poetry that referenced this pull request May 21, 2024
@radoering radoering force-pushed the refactor/installer-extras-handling branch from 440f62f to eaa25d4 Compare May 21, 2024 15:11
… and fix small bug (python-poetry#9345)

* Operations are completely calculated in `Transaction.calculate_operations()` so that we do not have to remember extra uninstalls between two calculations.
* Previously, extras that were not requested were not uninstalled when running `poetry install` (without extras) if there was no lockfile, now it does not matter if there was a lockfile or not.
* In `installer._get_extra_packages()` we do not have to distinguish between locked extras and extras in the pyproject.toml because both must be consistent.
@radoering radoering force-pushed the refactor/installer-extras-handling branch from eaa25d4 to 1615268 Compare June 2, 2024 18:35
@radoering radoering enabled auto-merge (rebase) June 2, 2024 18:39
@radoering radoering merged commit b8fcbde into python-poetry:main Jun 2, 2024
60 checks passed
radoering added a commit that referenced this pull request Jun 2, 2024
… and fix small bug (#9345)

* Operations are completely calculated in `Transaction.calculate_operations()` so that we do not have to remember extra uninstalls between two calculations.
* Previously, extras that were not requested were not uninstalled when running `poetry install` (without extras) if there was no lockfile, now it does not matter if there was a lockfile or not.
* In `installer._get_extra_packages()` we do not have to distinguish between locked extras and extras in the pyproject.toml because both must be consistent.
Copy link

github-actions bot commented Jul 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 Jul 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants