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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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
… 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 440f62f to eaa25d4 Compare May 21, 2024 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant