Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance development/debugging support #5624

Open
2 tasks done
nishantvarma opened this issue May 17, 2022 · 0 comments
Open
2 tasks done

Enhance development/debugging support #5624

nishantvarma opened this issue May 17, 2022 · 0 comments
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged

Comments

@nishantvarma
Copy link

nishantvarma commented May 17, 2022

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Feature Request

Can poetry support development/debugging in a better way, especially for consumers who use pyc wheels for deployment and source code for development?

Consider the below examples/pyproject.toml:

The current behavior of poetry install --no-dev is to error out with a conflict. If deps is has a caret i.e., ^2.1.0, it installs from the source code.

It would have been more sensible for --no-dev to ignore the tool.poetry.dependencies.So, in scenario 1 and 2 it should have just installed Flask 2.1.0 and 2.1.2 (the latest available as on date) respectively.

The current behavior or poetry install is to error out with the same conflict as above. With caret, it installs Flask from source code; but without deps. When the section is removed from tool.dependencies, it installs from source code with deps.

It would have been more sensible to override the Flask key in tool.poetry.dev-dependencies over tool.poetry.dependencies. So, in scenario 1, 2 and 3 it should have just installed Flask from source code with all its deps.

This is quite similar to #2837; but I thought I will explain why it is good to have that feature.

Also, is it possible to activate a package that I am interested in (like mr.developer and pip install -e)? This is similar to #34, but I am trying to reuse an existing deployment environment for development/debugging. It should activate the package in development mode, using poetry.lock wherever possible.

Eventual goal is to have a single pyproject.toml file that can be used for development/deployment/debugging without much hassle.

Note: pip install -e . seems to works, but is there a recommended way?

[tool.poetry]
name = "poetry"
version = "0.1.0"
description = "Poetry"
authors = ["Nishant Varma"]

[tool.poetry.dependencies]
python = "^3.9"
flask = "2.1.0"

[tool.poetry.dev-dependencies]
flask = { git = "https://github.com/pallets/flask.git", branch = "main", develop = true }

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
@nishantvarma nishantvarma added kind/feature Feature requests/implementations status/triage This issue needs to be triaged labels May 17, 2022
@nishantvarma nishantvarma changed the title Enhancements to become development friendly Enhance development/debugging support May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant