Closed ericorain closed 4 years ago
Hello @ericorain,
how does you pyproject.toml
looks like, before you do a poetry add pandas
?
When I do this in fresh project there are only 5 packages that get installed and removed:
$ poetry add pandas
Using version ^1.1.2 for pandas
Updating dependencies
Resolving dependencies... (0.3s)
Writing lock file
Package operations: 5 installs, 0 updates, 0 removals
• Installing six (1.15.0)
• Installing numpy (1.19.2)
• Installing python-dateutil (2.8.1)
• Installing pytz (2020.1)
• Installing pandas (1.1.2)
$ poetry remove pandas
Updating dependencies
Resolving dependencies... (0.1s)
Writing lock file
Package operations: 0 installs, 0 updates, 5 removals
• Removing numpy (1.19.2)
• Removing pandas (1.1.2)
• Removing python-dateutil (2.8.1)
• Removing pytz (2020.1)
• Removing six (1.15.0)
Hello finswimmer.
I removed the prj folder then created a new project. This time not all the python modules are downloaded (just 4 of them) but they appear in the list shown by "poetry show".
Here is the content of this file:
d:\Prog\python\poetry>poetry new prj
Created package prj in prj
d:\Prog\python\poetry>cd prj
d:\Prog\python\poetry\prj>poetry shell
[skip content]
d:\Prog\python\poetry\prj>more pyproject.toml
[tool.poetry]
name = "prj"
version = "0.1.0"
description = ""
authors = ["ericorain <email>"]
[tool.poetry.dependencies]
python = "^3.8"
[tool.poetry.dev-dependencies]
pytest = "^5.2"
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
d:\Prog\python\poetry\prj>
d:\Prog\python\poetry\prj>poetry add pandas
Using version ^1.1.2 for pandas
Updating dependencies
Resolving dependencies...
Writing lock file
Package operations: 4 installs, 0 updates, 0 removals
- Installing numpy (1.19.2)
- Installing python-dateutil (2.8.1)
- Installing pytz (2020.1)
- Installing pandas (1.1.2)
d:\Prog\python\poetry\prj>poetry show
atomicwrites 1.4.0 Atomic file writes.
attrs 20.2.0 Classes Without Boilerplate
colorama 0.4.3 Cross-platform colored terminal text.
more-itertools 8.5.0 More routines for operating on iterables, beyond itertools
numpy 1.19.2 NumPy is the fundamental package for array computing with Python.
packaging 20.4 Core utilities for Python packages
pandas 1.1.2 Powerful data structures for data analysis, time series, and statistics
pluggy 0.13.1 plugin and hook calling mechanisms for python
py 1.9.0 library with cross-python path, ini-parsing, io, code, log facilities
pyparsing 2.4.7 Python parsing module
pytest 5.4.3 pytest: simple powerful testing with Python
python-dateutil 2.8.1 Extensions to the standard Python datetime module
pytz 2020.1 World timezone definitions, modern and historical
six 1.15.0 Python 2 and 3 compatibility utilities
wcwidth 0.2.5 Measures the displayed width of unicode strings in a terminal
d:\Prog\python\poetry\prj>more pyproject.toml
[tool.poetry]
name = "prj"
version = "0.1.0"
description = ""
authors = ["ericorain <email>"]
[tool.poetry.dependencies]
python = "^3.8"
pandas = "^1.1.2"
[tool.poetry.dev-dependencies]
pytest = "^5.2"
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
d:\Prog\python\poetry\prj>
Hello @ericorain,
you have pytest
in your dev dependency list. This is why there are packages left after removing pandas
.
fin swimmer
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.
Hi.
If I use poetry to add a python module and I remove it immediately then I can see some dependencies are still visible with "poetry show" command. I was expecting an empty list. In addition those dependencies are not removable. Below we can see 15 dependencies added and 4 removed.
There is probably something wrong. Or did I miss something?