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

[1.2.0a2] Running poetry remove uninstalls all default dependencies. #4373

Closed
3 tasks done
onerandomusername opened this issue Aug 11, 2021 · 3 comments
Closed
3 tasks done
Labels
kind/bug Something isn't working as expected

Comments

@onerandomusername
Copy link
Contributor

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

Issue

>>> poetry add python-dotenv
Using version ^0.19.0 for python-dotenv

Updating dependencies
Resolving dependencies... (31.9s)

Writing lock file

Package operations: 0 installs, 1 update, 0 removalsUpdating discord.py (2.0.0a3453+g58ca9e99 58ca9e9 -> 2.0.0a3466+g6e6c8a7b 6e6c8a7)
>>> poetry remove python-dotenv
Updating dependencies
Resolving dependencies... (2.2s)

Writing lock file

Package operations: 0 installs, 0 updates, 20 removalsRemoving aiodns (3.0.0)
  • Removing aiohttp (3.7.4.post0)
  • Removing arrow (1.1.1)
  • Removing async-timeout (3.0.1)
  • Removing brotlipy (0.7.0)
  • Removing cchardet (2.1.7)
  • Removing cffi (1.14.6)
  • Removing chardet (4.0.0)
  • Removing coloredlogs (15.0.1)
  • Removing discord.py (2.0.0a3466+g6e6c8a7b 6e6c8a7)
  • Removing environs (9.3.3)
  • Removing humanfriendly (9.2)
  • Removing marshmallow (3.13.0)
  • Removing multidict (5.1.0)
  • Removing pycares (4.0.0)
  • Removing pycparser (2.20)
  • Removing pydantic (1.8.2)
  • Removing python-dateutil (2.8.2)
  • Removing python-dotenv (0.19.0)
  • Removing yarl (1.6.3)

This is just after running poetry run task export, which expanded, is the following:

echo 'Exporting installed packages to requirements.txt.\n\
This task automatically relocks the lock file using "poetry lock --no-update"' && \
poetry lock --no-update && \
echo '# Do not manually edit.\n# Generate with "poetry run task export"\n' > requirements.txt && \
echo "Exporting..." && \
poetry export --without-hashes >> requirements.txt && \
echo "Done exporting."

Please note, this is in the toml file and is a multiline string, which needed to be escaped.

Desired Behavior

Poetry should not uninstall all default dependencies when removing one dependency from a project.

@onerandomusername onerandomusername added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Aug 11, 2021
@jleclanche
Copy link
Contributor

Confirming this behaviour on 1.2.0a2.

@finswimmer
Copy link
Member

This is duplicated by #4632 and fixed by python-poetry/poetry-core#220.

@abn abn removed the status/triage This issue needs to be triaged label Mar 3, 2022
Copy link

github-actions bot commented Mar 2, 2024

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 github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

4 participants