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

Support for python VCS package version update triggers #6147

Closed
1 task done
MrKevinWeiss opened this issue Nov 16, 2022 · 5 comments
Closed
1 task done

Support for python VCS package version update triggers #6147

MrKevinWeiss opened this issue Nov 16, 2022 · 5 comments
Labels
L: python:pip Python packages via pip Stale T: feature-request Requests for new features

Comments

@MrKevinWeiss
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Feature description

Hey everyone 👋

Dependabot seems really great and a nice way to reduce the overhead of using many separate repos. I have been struggling to find some information on how to resolve python packages that do not exist on pypi.

For example, if I have a requirement.txt or Pipfile or something that contains a vcs link to a python package, how can I check to see if something has been updated?

I am aware of that using VCS with pip has limitations, for example, I don't think >= would work...

For example if I have a requirements.txt file:

git+https://github.com/me/pkg1#egg=pkg1==0.1.0

and I release a 0.2.0 in the "default" branch, should that trigger a version update then?
with pip install I get a

  WARNING: Requested pkg1==0.1.0 from git+https://github.com/MrKevinWeiss/pkg1#egg=pkg1==0.1.0 (from -r requirements.txt (line 2)), but installing version 0.2.0

message so it is aware that there is a version mismatch...

The alternative would be using tags/commit hashes with the editable version. In that case I shouldn't it just check if the tag or so has been changed in the tree? Is there any option to allow that?

Is there a preferred method for managing dependencies with (git) repo based python packages?

I did notice that the Pipfile shows the pkg1 on the dependency graph, while the requirements.txt does not. Most of my trials has been with requirements, should I repeat with Pipfile or another package manager file?

Maybe even just pointing to some examples where this is used as #3494 seems like a step beyond (ie, dealing with private repos).

Lots of questions, I know, thanks for looking!

@MrKevinWeiss MrKevinWeiss added the T: feature-request Requests for new features label Nov 16, 2022
@jeffwidman jeffwidman added the L: python:pip Python packages via pip label Nov 16, 2022
@pavera
Copy link
Contributor

pavera commented Nov 16, 2022

Unfortunately pip itself has been changed and no longer parses versions from VCS requirements in a requirements.txt file. This prevents us from being able to accurately compare versions to determine if an update is needed.

I would recommend investigating pipenv/Pipfile or poetry though I don't know if those will work either, only that Dependabot does not currently support updating VCS dependencies defined in a requirements.txt file. If you find a working solution or learn anything specific to pipenv or poetry in this investigation we'd love to hear about it here.

@MrKevinWeiss
Copy link
Author

If you find a working solution or learn anything specific to pipenv or poetry in this investigation we'd love to hear about it here.

Thanks for the clarification, I will continue investigation and update if I find something useful!

@MrKevinWeiss
Copy link
Author

Ok, I tried with Pipfile (pipenv) and with the pyproject.toml (poetry), with branches, versions, editable modes, tags, and commit hashes. Nothing seems to trigger updates but I do see the Pipfile and pyproject.toml VCS links at least. I tried also with a requirements.in file but it didn't seem to do much (and that would also be my least favorite way of managing things).

I have yet to try with URL artifacts but I would assume that it probably will not work.

This has not been exhaustive but so far I would say that VCS based python version checks are not supported... If anyone has had some success with trigger a version bump PR based off of a VCS (preferably git) python package dependency please let me know what the conditions were. Otherwise I would humbly request that feature!

@MrKevinWeiss
Copy link
Author

I also tried with the insecure-external-code-execution allowed and no luck... I guess I can use the gitsubmodule as a workaround (though it is not as clean as with pip)...

@MrKevinWeiss MrKevinWeiss changed the title Is it possible to do version checks with pip on git (or vcs) repos? Support for python VCS package version update triggers Nov 18, 2022
Copy link
Contributor

👋 This issue has been marked as stale because it has been open for 2 years with no activity. You can comment on the issue to hold stalebot off for a while, or do nothing. If you do nothing, this issue will be closed eventually by the stalebot. Please see CONTRIBUTING.md for more policy details.

@github-actions github-actions bot added the Stale label Nov 18, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: python:pip Python packages via pip Stale T: feature-request Requests for new features
Projects
None yet
Development

No branches or pull requests

3 participants