Skip to content

Pin pip to 25.2 while setting up control machine env - #6737

Closed
AmitPhulera wants to merge 3 commits into
masterfrom
ap/pin-pip-25.2
Closed

Pin pip to 25.2 while setting up control machine env#6737
AmitPhulera wants to merge 3 commits into
masterfrom
ap/pin-pip-25.2

Conversation

@AmitPhulera

@AmitPhulera AmitPhulera commented Nov 11, 2025

Copy link
Copy Markdown
Contributor

We do not pin pip and pip-tools in our CI and control env setup. Recently all the newer PRs started failing the CI checks on Install dependency step with the following error -

Successfully installed build-1.3.0 click-8.3.0 packaging-25.0 pip-tools-7.5.1 pyproject_hooks-1.2.0 tomli-2.3.0 wheel-0.45.1
WARNING: Package(s) not found: ansible
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.19/x64/bin/pip-sync", line 7, in <module>
    sys.exit(cli())
  File "/opt/hostedtoolcache/Python/3.10.19/x64/lib/python3.10/site-packages/click/core.py", line 1462, in __call__
    return self.main(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.10.19/x64/lib/python3.10/site-packages/click/core.py", line 1383, in main
    rv = self.invoke(ctx)
  File "/opt/hostedtoolcache/Python/3.10.19/x64/lib/python3.10/site-packages/click/core.py", line 1246, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/hostedtoolcache/Python/3.10.19/x64/lib/python3.10/site-packages/click/core.py", line 814, in invoke
    return callback(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.10.19/x64/lib/python3.10/site-packages/piptools/scripts/sync.py", line 116, in cli
    merged_requirements = sync.merge(requirements, ignore_conflicts=force)
  File "/opt/hostedtoolcache/Python/3.10.19/x64/lib/python3.10/site-packages/piptools/sync.py", line 102, in merge
    for ireq in requirements:
  File "/opt/hostedtoolcache/Python/3.10.19/x64/lib/python3.10/site-packages/piptools/_compat/pip_compat.py", line 115, in parse_requirements
    install_req = copy_install_requirement(install_req)
  File "/opt/hostedtoolcache/Python/3.10.19/x64/lib/python3.10/site-packages/piptools/utils.py", line 503, in copy_install_requirement
    "use_pep517": template.use_pep517,
AttributeError: 'InstallRequirement' object has no attribute 'use_pep517'

The error is coming because of pip-tools 7.5.1 not compatible with pip 25.3 - jazzband/pip-tools#2252

We are pinning pip to 25.2 until this is fixed.

@AmitPhulera AmitPhulera changed the title pin pip to 25.2; github actions were failing on the newer version of … Pin pip to 25.2 while setting up control machine env Nov 11, 2025
@AmitPhulera
AmitPhulera force-pushed the ap/pin-pip-25.2 branch 2 times, most recently from 360e66c to 260c599 Compare November 11, 2025 14:47
…pip with the error - AttributeError: 'InstallRequirement' object has no attribute 'use_pep517'

@gherceg gherceg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but curious to hear if Daniel has other ideas here.

Comment thread control/init.sh
cd ${COMMCARE_CLOUD_REPO}
pip install --upgrade pip-tools

pip install --quiet --upgrade pip-tools

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this change necessary?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary. Since it runs in non-interactive mode, I added --quiet parameter.

@millerdev millerdev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a reasonable workaround until the issue is fixed. @AmitPhulera are you planning to actively monitor for a fix, or just let this be until the next time someone is working on pip or pip-tools or something related?

@AmitPhulera

Copy link
Copy Markdown
Contributor Author

Looks like this is no longer required - jazzband/pip-tools#2253 is merged but a new version is not launched yet on pypi.
I will keep the PR open and wait for a new version to be released on pypi. If this becomes a blocker we can temporarily merge it and revert when there is a new pip-tools version available.

@AmitPhulera

Copy link
Copy Markdown
Contributor Author

This is no longer required pip-tools have released the fix. Closing the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants