question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make `poetry remove <package>` work on dev-dependencies

See original GitHub issue
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Feature Request

$ poetry add -D <package>
$ poetry remove <package>

  ValueError

  Package <package> not found

It’d be nice if remove (and possibly other subcommands) would also look in the dev-dependencies for convenience. The error message in this case seems rather confusing. Same works for example with yarn.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
finswimmercommented, Oct 14, 2020

There is already a feature request for this in https://github.com/python-poetry/poetry/issues/2058. That’s why I will close this one here.

I think the reason for confusion about the current behavior is, that only few people are aware, that one can define the same package in both section as @abn said.

IMO a confirm dialog would be fine. But also just removing the dep if it’s only in one section would be nice. (My personal opinion)

0reactions
silverwindcommented, Oct 14, 2020

Thanks for finding that one and sorry for not searching throughly enough. GitHub search was not really helpful when searching for keywords like “remove” which are found in many issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Commands | Documentation | Poetry - Python dependency ...
This command will help you create a pyproject.toml file interactively by prompting you to provide basic information about your package. It will interactively ......
Read more >
Poetry remove fails to remove any packages? - Stack Overflow
This worked for me. Although I did get the message The --dev option is deprecated, use the `--group dev` notation instead. – Bell....
Read more >
Dependency Management With Python Poetry
A dependency manager like Python Poetry helps you specify, install, and resolve external packages in your projects. This way, you can be sure ......
Read more >
Python packaging and dependency management using poetry
If you decide Poetry isn't your thing, you can completely remove it from your system by running the installer again with the --uninstall...
Read more >
Managing Python Dependencies with Poetry
Now every time you run poetry install , development dependencies will also get installed. If don't want the packages listed under dev-dependencies section ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found