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 1.0.10 -> 1.1.4: Files added to local repository are not referenced

See original GitHub issue

Let’s say you have an index.html file you want to put along your Python code.

$ find .
pyproject.toml
package
package/foo.py

You do poetry install like that, before index.html exists.

Then you add it.

$ find .
pyproject.toml
package
package/foo.py
package/index.html

Now with 1.1.4, foo.py cannot see a index.html next to it. In 1.0.10 this worked fine. If you run poetry install after adding the index.html file, it installs nothing new and does not do what I intend.

If the index.html file exists before the very first poetry install, it seems to be fine.

I presume something with the way the virtual environments are made has been changed.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:20 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
sinoroccommented, Nov 10, 2020

As the console output shows: “No dependencies to install or update”. So the new files are not installed. You would need to poetry run python -m pip uninstall subpackage, or bump the version number for subpackage.

But wait…

Read this: https://python-poetry.org/docs/dependency-specification/#path-dependencies

Before poetry 1.1 directory path dependencies were installed in editable mode by default. You should set the develop attribute explicitly, to make sure the behavior is the same for all poetry versions.

That is what changed for you between 1.0.10 and 1.1.4. I guess you relied on the editable installation of path dependencies. But now path dependencies are not installed as editable by default any more. So you would need something like that in your pyproject.toml:

[tool.poetry.dependencies]
python = "^3.8"
subpackage = {path = "packages/subpackage", develop = true}
1reaction
gitpushdashfcommented, Nov 10, 2020

It works!!!

Actually, the issue I noticed was in converting an existing virtualenv from non-develop to develop (or I guess vice versa). Which, admittedly could be pretty dicey.

I’ll close this out. Thank you so much for your help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - Poetry trying to install everything from private repository
poetry first checks if the project is in your private-pypi and then checks public-pypi . Here the error is mostly because of 403...
Read more >
poetry-dynamic-versioning - PyPI
Dynamic versioning plugin for Poetry. This is a Python 3.7+ plugin for Poetry 1.2.0+ and Poetry Core 1.0.0+ to enable dynamic versioning based...
Read more >
Package List — Spack 0.20.0.dev0 documentation
Spack will search your current directory for the download files. Alternatively, add the files to a mirror so that Spack can find them....
Read more >
Commands | master | Documentation | Poetry - Python ...
Commands You've already learned how to use the command-line interface to do some things. This chapter documents all the available commands.
Read more >
History of Releases - Foliant - GitHub Pages
Anchors added to beginning of files are not random anymore. ... It is needed when local includes that rewrite image paths are used....
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