You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today, the editable installer (poetry>1.0.10), does not handle removals of files (includes, console scripts etc.) cleanly. This needs to be improved.
There are two potential approaches,
Handle the delta manually by using the *.dist-info/RECORD csv file. We could load the list prior to new install and then identify the delta after installation.
Uninstall editable package explicitly (this today might need to use pip until poetry has an internal mechanism) prior to installation again. This might be cleaner as this should separate the concerns cleanly.
Reproduction
This issue can be reproduced as follows.
poetry new foo
pushd foo
sed -i /pytest/d pyproject.toml
echo'def main(): print("hello world")'>> foo/__init__.py
printf'\n\n[tool.poetry.scripts]\nhello = "foo:main"'>> pyproject.toml
poetry install
sed -i s/hello/world/g pyproject.toml
poetry install
Today, once this is done, the following happens.
$ poetry run type hellohello is /tmp/foo/.venv/bin/hello
We expect this to happen.
$ poetry run type hello/usr/bin/type: line 2: type: hello: not found
Just to be complete, as #3289 mentions, a set of related reproduction steps:
# assuming poetry 1.1.4, in-project venv, and python 3.8:
poetry new foo
cd foo
poetry install
poetry version minor
poetry install
then
ls .venv/lib/python3.8/site-packages/foo-*.dist-info
outputs something similar to
.venv/lib/python3.8/site-packages/foo-0.1.0.dist-info:
INSTALLER METADATA RECORD
.venv/lib/python3.8/site-packages/foo-0.2.0.dist-info:
INSTALLER METADATA RECORD
Therefore
poetry run python -c "from importlib.metadata import version; print(version('foo'))"
outputs
0.1.0
instead of the expected
0.2.0
.venv/lib/python3.8/site-packages/foo-0.1.0.dist-info should have been removed.
Activity
bhallaY commentedon Sep 12, 2020
Hi, I would like to attempt to resolve this issue! I can try to follow way 2 you specify.
finswimmer commentedon Nov 1, 2020
Hello @bhallaY ,
do you still like to work on this issue?
fin swimmer
akeeman commentedon Nov 5, 2020
Just to be complete, as #3289 mentions, a set of related reproduction steps:
then
ls .venv/lib/python3.8/site-packages/foo-*.dist-infooutputs something similar to
Therefore
outputs
instead of the expected
.venv/lib/python3.8/site-packages/foo-0.1.0.dist-infoshould have been removed.abn commentedon Apr 14, 2021
Resolved by: #3900
github-actions commentedon 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.