-
-
Notifications
You must be signed in to change notification settings - Fork 614
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
Ignore hashes for version control repositories #994
Comments
Hello @a666, Thanks for the issue! I believe this should be implemented on pip side. See related issues:
However, there are possible solutions:
|
Thank you @atugushev for the quick answer. I forgot to precise that we are using your first solution for the time being. |
Hi @atugushev, what did you mean by this?
Did you mean split the By the way, it seems like if #333 were implemented, that would be another possible solution. If one knows certain VCS requirements are included in a |
Hello @cjerdonek! That's exactly what I mean. Yeah, |
Thanks, @atugushev! However, won't splitting the |
@cjerdonek, yes, you are right. |
Okay, thanks a lot for confirming. |
Hello, Not sure if this is the right place, but I'd like to show you my case so that you have more information about the issues that arise. Most of the code has been omitted to show only the gist: tox.ini [tox]
minversion = 3.22
envlist = py{37,38,39,310}
[testenv]
extras = testing
deps =
-rrequirements.txt
commands =
coverage erase
coverage run -m pytest {posargs} requirements.in django
# ... Command to compile requirements.txt file pip-compile --generate-hashes --output-file=requirements.txt requirements.in requirements.txt # line line 11
asgiref==3.3.4 \
--hash=sha256:92906c611ce6c967347bbfea733f13d6313901d54dcca88195eaeb52b2a8e8ee \
--hash=sha256:d1216dfbdfb63826470995d31caed36225dcaf34f182e0fa257a4dd9e86f1b78
# via django
# ... Relevant part of setup.py EXTRAS_REQUIRE = {
'testing': [
'pytest>=6.2.0',
'pytest-cov>=2.11.1',
'pytest-django>=4.2.0',
'factory-boy>=3.2.0',
'faker>=8.1.0',
],
}
# ...
if __name__ == '__main__':
setup(
# ...
extras_require=EXTRAS_REQUIRE,
) Command to install deps and run tests tox Output from GitHub Actions
This issue occurs only for Python 3.7. Possible due this part of setup.cfg from asgiref repo: [options]
python_requires = >=3.6
packages = find:
include_package_data = true
install_requires =
typing_extensions; python_version < "3.8"
zip_safe = false Possible related issues: Let me know if I can provide more information. |
I'd also like to see this feature. Currently we have some local dependencies checked into VCS (with git lfs) and I'd like to ignore those dependencies when running |
Hi!
I get an error when pip-compile is trying to clone: $pip-compile --generate-hashes requirements.in
ERROR:pip.subprocessor:[present-diagnostic] git clone --filter=blob:none --quiet https://github.com/hvlads/django-ckeditor-5/archive/073b40bbf506d084f9b20788e6a17187001b65ae.zip /[SOME_PATH]/src/django-ckeditor-5 exited with 128
Traceback (most recent call last): If I ran the clone myself: $git clone --filter=blob:none --quiet https://github.com/hvlads/django-ckeditor-5/archive/073b40bbf506d084f9b20788e6a17187001b65ae.zip
remote: Not Found
fatal: repository 'https://github.com/hvlads/django-ckeditor-5/archive/073b40bbf506d084f9b20788e6a17187001b65ae.zip/' not found
Getting the archive with $ wget https://github.com/hvlads/django-ckeditor-5/archive/073b40bbf506d084f9b20788e6a17187001b65ae.zip
--2022-06-06 10:55:09-- https://github.com/hvlads/django-ckeditor-5/archive/073b40bbf506d084f9b20788e6a17187001b65ae.zip
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/hvlads/django-ckeditor-5/zip/073b40bbf506d084f9b20788e6a17187001b65ae [following]
--2022-06-06 10:55:10-- https://codeload.github.com/hvlads/django-ckeditor-5/zip/073b40bbf506d084f9b20788e6a17187001b65ae
Resolving codeload.github.com (codeload.github.com)... 140.82.121.9
Connecting to codeload.github.com (codeload.github.com)|140.82.121.9|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘073b40bbf506d084f9b20788e6a17187001b65ae.zip’
073b40bbf506d084f9b20788e6a17187001b65ae.zip [ <=> ] 1,63M 2,46MB/s in 0,7s
2022-06-06 10:55:11 (2,46 MB/s) - ‘073b40bbf506d084f9b20788e6a17187001b65ae.zip’ saved [1708665] If I replace the url with the redirected one |
This link isn't actually a git protocol thing, and not really editable, so try this change: - -e git+https://github.com/hvlads/djan...
+ https://github.com/hvlads/djan... |
I have a similar error like above #994 (comment)
In my case, it's also GitHub Actions and happens only with Python 3.9 (with 3.10 and 3.11 everything is fine). Looks like:
Complete CI run: https://github.com/jedie/cookiecutter_templates/actions/runs/3509450818/jobs/5878554915
|
It seems like hash-checking mode for VCS URLs would be supported soon: After the PR is merged, some work would be required on the pip-tools side to hide the warning. |
Also add work-a-round for: jazzband/pip-tools#994
Also add work-a-round for: jazzband/pip-tools#994
What's the problem this feature will solve?
Right now we are having the following situation.
Having a requirements.in like:
and doing:
gives us the error:
Replacing our repo with
-e git+ssh://[email protected]/[email protected]#egg=private_app
changes the error toDescribe the solution you'd like
It would be ideal for version control repositories to skip hashing (since access and integrity is handled differently) while keeping it for every other package.
Alternative Solutions
pipenv (ugh) seems to do it.
The text was updated successfully, but these errors were encountered: