python-poetry / python-poetry/poetry

Package hosted on a custom repository: dependencies are not installed

Open
#2,586 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug status/triage
Dominant language
Python
Stars
34.3k
Forks
2.5k
Avg merge
2d 19h
Merged PRs (30d)
30

Description

  • I am on the latest Poetry version.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

  • OS version and name: Ubuntu 20.04 LTS

  • Poetry version: Poetry version 1.0.8

Issue

Setup:

  • I have built a mydependency package with poetry, in which I specify a requirement numba = "0.48.0". I publish this package on my own pypi server with poetry publish -r mypypi.
  • I then specify this package as a dependency for my new project, myproject.

Issue:
Running poetry update (or poetry add), only installs the mydependency package but not its requirement numba==0.48.0. Whereas running pip install mydependency installs both the package and the dependencies.

Reproducible example

In my case I am using a custom pypi server on localhost, using pypi-server. I have set it up in poetry with: poetry config repositories.mypypi http://localhost:8080/

Steps to reproduce:

  1. poetry new mydependency && cd mydependency
  2. Change pyproject.toml to include:
[tool.poetry.dependencies]
python = "^3.8"
numba = "0.48.0"
  1. poetry update && poetry publish --build -r mypypi --username=' ' --password=' '
  2. cd .. && poetry new myproject && cd myproject
  3. Change pyproject.toml to include:
[[tool.poetry.source]]
name = "mypypi"
url = "http://localhost:8080"
  1. poetry update && poetry add mydependency

The last command only results in:

Package operations: 1 install, 0 updates, 0 removals

  - Installing mydependency (0.1.0)
    Installing from unsecure host: localhost

Whereas pip install --extra-index-url http://localhost:8080 mydependency installs all dependencies correctly, meaning it is not a fault with poetry build.

Maybe worth mentioning: using a relative import with mydependency = { path = '../mydependency', develop=false } in the pyproject.toml for myproject does not have the same issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue using the listed Poetry commands, the custom pypi-server setup, and the two pyproject.toml files. Compare poetry update/add dependency resolution with pip's extra-index-url behavior; done means mydependency and its pinned numba==0.48.0 dependency are both installed from the custom repository.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.