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.

Editable mode is gone since `1.1.0a2`

See original GitHub issue
  • I am on the latest Poetry version.

    • Though this covers more than one release
  • 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).

  • OS version and name: Ubuntu 18.04.4 LTS x86_64

  • Poetry version: 1.1.0a2-b2

  • Link of a Gist with the contents of your pyproject.toml file:

Issue

I’ve been using 1.1.0a1 version since the beginning and having seen the recent pre-release updates I thought I’d try them out. Unfortunately, it doesn’t seem that Poetry has been able to install the root project in editable mode since 1.1.0a2 pre-release. I’ve checked also checked a3 and b2 and found the same behaviour.

pip list output using 1.1.0a1, as expected:

requests-toolbelt     0.9.1
safety                1.9.0
my-package 4.4.0     /projects/my-package/src

and what I saw for the more recent pre-releases mentioned above:

requests-toolbelt     0.9.1
safety                1.9.0
my-package 4.4.0     /projects/my-package/.venv/lib/python3.6/site-packages

It’s telling me that the editable installation is in the site-packages - by this logic every each of my dependencies is an editable one too 😅

Would be good to have sorted since it’s something that’s blocking me from updating. I’d be happy to help with this if you need extra hands.

See below for the pyproject.toml. The package metadata is altered a bit

[tool.poetry]
name = "my-package"
version = "4.4.0"
authors = ["Sarunas Nejus <my@email.com>"]
description = "My cool cool package"

readme = "README.rst"
repository = "https://github.com/my/package"

packages = [{ include = "mypackage", from = "src" }]
include = ["packagedata/**/*"]

[tool.poetry.urls]
Changelog = "https://github.com/my/package/CHANGELOG.md"

[[tool.poetry.source]]
name = "pripy"
url = "https://hidden-pypi.com"

[tool.poetry.dependencies]
python = "~3.6"

pydantic = "^1.5"
dataclasses = "^0.7"
dj-database-url = "^0.4"
psycopg2-binary = "^2.8"
python-dateutil = "*"
typing-extensions = "*"

[tool.poetry.dev-dependencies]
mypy = "^0.782"
flake8 = "^3.8"
safety = "^1.9"
pytest = "^5.4"
pylint = "^2.5"
pytest-cov = "^2.8"
pytest-randomly = "^3"


[tool.coverage.run]
branch = true
dynamic_context = "test_function"

[tool.coverage.report]
precision = 2
show_missing = true
exclude_lines = [
    "pragma: no cover",
    "if TYPE_CHECKING",
    "raise AssertionError",
    "raise NotImplementedError"
]

[tool.coverage.html]
show_contexts = true

[tool.pylint.MASTER]
class-rgx = "[A-Z_]+[a-zA-Z0-9]+$"
deprecated-modules = ["tkinter.tix", "formatter", "pycrypto", "optparse", "httpoxy", "xmlrpc",
                      "parser", "email", "pipes", "crypt", "spwd", "imp", "xml", "lxml"]
disable = [
    "no-member",  # buggy
    "bad-continuation",  # buggy
    "ungrouped-imports",  # incompatible with mypy
    "no-name-in-module",  # buggy
    "undefined-variable",  # covered by mypy
    "not-callable",  # covered by mypy
    "unused-import", # covered by flake8 which does it correctly
]
docstring-min-length = 10
good-names = "_,pk,pytest_plugins"
ignore-long-lines = 'noqa|^\s*(# )?<?https?://\S+>?$'
max-line-length = 90
max-nested-blocks = 3
msg-template="{path}:{module}:{line}: [{msg_id}({symbol}), {obj}] {msg}"
min-similarity-lines = 5
no-docstring-rgx = "^test_"
persistent = "no"

[tool.black]
line_length = 90

[tool.isort]
line_length = 90
multi_line_output = 3
include_trailing_comma = true

[build-system]
requires = ["poetry-core>=1.0.0a5"]
build-backend = "poetry.core.masonry.api"

Issue Analytics

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

github_iconTop GitHub Comments

10reactions
finswimmercommented, Oct 6, 2020

Hello @adamf,

the editable mode still works. The default behavior has changed. So if you define a path dependency, you have to set the develop key to true explicit:

my-package = {path = "../path/to/dependency", develop = true}
2reactions
dpompeu-xgeekscommented, Jun 1, 2022

Thanks for the input. I prefer the workaround provided by @nishantvarma , which does preserves poetry.lock:

Start with pendulum = "^2.1.2", lock and install. Update to the git with develop = true. Do a poetry lock --no-update to update the changes. Do an rm -rf .venv and poetry install. # Direct poetry install won’t work for the same reason as above. This kind of a removal but preserves the lock.

I’m glad there’s a workaround but I don’t think it’s a good solution for the long term. In my team, there has been a lot of confusion about this, especially because poetry fails to update the dependency but writes successful messages anyway. It will be inevitable that someone will forget one of the steps and gets some unnecessary pain and loss of time.

I think this deserves its own issue. I can create it and link to this thread.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to install a package using pip in editable mode with ...
ERROR: Project file:///tmp/demo has a 'pyproject.toml' and its build backend is missing the 'build_editable' hook. Since it does not have a 'setup.py' nor...
Read more >
mu-editor/general - Gitter
hello, I am on MacOS Catalina, tried once more to download the latest version (1.1.0.alpha.2) but dark mode still does not work (text...
Read more >
Using the roadmap feature in 1.1.0a2 - Forums
I just installed mantis 1.1.0a2 for our site. ... On the edit issue page all I see which is similar is the "scheduled"...
Read more >
History | Poetry - Python dependency management and ...
The install command will now install the current project in editable mode. The develop command is now deprecated in favor of install ....
Read more >
25.5. IDLE - Python 3.7.0a2 documentation
Output windows, such as used for Edit / Find in Files, are a subtype of edit ... Windows that have been changed since...
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