- 
          
- 
        Couldn't load subscription status. 
- Fork 632
Description
Warning
⚠️  Ensuring compatibility with the released versions ⚠️ 
A workaround is to make sure that pip < 25.3 in the environment where pip-tools is installed. It is a good idea to use pip-tools for pinning its own env, just like any other app.
Eventually, pip-tools will merge a compatibility PR (likely #2253, which is WIP as of now). Then, at some point in the future, a release will be made making pip-tools compatible with pip == 25.3. Use the above constraint to keep it working with a compatible version of pip.
This is not technically a bug but a known limitation that is a consequence of having to rely on private APIs of pip. It is expected that a given version of pip-tools may not work with an arbitrary future version of pip. Locking the env where it's installed will make sure you won't get caught by surprise.
--webknjaz
Environment Versions
- OS Type: linux
- Python version: Python 3.11.14
- pip version: pip 25.3 from /usr/local/lib/python3.11/site-packages/pip (python 3.11)
- pip-tools version: pip-compile, version 7.4.1
Steps to replicate
- Latest version of pip - 25.3 - released on Oct 24, 2025 officially removed the use-pep-517 option, so the type InstallRequirementno longer has theuse_pep517member.
- When I run pip-compilewith the latest pip (25.3), pip compile suffers an exception upon attempting to accesstemplate.use_pep517in piptools/utils.py", line 492:AttributeError: 'InstallRequirement' object has no attribute 'use_pep517'
Expected result
pip-compile is expected not to be broken
Actual result
pip-compile is broken when running with the latest version of pip - 25.3.
pip-tools relies on many private imports from pip - such as InstallRequirement - which makes pip-compile very brittle and sensitive to internal changes in pip implementation.
Traceback (most recent call last):
  File "/usr/local/bin/pip-compile", line 7, in <module>
    sys.exit(cli())
             ^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1442, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1363, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1226, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 794, in invoke
    return callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/decorators.py", line 34, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/piptools/scripts/compile.py", line 460, in cli
    resolver = resolver_cls(
               ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/piptools/resolver.py", line 513, in __init__
    self._constraints_map = {
                            ^
  File "/usr/local/lib/python3.11/site-packages/piptools/resolver.py", line 514, in <dictcomp>
    ireq_key: combine_install_requirements(ireqs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/piptools/resolver.py", line 136, in combine_install_requirements
    combined_ireq = copy_install_requirement(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/piptools/utils.py", line 492, in copy_install_requirement
    "use_pep517": template.use_pep517,
                  ^^^^^^^^^^^^^^^^^^^
AttributeError: 'InstallRequirement' object has no attribute 'use_pep517'