-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Fall back to public PyPI if 'ConnectionError' occurs #2783
Comments
Any progress on merging the PR? |
@abn I think this one is bit different. try:
response = self.session.get(url)
if response.status_code in (401, 403):
self._log(
"Authorization error accessing {url}".format(url=url),
level="warning",
)
return
if response.status_code == 404:
return
response.raise_for_status()
except requests.HTTPError as e:
raise RepositoryError(e) #
# <<< here we have uncaught exception NewConnectionError |
Honestly I wouldn't want to see this ever getting implemented in Poetry. It goes against the whole determinism / reproducibility idea of the lockfile that is one of the keypoints of the project. If the lockfile says that a package must be downloaded from repo xyz then that same package must always be downloaded from repo xyz. Note how there can be several reasons why you want to make sure packages are always downloaded from the same source, other than mere determinism:
Overall I think your best chance to see this getting implemented is to develop a plugin on your own. I'm invoking an extra opinion from core maintainers before closing this issue - @dimbleby |
@ralbertazzi Just one more point - you focused on |
Feature Request
I have a private PyPI repository defined in
pyproject.toml
. The repository is located within my corporate network. When I don't use VPN and try to install any package, I get such an error:which is quite obvious. But what I would like to see is an option to ignore the error and try to install packages from the next expected repository, in that case - the public PyPI. Currently, the fallback mechanism works only for cases when a repository is reachable, but some package is missing.
PS The same error occurs even if
secondary = true
is used - which of course is reasonable, but it's not always the behaviour you would like to achieve.The text was updated successfully, but these errors were encountered: