pip 19.2. breaks poetry (private repository)
- [X] I am on the latest Poetry version.
- [X] I have searched the issues of this repo and believe that this is not a duplicate.
- [x] If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption).
- OS version and name: OSX Mojave 10.14.5
- Poetry version: 0.12.17 (latest)
- Pip version: 19.2.1. (latest)
Note: This issue is closely related to pip issue #6775
Issue
I am using a private repository for my packages, which is working with the latest poetry and pip 19.1.1. With pip 19.2.1, I am getting the following error:
ERROR: Could not install packages due to an EnvironmentError: Failed to parse: https://[email protected]:mypassword@my/pypi/simple/mylib/
This happens with essentially every install command, i.e. update, add, install.
As per pip issue #6775, this is actually the correct behaviour, and I should be encoding my variables. I can do that and it works directly in pip 19.2.1:
alias urlencode='python3 -c "import sys; from urllib.parse import quote; print(quote(sys.argv[1]))"'
pip install --index-url="https://$(urlencode $MY_USER):$(urlencode $MY_PASSWORD)@my/pypi/simple" mylib
My expectation was that poetry would take care of the url encoding where necessary. However, I gave it a try by using the already encoded username and password:
poetry config http-basic.previse $(urlencode $MY_USER) $(urlencode $MY_PASSWORD)
That however yields the following exception, suggesting that my private repo was actually not being used:
Package [mylib] not found.
As a side note, maybe logging the repository being queried would be useful - I did not get any information about it when using -vvv.
Can you check to see if #1341 solves your problem?
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.