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.

poetry update not updating included local packages

See original GitHub issue

Consider the following directory structure:

poetry-package/
├── foo
│   └── foo.py
├── pyproject.toml
└── setup.py

Where foo.py is empty, setup.py is simply:

from setuptools import setup

setup(name='foo-package', version='0.0.1', packages=['foo'])

and pyproject.toml looks like:

[tool.poetry]
name = "foo-package-dev"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
packages = [{include = "foo"}]

[tool.poetry.dependencies]
python = "^3.8"

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"

If I now run poetry install then the local foo-package version 0.0.1 is correctly installed since poetry run pip list gives:

Package     Version Location
----------- ------- ----------------------------------
foo-package 0.0.1   /home/pedro/Desktop/poetry-package
pip         19.2.3
setuptools  41.2.0

However if I now modify the setup.py bumping the version from 0.0.1 to 0.0.2 and then run poetry update the local package is not updated. On the other hand if run poetry install then the local package does indeed get updated (as per poetry run pip list). So my question is: is this a bug or a feature? I would’ve expected the update command to actually update the local included package but that isn’t the case.

For the record I’m using poetry version 1.0.5

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
neersightedcommented, Oct 9, 2022

It’s still unclear what was being asked/requested here, or what is expected to happen. Poetry is not designed to be used with setuptools to manage the same project. The only reason that poetry install even triggers anything related to setup.py at all is for legacy technical reasons that we are migrating away from. poetry update does not interact with a setup.py at all, quite properly.

If you have a use case you think requires this, I would suggest creating a Discussion or joining Discord to see if others can help you use pure Poetry, or if Poetry is not the right tool for your project.

1reaction
petobenscommented, Mar 23, 2020

My use case finswimmer is that I want to install a non-poetry project with poetry. So I would like to run poetry within the project and not outside of it (and use the relative paths suggested by you). In this scenario I was wondering why is it that poetry update doesn’t update the package dependencies.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Poetry pyproject.toml not updating after running 'poetry add ...
I solved this by deleting all the poetry envs in my .cache/virtualenvs folder, and then running poetry install from within my project again, ......
Read more >
Update Packages in Python Poetry - YippeeCode
First step is to find out what packages are currently installed in your system. Then, find the ones that are outdated. You can...
Read more >
Commands | Documentation | Poetry - Python dependency ...
This will resolve all dependencies of the project and write the exact versions into poetry.lock . If you just want to update a...
Read more >
Announcing Poetry 1.2.0 | Blog
The Poetry team is pleased to announce the immediate availability of Poetry 1.2.0. Poetry 1.2 boasts a massive list of changes, new features ......
Read more >
The pyproject.toml file | Documentation | Poetry
If your project is proprietary and does not use a specific licence, ... A list of packages and modules to include in the...
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