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

Regression from v2023.6.18 for editable package dependencies #5766

Closed
justin-yan opened this issue Jun 30, 2023 · 4 comments
Closed

Regression from v2023.6.18 for editable package dependencies #5766

justin-yan opened this issue Jun 30, 2023 · 4 comments
Assignees
Labels
Contributor Candidate The issue has been identified/triaged and contributions are welcomed/encouraged. Type: Regression This issue is a regression of a previous behavior.

Comments

@justin-yan
Copy link

Issue description

When installing a package in editable mode, pipenv does not include its transitive dependencies on version 2023.06.26, when it does on version 2023.06.18.

I've created an example repo here: https://github.com/justin-yan/pipenvtest/tree/1aeb6b6d28662319a0250cdd8d8a7220812ed358 where the pipenvtest package is defined with one dependency (pyyaml): https://github.com/justin-yan/pipenvtest/blob/1aeb6b6d28662319a0250cdd8d8a7220812ed358/pyproject.toml#L10

Expected result

  • I'm using pipenv installed via pipx install pipenv==2023.06.18 --force
  • Running pipenv lock from a clean clone of this repo.

Results in a Pipfile.lock that includes the pyyaml package:

...
    "default": {
        "pipenvtest": {
            "editable": true,
            "path": "."
        },
        "pyyaml": {
            "hashes": [
                "sha256:01b45c0191e6d66c470b6cf1b9531a771a83c1c4208272ead47a3ae4f2f603bf",
                "sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293",
...

Actual result

  • I'm using pipenv installed via pipx install pipenv==2023.06.26 --force
  • Running pipenv lock from a clean clone of this repo.

Results in a Pipfile.lock that does not include the transitive dependencies of pipenvtest:

...
        ]
    },
    "default": {
        "pipenvtest": {
            "editable": true,
            "path": "."
        }
    },
    "develop": {
        "attrs": {
            "hashes": [
...
@matteius
Copy link
Member

Interesting, I suspect this may only be an issue for when the transitive dependencies are defined in the pyproject.toml? This will require further investigation towards a fix, thanks for your report!

@matteius matteius added Type: Regression This issue is a regression of a previous behavior. Contributor Candidate The issue has been identified/triaged and contributions are welcomed/encouraged. labels Jun 30, 2023
@matteius
Copy link
Member

Initial analysis revealed that get_pyproject in requirementslib.model.utils reads that pyproject.toml but is only focused on extending out the build requirements and not the actual dependencies. It should be extended to return both sets of information and the places that utilize it. In the models.requirements dependencies property, it can then extend the setup_deps list with the dependencies -- should be the path towards resolving this one.

@matteius
Copy link
Member

matteius commented Jul 1, 2023

@justin-yan I just had a good test run for the proposed fix of this issue if you would like to try out that branch. I just pushed a unit test as well that failed on main and passed on this branch.

@matteius matteius closed this as completed Jul 1, 2023
@justin-yan
Copy link
Author

Just tried it out on 2023.7.2.dev0 and can confirm that the issue seems to be resolved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contributor Candidate The issue has been identified/triaged and contributions are welcomed/encouraged. Type: Regression This issue is a regression of a previous behavior.
Projects
None yet
Development

No branches or pull requests

2 participants