python-poetry / python-poetry/poetry

Priority of .egg-info, .dist-info, and setup.py

Open
#4,103 4 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/solver status/needs-consensus
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 11.3.1

  • Poetry version: 1.1.6

  • Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/4df62bef5bccf68667b8dd31c62e2a90

Issue

This is arguably not a poetry issue, but I think it'd be nice if poetry or its dependencies did something to avoid the problem I'm having. In addition to the pyproject.toml file I linked above, my toy example here also contains the directory foo whose only contents is this setup.py file.

To reproduce the problem I'm having, do the following:

  1. Run pip install -e foo.
  2. Modify the setup.py file to depend on another package such as requests.
  3. Run poetry lock.

The problem here is that step (1) creates a foo.egg-info directory which poetry lock uses in step (3) despite the setup.py file being modified to include other dependencies in step (2). Using the packages from my example here, poetry.lock only includes urllib3 and not requests which I added as a dependency in step (2).

Can poetry or its dependencies do something to avoid this 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

Start with the linked pyproject.toml and foo/setup.py, then reproduce the sequence of pip install -e foo, modifying setup.py, and poetry lock. Trace how the generated foo.egg-info is used during locking; done means the lock reflects the updated requests dependency instead of stale metadata.

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
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.