Skip to content

Support Poetry depenedency manager #1871

Closed

Description

Currently it looks like Pipenv is supported but not poetry. Is there plans to support this dependency manager as well?

Note:

Activating poetry environments do not work (at least not yet).
python-poetry/poetry#198
python-poetry/poetry#571

Activity

  1. brettcannon commented on Jun 5, 2018

    @brettcannon
    Member

    No specific plans at the moment, but if people begin to vote for this issue with a 👍 reaction then we will definitely consider it.

  2. brettcannon commented on Jun 13, 2018

    @brettcannon
    Member

    We are going to wait until poetry hits version 1.0 before making a decision about this. People should continue to leave a 👍 reaction on the top comment until then to help us prioritize a decision and potential work compared to other feature requests.

  3. kevinpostal commented on Jan 16, 2019

    @kevinpostal
  4. kevinpostal commented on Jan 16, 2019

    @kevinpostal

    One workaround is to use virtualenvs in project root. Then vscode picks it up.
    poetry config settings.virtualenvs.in-project true

  5. qubitron commented on Jan 30, 2019

    @qubitron

    We are looking at implementing this, so I want to clarify the desired behavior here: if Poetry is detected in the current environment, prompt user if they want to install packages (pylint, rope, etc) using poetry.

    Is that correct? Please let us know if there's additional behavior desired here.

  6. leos commented on Jan 31, 2019

    @leos

    Any installations should happen via poetry. It would also be great if VS Code could autodetect the poetry virtualenv and use it.

  7. lig commented on Jan 31, 2019

    @lig

    Dan Taylor (@qubitron) personally, I found poetry's lack of interpreter version management ability a bit frustrating. I believe this should be addressed in the implementation somehow. Comparing to pipenv's ability to choose an interpreter version to create the environment based on Pipfile, poetry always uses the default interpreter to create the environment and could fail if the version is incompatible with the requirement defined in pyproject.toml.

  8. DonJayamanne commented on Jan 31, 2019

    @DonJayamanne

    I believe this should be addressed in the implementation somehow.

    Activating poetry environments do not work (at least not yet).
    python-poetry/poetry#198
    python-poetry/poetry#571

    If things don't work in the tool itself, we're not going to try to add workarounds or implement solutions.

    What can be done however is just add support for using poetry, when the extension prompts users to install any python packages. We do this today for conda, pipenv, environments.

    I.e. when user needs to install a formatter, we'll (optionally) make use of poetry.

  9. 1 remaining item

  10. abhishekvm commented on Feb 17, 2019

    @abhishekvm

    We are looking at implementing this, so I want to clarify the desired behavior here: if Poetry is detected in the current environment, prompt user if they want to install packages (pylint, rope, etc) using poetry.

    Is that correct? Please let us know if there's additional behavior desired here.

    Till the time support for poetry gets added, I was thinking if there is any hacky way we can get through this. vscode installs any packages with following command:
    <PYTHONPATH>python -m pip install -U pytest or <PYTHONPATH>python -m pip install -U pylint

    Is there any way in vscode where we can map pip install to poetry add --dev?

  11. brettcannon commented on Feb 20, 2019

    @brettcannon
    Member

    Abhishek Mulay (@abhishekvm) nope, we don't provide that kind of functionality. You can always do the install manually while people wait for this feature since as you noticed we aren't doing anything too magical.

  12. DonJayamanne commented on Feb 27, 2019

    @DonJayamanne
  13. dclong commented on Mar 12, 2019

    @dclong
  14. brettcannon commented on Mar 12, 2019

    @brettcannon
  15. ericsnowcurrently commented on Mar 18, 2019

    @ericsnowcurrently

    I was able to verify that poetry is used to install modules:

    1. python -m pip install --user poetry
    2. in project: python -m poetry init
    3. in project: python -m poetry lock
    4. workspace settings: "python.linting.flake8enabled": true
    5. reload window

    This caused the popup for installing flake8. Then poetry was used to install flake8.

  16. locked as resolved and limited conversation to collaborators on Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-request

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions