2

I've a poetry-managed project. When I run:

poetry add isort@5.10.1 --dev

I'm getting this dependency added to the project, however some other dependencies are automatically removed, namely:

  • importlib-metadata
  • typed-ast
  • zipp (dependency of importlib-metadata)

None of the removed dependencies was listed in pyproject.toml.

What is the reason for that? importlib seems to be a python builtin. Is it safe to commit such change? How can I determine potential problems?

Opal
  • 81,889
  • 28
  • 189
  • 210
  • Could there be conflict somewhere? Are you getting any messages? What depends on the removed packages? What happens when you follow these instructions before adding the new package: https://stackoverflow.com/q/25376213/2988730? – Mad Physicist Mar 24 '22 at 13:02
  • No conflict, no messages, all good. Actually nothing seems to depend on it. Will have a look at the provided link. – Opal Mar 24 '22 at 14:37
  • @MadPhysicist the link you provided is not about poetry. I don't requirements.txt here. – Opal Mar 24 '22 at 14:38

1 Answers1

2

When you update one or more dependencies, it could and will happen that some dependencies of those dependencies are not necessary anymore. Poetry will detect this and remove unused transient dependencies for you.

finswimmer
  • 10,896
  • 3
  • 34
  • 44
  • Actually I didn't have isort present in the dependencies, so it seems that this is not this case here. – Opal Mar 24 '22 at 14:38