-
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
Better handling of repositories - abstract away repository config from pyproject.toml and poetry.lock #3539
Comments
Yes, I believe such a feature is vital. It has been suggested or hinted by multiple people already that there is need for that. Not sure if there is a concrete feature request ticket yet. I'd like to link to this discussion that also provides great background feedback on the topic (although the premise of the disscussion may seem a bit unrelated): https://discuss.python.org/t/dependency-notation-including-the-index-url/5659 |
I am currently running into the same issue. I'm on a corporate laptop where the central PyPi is blocked and I have to use a local mirror. For developing on my machine it's fine if I add the repo with |
With |
Just like bundler in ruby, poetry is not perfect when it comes to working behind a custom repo. It forces you to put the mirror in your poetry.lock and pyproject.toml, which we don't really want for now. Some related issues: python-poetry/poetry#3539 python-poetry/poetry#559
Duplicate #5958 as it has more discussion. |
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. |
Feature Request
Consider this use case:
So, for my local development I add code like this to
pyproject.toml
:That's fine and good for my local development needs. But, now when I publish the project the
pyproject.toml
will refer to a primary repositoryfoo
that other developers don't have access to, and thepoetry.lock
file also has multiple references to thisfoo
repository:This is not very helpful for other developers and collaboration, as the first thing other collaborators have to do is remove (or do a big search/replace on) the
poetry.lock
file, and remove thefoo
repo frompyrpoject.toml
.These are all symptoms of the fact that Poetry makes no distinction between where a package comes from, and what packages are needed as dependencies.
Far more helpful would be to have a separate configuration file telling poetry what repositories should be used for dependency resolution, and for
pyproject.toml
andpoetry.lock
to only contain details on what the dependencies are (package name, and hash forpoetry.lock
). Sayrepositories.toml
.It would also be helpful if it was possible to set the repository configuration globally as well as per project (i.e. a global config file, overridden by a per project config file if present).
The text was updated successfully, but these errors were encountered: