Skip to content
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

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

Open
3 tasks done
bmw opened this issue May 25, 2021 · 3 comments
Open
3 tasks done

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

bmw opened this issue May 25, 2021 · 3 comments
Labels
area/solver Related to the dependency resolver status/needs-consensus Consensus among maintainers required

Comments

@bmw
Copy link

bmw commented May 25, 2021

  • 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?

@bmw bmw added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels May 25, 2021
@dimbleby
Copy link
Contributor

probably duplicate #3783, cf #6843

@radoering
Copy link
Member

radoering commented Oct 30, 2022

Actually a different issue than #3783 which is about poetry lock --no-update. Here, poetry lock is also affected.

Interestingly enough the following works:

  1. Run poetry lock
  2. Modify the setup.py file to depend on another package such as requests.
  3. Run poetry lock (lock file is updated correctly)

but the following doesn't:

  1. Run poetry lock
  2. Run poetry install (egg-info is created)
  3. Modify the setup.py file to depend on another package such as requests.
  4. Run poetry lock (lock file is not updated)

@finswimmer
Copy link
Member

At the moment .egg and .dist-info folders are parsed for metadata before trying to parse setup.py:

info = cls.from_metadata(path)

So the only way to solve this, would be to change the order. No idea if this would have any negative site effects 🤷‍♂️

@neersighted neersighted changed the title Old eggs are used by poetry Priority of .egg-info, .dist-info, and setup.py Oct 30, 2022
@neersighted neersighted added area/solver Related to the dependency resolver status/needs-consensus Consensus among maintainers required and removed kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Oct 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/solver Related to the dependency resolver status/needs-consensus Consensus among maintainers required
Projects
None yet
Development

No branches or pull requests

5 participants