python-poetry / python-poetry/poetry

Additional source is being ignored while inheriting dependencies

Open
#4,659 11 comments 4 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: macOS Big Sur 11.6

  • Poetry version: 1.1.11

Issue

Hi guys!
I'm using poetry for loading multiple projects and they depend on one another with the following structure:

.
├── project_1
│   └── pyproject.toml
└── project_2
    └── pyproject.toml

project_1/pyproject.toml

[[tool.poetry.source]]
name = "artifactory"
url = "https://pypi.example.com"
default = true

[tool.poetry.dependencies]
private_package = {version ="0.0.1", source = "artifactory"}

project_2/pyproject.toml

[tool.poetry.dependencies]
requests = "2.26.0"
fastapi = "0.65.3"

[tool.poetry.dependencies.project_1]
path = "../project_1"

And while I'm trying to execute poetry install or poetry update in project_2 it fails to find private_package (despite the same commands are working well inside project_1)
It makes me think that additional source, which was added in project_1 doesn't affect project_2

Can you please tell me if that's working well as designed and I'm trying to do something which is not supported entirely or if I'm misusing a tool and there's a lack of configurations?

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 reported setup using the two project_1 and project_2 pyproject.toml files, then run poetry install and poetry update in project_2 with -vvv. Check whether the source declared in project_1 is expected to apply to the inherited dependency. Done means establishing the supported behavior and either documenting it or identifying the relevant resolver change.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.