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

Installing black with poetry fails #5756

Closed
kbakk opened this issue May 24, 2019 · 3 comments
Closed

Installing black with poetry fails #5756

kbakk opened this issue May 24, 2019 · 3 comments

Comments

@kbakk
Copy link

kbakk commented May 24, 2019

Environment data

  • VS Code version: 1.34.0
  • Extension version (available under the Extensions sidebar): 2019.4.12954
  • OS and version: macOS 10.14.5
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.3
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv via Poetry
  • Relevant/affected Python packages and their versions: black

Expected behaviour

Use --allow-prereleases option from poetry when installing black (until black comes with a released version).

Actual behaviour

source /Users/kristofferb/Library/Caches/pypoetry/virtualenvs/my-project-py3.7/bin/activate
poetry add black

~/Code/my-project
% source /Users/kristofferb/Library/Caches/pypoetry/virtualenvs/my-project-py3.7/bin/activate

~/Code/my-project
my-project-py3.7 % poetry add black
                                                      
[ValueError]                           
Could not find a matching version of package black  
                                                      
add [-D|--dev] [--git GIT] [--path PATH] [-E|--extras EXTRAS] [--optional] [--python PYTHON] [--platform PLATFORM] [--allow-prereleases] [--dry-run] [--] <name> (<name>)...

Steps to reproduce:

  1. Install poetry
  2. poetry new my-project && code my-project
  3. poetry install to have it set up venv
  4. update .vscode/settings.json python.pythonPath to the venv created by poetry
  5. update .vscode/settings.json python.poetryPath to the path to the poetry executable (which poetry)
  6. open my_project/init.py, run Format Document
  7. On prompt "Formatter autopep8 is not installed. Install?" select "Use Black"
  8. Notice that the extension runs a command in the terminal (as described under Actual behavior).

Logs

Not relevant, can be provided upon request though

@ghost ghost added the triage-needed Needs assignment to the proper sub-team label May 24, 2019
@kbakk
Copy link
Author

kbakk commented May 24, 2019

Related issue: psf/black#517 Non-prerelease black release

@DonJayamanne
Copy link

Duplicate of #5171

@DonJayamanne DonJayamanne marked this as a duplicate of #5171 May 28, 2019
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label May 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 4, 2019
notpushkin added a commit to notpushkin/vscode-python that referenced this issue Jun 11, 2019
@DonJayamanne DonJayamanne reopened this Jun 18, 2019
@ghost ghost added the triage-needed Needs assignment to the proper sub-team label Jun 18, 2019
@DonJayamanne DonJayamanne added this to the 2019 - June Sprint 12 milestone Jun 18, 2019
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Jun 18, 2019
@ghost ghost removed the needs PR label Jun 20, 2019
@kimadeline kimadeline reopened this Jun 20, 2019
@ghost ghost added the triage-needed Needs assignment to the proper sub-team label Jun 20, 2019
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Jun 20, 2019
@kimadeline
Copy link

Validated

@ghost ghost removed the needs PR label Jun 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants