-
-
Notifications
You must be signed in to change notification settings - Fork 592
pip / pip_tools requirements update target upgrading by default #1334
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
Comments
The above PR did a bunch of work implementing this functionality. We have unit tests here: https://github.com/bazelbuild/rules_python/tree/main/tests/compile_pip_requirements But they are not running using bzlmod. |
A workaround I have used it delete the file and run the command. This works with this target: But with the 3.9 target, we get a weird error about the toolchain. I need to include that error here as well. TODO - include the error message here. |
Not sure offhand. Is this the code that uses an atexit callback to copy the modified file to where it's supposed to go? ... Ah yes, it is. Maybe that has something to do with it? |
So this is odd. Python 3.10 piptools is finding You must update the requirements to set the |
I have found the problem or feature. dependency_resolver.py does not pass in We would need to add the following:
To somewhere around here: The question is should we upgrade the package requirements by default? A user can do the following:
Which will give pip_tools the option to upgrade the packages to the highest version. This needs to be documented. |
I don't think anyone would want to upgrade their entire dependency closure every time. There probably should always be a choice. Or I guess somebody can add an I think the distinction between Semantic differences explained.
|
This issue has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days. |
This issue was automatically closed because it went 30 days without a reply since it was labeled "Can Close?" |
I'm testing on the main branch with the bzlmod example.
We have two issues:
dependency_resolver.py
cp /dev/null
to the requirement file:examples/bzlmod/requirements_lock_3_9.txt
I am testing on WSL/Linux with bazelisk.
When running the target
https://github.com/bazelbuild/rules_python/blob/93f5ea2f01ce7eb870d3ad3943eda5d354cdaac5/examples/bzlmod/BUILD.bazel#L18
The above command should update the file:
https://github.com/bazelbuild/rules_python/blob/93f5ea2f01ce7eb870d3ad3943eda5d354cdaac5/examples/bzlmod/BUILD.bazel#L21
But the contents of the file are not changing.
On Linux, this line of code is run:
https://github.com/bazelbuild/rules_python/blob/93f5ea2f01ce7eb870d3ad3943eda5d354cdaac5/python/pip_install/tools/dependency_resolver/dependency_resolver.py#L179
But the following lines do not run. The
cli()
call is not throwing an error, but the script seems to exit.The
run
command outputs the updated requirements file changes, but the file is not updated.When you run the same file with Windows Powershell, the Windows requirements file is updated correctly.
The text was updated successfully, but these errors were encountered: