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

setup.cfg + pip-compile > requirements.txt = Dependabot buggy PRs #6593

Open
jeffwidman opened this issue Feb 4, 2023 · 4 comments
Open
Labels
L:python:pip-compile Python packages via pip-compile T: bug 🐞 Something isn't working

Comments

@jeffwidman
Copy link
Member

I encountered an issue in a private repository. I observed that this problem happens when the requirements are specified in a package's setup.cfg and then compiled into requirements.txt.

I have been able to isolate the issue in this repository: https://github.com/titouanc/demo-incompatible-dependabot-upgrades

Originally posted by @titouanc in #3041 (comment)

@jeffwidman jeffwidman added T: bug 🐞 Something isn't working L:python:pip-compile Python packages via pip-compile labels Feb 4, 2023
@deivid-rodriguez
Copy link
Contributor

@titouanc Thanks for the nice report!

One question, do you still use this setup? I tried to reproduce what's being done locally in this toy repo and I got

build.BuildException: Source /path/to/titouanc/demo-incompatible-dependabot-upgrades does not appear to be a Python project: no pyproject.toml or setup.py

Maybe something changed in pip to start rejecting this kind of setup?

@titouanc
Copy link

titouanc commented Feb 6, 2023

Hello @deivid-rodriguez

I encountered the same error as you. I think more recent Python/pip enforce that there is a setup.py file; so I added one here titouanc/demo-incompatible-dependabot-upgrades@931daa5

Could you please try again ?

@deivid-rodriguez
Copy link
Contributor

Thanks!

Now I'm getting

ERROR: Could not find a version that satisfies the requirement tensorflow==2.6.0 (from demo-incompatible-dependabot-upgrades (setup.cfg)) (from versions: none)

which suggests that the starting point is not resolvable in the first place?

Regardless of that, I'm able to repro the issue. It's like Dependabot is not considering the setup.cfg file at all, right?

@deivid-rodriguez
Copy link
Contributor

deivid-rodriguez commented Feb 6, 2023

Oh, I think I know the problem. I think we only use "pip-compile" update logic if there's a .in files between the updated manifests. We should also autodetect that we need to use pip-compile logic too by looking at the header inside the requirements.txt file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L:python:pip-compile Python packages via pip-compile T: bug 🐞 Something isn't working
Projects
Status: Scoping
Development

No branches or pull requests

3 participants