-
-
Notifications
You must be signed in to change notification settings - Fork 628
Description
I found it handy to add some often used options to the [tools.pip-tools]
-section of my pyproject.toml
. In particular I added:
[tool.pip-tools]
strip-extras = true
no-emit-index-url = true
no-emit-trusted-host = true
But now, calling pip-sync requirements.txt
breaks with:
Error: No such config key 'no_emit_index_url'. (Possible options: emit_index_url, extra_index_url, index_url)
I can see, that using instead emit-index-url = false
would have the same effect and, actually, is probably the correct solution to this. But given the poor documentation of the pyproject.toml
-behaviour, we are left guessing and this is tedious and time-consuming. Moreover, pip-compile
does not complain about the pyproject
-options and happily uses them. Only pip-sync
spoils the experience ;-)
So, a bit more consistency would be nice.
Environment Versions
- OS Type: MS Windows 10
- Python version: Python 3.11.5
- pip version: pip 23.2.1
- pip-tools version: pip-compile, version 7.3.0
Steps to replicate
- Put any of the
no-*
options inpyproject.toml
, e.g.no-emit-index-url = true
- Call
pip-compile
and enjoy. - Call
pip-sync
and scratch your head, sort out your frustration and try to think, what could possibly be the issue here.
Expected result
The behaviour of pip-compile
and pip-sync
when using options from pyproject.toml
is consistent, well documented and intuitive.
Actual result
The subset of options that work with pip-sync
is unexpectedlty smaller than that of pip-compile
.