-vvv option).On poetry lock, anything that depends on mypy (and through mypy, mypy_extensions) results in 301
[tool.poetry]
name = "foo"
version = "0.1.0"
description = ""
authors = []
[tool.poetry.dev-dependencies]
mypy = "*"
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
The error happens here:
File "$HOME/.poetry/lib/poetry/_vendor/py3.6/requests/sessions.py", line 166, in resolve_redirects
raise TooManyRedirects('Exceeded %s redirects.' % self.max_redirects, response=resp)
Printing the url and response text inside that block, I see
https://pypi.org/pypi/mypy-extensions/json {"message": "The resource has been moved to /pypi/mypy_extensions/json; you should be redirected
automatically.\n\n", "code": "301 Moved Permanently", "title": "Moved Permanently"}
and printing outside that block, I see it flipping back and forth between mypy_extensions and mypy-extensions.
In the browser, both _ and - result in my ending up at mypy-extensions, as does running it in a python prompt
>>> requests.get('https://pypi.org/pypi/mypy-extensions/json').url
'https://pypi.org/pypi/mypy-extensions/json'
>>> requests.get('https://pypi.org/pypi/mypy_extensions/json').url
'https://pypi.org/pypi/mypy-extensions/json'
I can't tell if I ought to submit this against warehouse instead, because of the apparent behavior coming from the requests, but i can't reproduce outside the context of this poetry call.
poetry cache:clear --all pypi
That worked, thanks! (poetry cache clear --all pypi in 1.0b1). Was this caused by a change on pypi?
With that knowledge, I searched and found https://github.com/sdispater/poetry/issues/728, my bad :(
Is this something that ought to be in the docs somewhere? the cache command isn't documented
Most helpful comment
poetry cache:clear --all pypi