poetry icon indicating copy to clipboard operation
poetry copied to clipboard

Unexpected breaking change with `--only` option?

Open jvllmr opened this issue 1 year ago • 6 comments

Description

I am currently updating my poetry-types plugin for poetry v2 and encountered a new behavior with the --only option. The project uses the Installer::only_groups API to make sure that only the types group is modified during an update, but with poetry v2 the command remove every package tracked by poetry except the ones defined in the types group. Before poetry v2 it didn't do anything to packages outside the types group.

I double checked by running poetry update --only types and it has the same unexpected behavior. Is that change intended? I couldn't find anything about that in the GitHub Release Notes.

Workarounds

No, I cannot really think of something right now.

Poetry Installation Method

pipx

Operating System

Garuda Linux

Poetry Version

Poetry (version 2.0.0)

Poetry Configuration

cache-dir = "/home/jan/.cache/pypoetry"
installer.max-workers = null
installer.no-binary = null
installer.only-binary = null
installer.parallel = true
installer.re-resolve = true
keyring.enabled = true
requests.max-retries = 0
solver.lazy-wheel = true
system-git-client = false
virtualenvs.create = true
virtualenvs.in-project = true
virtualenvs.options.always-copy = false
virtualenvs.options.no-pip = false
virtualenvs.options.system-site-packages = false
virtualenvs.path = "{cache-dir}/virtualenvs"  # /home/jan/.cache/pypoetry/virtualenvs
virtualenvs.prompt = "{project_name}-py{python_version}"
virtualenvs.use-poetry-python = false

Python Sysconfig

No response

Example pyproject.toml

[tool.poetry]
name = "poetry-types"
version = "0.6.0"
description = "A poetry plugin that adds/removes type stubs as dependencies like the mypy --install-types command."
authors = ["Jan Vollmer <[email protected]>"]
license = "MIT License"
readme = "README.md"
repository = "https://github.com/jvllmr/poetry-types"
classifiers = [
  "License :: OSI Approved :: MIT License",
  "Operating System :: OS Independent",
  "Natural Language :: English",
]

[tool.poetry.dependencies]
python = "^3.9"
poetry = ">=2.0"
packaging = ">=24.2"
tomlkit = ">=0.13.2"

[tool.poetry.group.dev.dependencies]
pytest = ">=8.3.4"
tox = ">=4.23.2"
ruff = ">=0.8.4"
poetry = ">=1.8.5"


[tool.poetry.group.types.dependencies]

[tool.pyaphid]
forbidden = ["print"]


[tool.poetry.plugins."poetry.application.plugin"]
poetry-types = "poetry_types.poetry_types:PoetryTypes"

[build-system]
requires = ["poetry-core>=1.9.1"]
build-backend = "poetry.core.masonry.api"

[tool.pytest.ini_options]
testpaths = ["tests"]

[tool.tox]
legacy_tox_ini = """
[tox]
isolated_build = true
envlist= py39, py310, py311, py312, py313

[testenv]
deps =
    pytest
commands =
    pytest

"""

Poetry Runtime Logs

poetry -vvv update --only types
Loading configuration file /home/jan/.config/pypoetry/config.toml
Loading configuration file /home/jan/Documents/dev/poetry-types/poetry.toml
Trying to detect current active python executable as specified in the config.
Found: /home/jan/Documents/dev/poetry-types/.venv/bin/python
Using virtualenv: /home/jan/Documents/dev/poetry-types/.venv
Updating dependencies
Resolving dependencies...
   1: fact: poetry-types is 0.6.0
   1: derived: poetry-types
   0: Duplicate dependencies for poetry
   0: Merging requirements for poetry
   1: fact: poetry-types depends on poetry (>=2.0)
   1: fact: poetry-types depends on packaging (>=24.2)
   1: fact: poetry-types depends on tomlkit (>=0.13.2)
   1: fact: poetry-types depends on pytest (>=8.3.4)
   1: fact: poetry-types depends on tox (>=4.23.2)
   1: fact: poetry-types depends on ruff (>=0.8.4)
   1: selecting poetry-types (0.6.0)
   1: derived: ruff (>=0.8.4)
   1: derived: tox (>=4.23.2)
   1: derived: pytest (>=8.3.4)
   1: derived: tomlkit (>=0.13.2)
   1: derived: packaging (>=24.2)
   1: derived: poetry (>=2.0)
Checking if keyring is available
[keyring:keyring.backend] Loading KWallet
[keyring:keyring.backend] Loading SecretService
[keyring:keyring.backend] Loading Windows
[keyring:keyring.backend] Loading chainer
[keyring:keyring.backend] Loading libsecret
[keyring:keyring.backend] Loading macOS
Using keyring backend 'SecretService Keyring'
Creating new session for pypi.org
[urllib3:urllib3.connectionpool] Starting new HTTPS connection (1): pypi.org:443
[urllib3:urllib3.connectionpool] https://pypi.org:443 "GET /simple/ruff/ HTTP/1.1" 304 0
[filelock:filelock] Attempting to acquire lock 133241499689920 on /home/jan/.cache/pypoetry/cache/repositories/PyPI/_http/5/b/e/6/4/5be64dddf357efe8e015c621695508a39823691e4777c7d90558ec8b.lock
[filelock:filelock] Lock 133241499689920 acquired on /home/jan/.cache/pypoetry/cache/repositories/PyPI/_http/5/b/e/6/4/5be64dddf357efe8e015c621695508a39823691e4777c7d90558ec8b.lock
[filelock:filelock] Attempting to release lock 133241499689920 on /home/jan/.cache/pypoetry/cache/repositories/PyPI/_http/5/b/e/6/4/5be64dddf357efe8e015c621695508a39823691e4777c7d90558ec8b.lock
[filelock:filelock] Lock 133241499689920 released on /home/jan/.cache/pypoetry/cache/repositories/PyPI/_http/5/b/e/6/4/5be64dddf357efe8e015c621695508a39823691e4777c7d90558ec8b.lock
Source (PyPI): 3 packages found for ruff >=0.8.4
Source (PyPI): 1 packages found for tox >=4.23.2
Source (PyPI): 1 packages found for pytest >=8.3.4
Source (PyPI): 1 packages found for tomlkit >=0.13.2
Source (PyPI): 1 packages found for packaging >=24.2
Source (PyPI): 1 packages found for poetry >=2.0
   1: fact: tox (4.23.2) depends on cachetools (>=5.5)
   1: fact: tox (4.23.2) depends on chardet (>=5.2)
   1: fact: tox (4.23.2) depends on colorama (>=0.4.6)
   1: fact: tox (4.23.2) depends on filelock (>=3.16.1)
   1: fact: tox (4.23.2) depends on packaging (>=24.1)
   1: fact: tox (4.23.2) depends on platformdirs (>=4.3.6)
   1: fact: tox (4.23.2) depends on pluggy (>=1.5)
   1: fact: tox (4.23.2) depends on pyproject-api (>=1.8)
   1: fact: tox (4.23.2) depends on tomli (>=2.0.1)
   1: fact: tox (4.23.2) depends on typing-extensions (>=4.12.2)
   1: fact: tox (4.23.2) depends on virtualenv (>=20.26.6)
   1: selecting tox (4.23.2)
   1: derived: virtualenv (>=20.26.6)
   1: derived: typing-extensions (>=4.12.2)
   1: derived: tomli (>=2.0.1)
   1: derived: pyproject-api (>=1.8)
   1: derived: pluggy (>=1.5)
   1: derived: platformdirs (>=4.3.6)
   1: derived: filelock (>=3.16.1)
   1: derived: colorama (>=0.4.6)
   1: derived: chardet (>=5.2)
   1: derived: cachetools (>=5.5)
Source (PyPI): 5 packages found for virtualenv >=20.26.6
Source (PyPI): 1 packages found for typing-extensions >=4.12.2
Source (PyPI): 4 packages found for tomli >=2.0.1
Source (PyPI): 1 packages found for pyproject-api >=1.8
Source (PyPI): 1 packages found for pluggy >=1.5
Source (PyPI): 1 packages found for platformdirs >=4.3.6
Source (PyPI): 1 packages found for filelock >=3.16.1
Source (PyPI): 1 packages found for colorama >=0.4.6
Source (PyPI): 1 packages found for chardet >=5.2
Source (PyPI): 1 packages found for cachetools >=5.5
   1: fact: pytest (8.3.4) depends on colorama (*)
   1: fact: pytest (8.3.4) depends on exceptiongroup (>=1.0.0rc8)
   1: fact: pytest (8.3.4) depends on iniconfig (*)
   1: fact: pytest (8.3.4) depends on packaging (*)
   1: fact: pytest (8.3.4) depends on pluggy (>=1.5,<2)
   1: fact: pytest (8.3.4) depends on tomli (>=1)
   1: selecting pytest (8.3.4)
   1: derived: pluggy (>=1.5,<2)
   1: derived: iniconfig
   1: derived: exceptiongroup (>=1.0.0rc8)
Source (PyPI): 6 packages found for iniconfig *
Source (PyPI): 12 packages found for exceptiongroup >=1.0.0rc8
   1: selecting tomlkit (0.13.2)
   1: selecting packaging (24.2)
   1: fact: poetry (2.0.0) depends on build (>=1.2.1,<2.0.0)
   1: fact: poetry (2.0.0) depends on cachecontrol[filecache] (>=0.14.0,<0.15.0)
   1: fact: poetry (2.0.0) depends on cleo (>=2.1.0,<3.0.0)
   1: fact: poetry (2.0.0) depends on dulwich (>=0.22.6,<0.23.0)
   1: fact: poetry (2.0.0) depends on fastjsonschema (>=2.18.0,<3.0.0)
   1: fact: poetry (2.0.0) depends on importlib-metadata (>=4.4)
   1: fact: poetry (2.0.0) depends on installer (>=0.7.0,<0.8.0)
   1: fact: poetry (2.0.0) depends on keyring (>=25.1.0,<26.0.0)
   1: fact: poetry (2.0.0) depends on packaging (>=24.0)
   1: fact: poetry (2.0.0) depends on pkginfo (>=1.12,<2.0)
   1: fact: poetry (2.0.0) depends on platformdirs (>=3.0.0,<5)
   1: fact: poetry (2.0.0) depends on poetry-core (2.0.0)
   1: fact: poetry (2.0.0) depends on pyproject-hooks (>=1.0.0,<2.0.0)
   1: fact: poetry (2.0.0) depends on requests (>=2.26,<3.0)
   1: fact: poetry (2.0.0) depends on requests-toolbelt (>=1.0.0,<2.0.0)
   1: fact: poetry (2.0.0) depends on shellingham (>=1.5,<2.0)
   1: fact: poetry (2.0.0) depends on tomli (>=2.0.1,<3.0.0)
   1: fact: poetry (2.0.0) depends on tomlkit (>=0.11.4,<1.0.0)
   1: fact: poetry (2.0.0) depends on trove-classifiers (>=2022.5.19)
   1: fact: poetry (2.0.0) depends on virtualenv (>=20.26.6,<21.0.0)
   1: fact: poetry (2.0.0) depends on xattr (>=1.0.0,<2.0.0)
   1: selecting poetry (2.0.0)
   1: derived: xattr (>=1.0.0,<2.0.0)
   1: derived: virtualenv (>=20.26.6,<21.0.0)
   1: derived: trove-classifiers (>=2022.5.19)
   1: derived: tomli (>=2.0.1,<3.0.0)
   1: derived: shellingham (>=1.5,<2.0)
   1: derived: requests-toolbelt (>=1.0.0,<2.0.0)
   1: derived: requests (>=2.26,<3.0)
   1: derived: pyproject-hooks (>=1.0.0,<2.0.0)
   1: derived: poetry-core (==2.0.0)
   1: derived: platformdirs (>=3.0.0,<5)
   1: derived: pkginfo (>=1.12,<2.0)
   1: derived: keyring (>=25.1.0,<26.0.0)
   1: derived: installer (>=0.7.0,<0.8.0)
   1: derived: importlib-metadata (>=4.4)
   1: derived: fastjsonschema (>=2.18.0,<3.0.0)
   1: derived: dulwich (>=0.22.6,<0.23.0)
   1: derived: cleo (>=2.1.0,<3.0.0)
   1: derived: cachecontrol[filecache] (>=0.14.0,<0.15.0)
   1: derived: build (>=1.2.1,<2.0.0)
Source (PyPI): 2 packages found for xattr >=1.0.0,<2.0.0
Source (PyPI): 52 packages found for trove-classifiers >=2022.5.19
Source (PyPI): 4 packages found for shellingham >=1.5,<2.0
Source (PyPI): 1 packages found for requests-toolbelt >=1.0.0,<2.0.0
Source (PyPI): 11 packages found for requests >=2.26,<3.0
Source (PyPI): 3 packages found for pyproject-hooks >=1.0.0,<2.0.0
Source (PyPI): 1 packages found for poetry-core 2.0.0
Source (PyPI): 1 packages found for pkginfo >=1.12,<2.0
Source (PyPI): 8 packages found for keyring >=25.1.0,<26.0.0
Source (PyPI): 1 packages found for installer >=0.7.0,<0.8.0
Source (PyPI): 52 packages found for importlib-metadata >=4.4
Source (PyPI): 7 packages found for fastjsonschema >=2.18.0,<3.0.0
Source (PyPI): 2 packages found for dulwich >=0.22.6,<0.23.0
Source (PyPI): 1 packages found for cleo >=2.1.0,<3.0.0
Source (PyPI): 2 packages found for cachecontrol >=0.14.0,<0.15.0
Source (PyPI): 3 packages found for build >=1.2.1,<2.0.0
   1: fact: pyproject-api (1.8.0) depends on packaging (>=24.1)
   1: fact: pyproject-api (1.8.0) depends on tomli (>=2.0.1)
   1: selecting pyproject-api (1.8.0)
   1: selecting pluggy (1.5.0)
   1: selecting platformdirs (4.3.6)
   1: selecting filelock (3.16.1)
   1: selecting colorama (0.4.6)
   1: selecting chardet (5.2.0)
   1: selecting cachetools (5.5.0)
   1: fact: requests-toolbelt (1.0.0) depends on requests (>=2.0.1,<3.0.0)
   1: selecting requests-toolbelt (1.0.0)
   1: selecting poetry-core (2.0.0)
   1: selecting pkginfo (1.12.0)
   1: selecting installer (0.7.0)
   1: fact: cleo (2.1.0) depends on crashtest (>=0.4.1,<0.5.0)
   1: fact: cleo (2.1.0) depends on rapidfuzz (>=3.0.0,<4.0.0)
   1: selecting cleo (2.1.0)
   1: derived: rapidfuzz (>=3.0.0,<4.0.0)
   1: derived: crashtest (>=0.4.1,<0.5.0)
Source (PyPI): 27 packages found for rapidfuzz >=3.0.0,<4.0.0
Source (PyPI): 1 packages found for crashtest >=0.4.1,<0.5.0
   1: selecting crashtest (0.4.1)
   1: selecting trove-classifiers (2024.10.21.16)
   1: selecting rapidfuzz (3.11.0)
   1: fact: requests (2.32.3) depends on charset-normalizer (>=2,<4)
   1: fact: requests (2.32.3) depends on idna (>=2.5,<4)
   1: fact: requests (2.32.3) depends on urllib3 (>=1.21.1,<3)
   1: fact: requests (2.32.3) depends on certifi (>=2017.4.17)
   1: selecting requests (2.32.3)
   1: derived: certifi (>=2017.4.17)
   1: derived: urllib3 (>=1.21.1,<3)
   1: derived: idna (>=2.5,<4)
   1: derived: charset-normalizer (>=2,<4)
Source (PyPI): 37 packages found for certifi >=2017.4.17
Source (PyPI): 50 packages found for urllib3 >=1.21.1,<3
Source (PyPI): 17 packages found for idna >=2.5,<4
Source (PyPI): 24 packages found for charset-normalizer >=2,<4
   1: selecting urllib3 (2.3.0)
   1: selecting certifi (2024.12.14)
   1: selecting charset-normalizer (3.4.1)
   1: selecting idna (3.10)
   1: fact: keyring (25.6.0) depends on pywin32-ctypes (>=0.2.0)
   1: fact: keyring (25.6.0) depends on SecretStorage (>=3.2)
   1: fact: keyring (25.6.0) depends on jeepney (>=0.4.2)
   1: fact: keyring (25.6.0) depends on importlib_metadata (>=4.11.4)
   1: fact: keyring (25.6.0) depends on jaraco.classes (*)
   1: fact: keyring (25.6.0) depends on jaraco.functools (*)
   1: fact: keyring (25.6.0) depends on jaraco.context (*)
   1: selecting keyring (25.6.0)
   1: derived: jaraco.context
   1: derived: jaraco.functools
   1: derived: jaraco.classes
   1: derived: importlib_metadata (>=4.11.4)
   1: derived: jeepney (>=0.4.2)
   1: derived: SecretStorage (>=3.2)
   1: derived: pywin32-ctypes (>=0.2.0)
Source (PyPI): 27 packages found for jaraco-context *
Source (PyPI): 46 packages found for jaraco-functools *
Source (PyPI): 20 packages found for jaraco-classes *
Source (PyPI): 7 packages found for jeepney >=0.4.2
Source (PyPI): 5 packages found for secretstorage >=3.2
Source (PyPI): 4 packages found for pywin32-ctypes >=0.2.0
   1: fact: jaraco-functools (4.1.0) depends on more-itertools (*)
   1: selecting jaraco-functools (4.1.0)
   1: derived: more-itertools
Source (PyPI): 47 packages found for more-itertools *
   1: selecting more-itertools (10.5.0)
   1: fact: jaraco-context (6.0.1) depends on backports.tarfile (*)
   1: selecting jaraco-context (6.0.1)
   1: derived: backports.tarfile
Source (PyPI): 4 packages found for backports-tarfile *
   1: fact: jaraco-classes (3.4.0) depends on more-itertools (*)
   1: selecting jaraco-classes (3.4.0)
   1: selecting fastjsonschema (2.21.1)
   1: selecting iniconfig (2.0.0)
   1: fact: virtualenv (20.28.1) depends on distlib (>=0.3.7,<1)
   1: fact: virtualenv (20.28.1) depends on filelock (>=3.12.2,<4)
   1: fact: virtualenv (20.28.1) depends on platformdirs (>=3.9.1,<5)
   1: selecting virtualenv (20.28.1)
   1: derived: distlib (>=0.3.7,<1)
Source (PyPI): 3 packages found for distlib >=0.3.7,<1
   1: selecting shellingham (1.5.4)
   1: selecting ruff (0.8.6)
   1: selecting pyproject-hooks (1.2.0)
   1: fact: build (1.2.2.post1) depends on packaging (>=19.1)
   1: fact: build (1.2.2.post1) depends on pyproject_hooks (*)
   1: fact: build (1.2.2.post1) depends on colorama (*)
   1: fact: build (1.2.2.post1) depends on importlib-metadata (>=4.6)
   1: fact: build (1.2.2.post1) depends on tomli (>=1.1.0)
   1: selecting build (1.2.2.post1)
   1: selecting distlib (0.3.9)
   1: fact: dulwich (0.22.7) depends on urllib3 (>=1.25)
   1: selecting dulwich (0.22.7)
   1: fact: cachecontrol[filecache] (0.14.1) depends on cachecontrol (0.14.1)
   1: fact: cachecontrol[filecache] (0.14.1) depends on requests (>=2.16.0)
   1: fact: cachecontrol[filecache] (0.14.1) depends on msgpack (>=0.5.2,<2.0.0)
   1: fact: cachecontrol[filecache] (0.14.1) depends on filelock (>=3.8.0)
   1: selecting cachecontrol[filecache] (0.14.1)
   1: derived: msgpack (>=0.5.2,<2.0.0)
   1: derived: cachecontrol (==0.14.1)
Source (PyPI): 18 packages found for msgpack >=0.5.2,<2.0.0
   1: fact: cachecontrol (0.14.1) depends on requests (>=2.16.0)
   1: fact: cachecontrol (0.14.1) depends on msgpack (>=0.5.2,<2.0.0)
   1: selecting cachecontrol (0.14.1)
   1: selecting msgpack (1.1.0)
   1: selecting typing-extensions (4.12.2)
   1: fact: importlib-metadata (8.5.0) depends on zipp (>=3.20)
   1: selecting importlib-metadata (8.5.0)
   1: derived: zipp (>=3.20)
Source (PyPI): 4 packages found for zipp >=3.20
   1: selecting zipp (3.21.0)
   1: selecting exceptiongroup (1.2.2)
   1: selecting jeepney (0.8.0)
   1: fact: secretstorage (3.3.3) depends on cryptography (>=2.0)
   1: fact: secretstorage (3.3.3) depends on jeepney (>=0.6)
   1: selecting secretstorage (3.3.3)
   1: derived: cryptography (>=2.0)
Source (PyPI): 81 packages found for cryptography >=2.0
   1: fact: cryptography (44.0.0) requires Python !=3.9.0,!=3.9.1,>=3.7
   1: derived: not cryptography (==44.0.0)
   1: fact: cryptography (43.0.3) depends on cffi (>=1.12)
   1: selecting cryptography (43.0.3)
   1: derived: cffi (>=1.12)
Source (PyPI): 19 packages found for cffi >=1.12
   1: fact: cffi (1.17.1) depends on pycparser (*)
   1: selecting cffi (1.17.1)
   1: derived: pycparser
Source (PyPI): 22 packages found for pycparser *
   1: selecting pycparser (2.22)
   1: selecting tomli (2.2.1)
   1: selecting pywin32-ctypes (0.2.3)
   1: selecting backports-tarfile (1.2.0)
   1: fact: xattr (1.1.0) depends on cffi (>=1.16.0)
   1: selecting xattr (1.1.0)
   1: Version solving took 0.700 seconds.
   1: Tried 1 solutions.

Finding the necessary packages for the current system

Package operations: 0 installs, 0 updates, 46 removals

  - Removing build (1.2.2.post1): Pending...
  - Removing build (1.2.2.post1): Removing...
  - Removing build (1.2.2.post1)
  - Removing cachecontrol (0.14.1): Pending...
  - Removing cachecontrol (0.14.1): Removing...
  - Removing cachecontrol (0.14.1)
  - Removing cachetools (5.5.0): Pending...
  - Removing cachetools (5.5.0): Removing...
  - Removing cachetools (5.5.0)
  - Removing certifi (2024.12.14): Pending...
  - Removing certifi (2024.12.14): Removing...
  - Removing certifi (2024.12.14)
  - Removing cffi (1.17.1): Pending...
  - Removing cffi (1.17.1): Removing...
  - Removing cffi (1.17.1)
  - Removing chardet (5.2.0): Pending...
  - Removing chardet (5.2.0): Removing...
  - Removing chardet (5.2.0)
  - Removing charset-normalizer (3.4.1): Pending...
  - Removing charset-normalizer (3.4.1): Removing...
  - Removing charset-normalizer (3.4.1)
  - Removing cleo (2.1.0): Pending...
  - Removing cleo (2.1.0): Removing...
  - Removing cleo (2.1.0)
  - Removing colorama (0.4.6): Pending...
  - Removing colorama (0.4.6): Removing...
  - Removing colorama (0.4.6)
  - Removing crashtest (0.4.1): Pending...
  - Removing crashtest (0.4.1): Removing...
  - Removing crashtest (0.4.1)
  - Removing cryptography (43.0.3): Pending...
  - Removing cryptography (43.0.3): Removing...
  - Removing cryptography (43.0.3)
  - Removing distlib (0.3.9): Pending...
  - Removing distlib (0.3.9): Removing...
  - Removing distlib (0.3.9)
  - Removing dulwich (0.22.7): Pending...
  - Removing dulwich (0.22.7): Removing...
  - Removing dulwich (0.22.7)
  - Removing fastjsonschema (2.21.1): Pending...
  - Removing fastjsonschema (2.21.1): Removing...
  - Removing fastjsonschema (2.21.1)
  - Removing filelock (3.16.1): Pending...
  - Removing filelock (3.16.1): Removing...
  - Removing filelock (3.16.1)
  - Removing idna (3.10): Pending...
  - Removing idna (3.10): Removing...
  - Removing idna (3.10)
  - Removing iniconfig (2.0.0): Pending...
  - Removing iniconfig (2.0.0): Removing...
  - Removing iniconfig (2.0.0)
  - Removing installer (0.7.0): Pending...
  - Removing installer (0.7.0): Removing...
  - Removing installer (0.7.0)
  - Removing jaraco-classes (3.4.0): Pending...
  - Removing jaraco-classes (3.4.0): Removing...
  - Removing jaraco-classes (3.4.0)
  - Removing jaraco-context (6.0.1): Pending...
  - Removing jaraco-context (6.0.1): Removing...
  - Removing jaraco-context (6.0.1)
  - Removing jaraco-functools (4.1.0): Pending...
  - Removing jaraco-functools (4.1.0): Removing...
  - Removing jaraco-functools (4.1.0)
  - Removing jeepney (0.8.0): Pending...
  - Removing jeepney (0.8.0): Removing...
  - Removing jeepney (0.8.0)
  - Removing keyring (25.6.0): Pending...
  - Removing keyring (25.6.0): Removing...
  - Removing keyring (25.6.0)
  - Removing more-itertools (10.5.0): Pending...
  - Removing more-itertools (10.5.0): Removing...
  - Removing more-itertools (10.5.0)
  - Removing msgpack (1.1.0): Pending...
  - Removing msgpack (1.1.0): Removing...
  - Removing msgpack (1.1.0)
  - Removing packaging (24.2): Pending...
  - Removing packaging (24.2): Removing...
  - Removing packaging (24.2)
  - Removing pkginfo (1.12.0): Pending...
  - Removing pkginfo (1.12.0): Removing...
  - Removing pkginfo (1.12.0)
  - Removing platformdirs (4.3.6): Pending...
  - Removing platformdirs (4.3.6): Removing...
  - Removing platformdirs (4.3.6)
  - Removing pluggy (1.5.0): Pending...
  - Removing pluggy (1.5.0): Removing...
  - Removing pluggy (1.5.0)
  - Removing poetry (2.0.0): Pending...
  - Removing poetry (2.0.0): Removing...
  - Removing poetry (2.0.0)
  - Removing poetry-core (2.0.0): Pending...
  - Removing poetry-core (2.0.0): Removing...
  - Removing poetry-core (2.0.0)
  - Removing pycparser (2.22): Pending...
  - Removing pycparser (2.22): Removing...
  - Removing pycparser (2.22)
  - Removing pyproject-api (1.8.0): Pending...
  - Removing pyproject-api (1.8.0): Removing...
  - Removing pyproject-api (1.8.0)
  - Removing pyproject-hooks (1.2.0): Pending...
  - Removing pyproject-hooks (1.2.0): Removing...
  - Removing pyproject-hooks (1.2.0)
  - Removing pytest (8.3.4): Pending...
  - Removing pytest (8.3.4): Removing...
  - Removing pytest (8.3.4)
  - Removing rapidfuzz (3.11.0): Pending...
  - Removing rapidfuzz (3.11.0): Removing...
  - Removing rapidfuzz (3.11.0)
  - Removing requests (2.32.3): Pending...
  - Removing requests (2.32.3): Removing...
  - Removing requests (2.32.3)
  - Removing requests-toolbelt (1.0.0): Pending...
  - Removing requests-toolbelt (1.0.0): Removing...
  - Removing requests-toolbelt (1.0.0)
  - Removing ruff (0.8.6): Pending...
  - Removing ruff (0.8.6): Removing...
  - Removing ruff (0.8.6)
  - Removing secretstorage (3.3.3): Pending...
  - Removing secretstorage (3.3.3): Removing...
  - Removing secretstorage (3.3.3)
  - Removing shellingham (1.5.4): Pending...
  - Removing shellingham (1.5.4): Removing...
  - Removing shellingham (1.5.4)
  - Removing tomlkit (0.13.2): Pending...
  - Removing tomlkit (0.13.2): Removing...
  - Removing tomlkit (0.13.2)
  - Removing tox (4.23.2): Pending...
  - Removing tox (4.23.2): Removing...
  - Removing tox (4.23.2)
  - Removing trove-classifiers (2024.10.21.16): Pending...
  - Removing trove-classifiers (2024.10.21.16): Removing...
  - Removing trove-classifiers (2024.10.21.16)
  - Removing urllib3 (2.3.0): Pending...
  - Removing urllib3 (2.3.0): Removing...
  - Removing urllib3 (2.3.0)
  - Removing virtualenv (20.28.1): Pending...
  - Removing virtualenv (20.28.1): Removing...
  - Removing virtualenv (20.28.1)

Writing lock file

jvllmr avatar Jan 05 '25 21:01 jvllmr

There is nothing that comes directly to my mind. Maybe, you can track down which commit causes this change?

radoering avatar Jan 06 '25 05:01 radoering

I compared the sources of 1.8.5 and 2.0.0. In 1.8.5 does Installer::_do_install multiple solves with all depedencies, one solve with only the group depndencies and somewhat combines the resulting operations in a smart way... I guess?

In 2.0.0 Transaction::calculate_operations is only called once with the specified group dependencies and the allowance to uninstall. While this approach works good with commands such as install, add or remove, it doesn't really work with updates (or syncs?) because the transaction only knows the group dependencies from the solver and tries to uninstall everything else.

Therefore I suspect the change to be somewhere in 713e672 (#9427)

jvllmr avatar Jan 06 '25 19:01 jvllmr

Note that I also see the same behavior with installer.re-resolve = false

jvllmr avatar Jan 06 '25 19:01 jvllmr

poetry install --sync --only types has the same issue

jvllmr avatar Jan 07 '25 19:01 jvllmr

poetry install --sync --only types has the same issue

Not sure if I understand correctly, but this command should uninstall all packages that are not required in the types group. That did not change from 1.8 to 2.0.

On the other side, the behavior of poetry update changed and that was at least unintended so we have to check how to restore the old behavior.

radoering avatar Jan 08 '25 04:01 radoering

I bisected it. This is the commit: https://github.com/python-poetry/poetry/pull/9345/commits/bd3500d07cd0ab0d10d26917fdda3abdd8e67704

radoering avatar Jan 08 '25 04:01 radoering

This issue 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[bot] avatar Feb 11 '25 00:02 github-actions[bot]