python-poetry / python-poetry/poetry
Fall back to public PyPI if 'ConnectionError' occurs
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 34.3k
- Forks
- 2.5k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 30
Description
- I have searched the issues of this repo and believe that this is not a duplicate.
- I have searched the documentation and believe that my question is not covered.
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:
ConnectionError
HTTPConnectionPool(host=SOME_HOST, port=80): Max retries exceeded with url: SOME_URL (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x109f17f10>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known'))
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing Poetry's existing repository fallback behavior and how ConnectionError is handled during package installation. Compare the current behavior for a reachable repository with a missing package to the requested behavior for an unreachable private repository, then verify that installation can continue against public PyPI without breaking the existing secondary-repository behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100