You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was recently trying to use pip-tools to generate a requirements.txt. This failed, debugging yielded that the issue lied in
venv/lib/python3.8/site-packages/piptools/repositories/pypi.py", line 455, in _setup_logging
assert isinstance(handler, logging.StreamHandler)
Apparently, the RichPipStreamHandler was no longer being recognized as a type StreamHandler.
In particular, this issue only arose from pip==22.0 onwards, this was not present in pip==21.3.1.
I'm using Python 3.8, for reference.
Expected behavior
For the RichStreamHandler to be see as an instance of type StreamHandler such that the assert succeeds.
pip version
22.0+
Python version
3.8
OS
Linux (Tried on CENTOS and Mint)
How to Reproduce
Create a virtual environment.
pip -U install pip==22.0 or 22+
pip install pip-tools or anything that might use the RichStreamHandler
For this case, pip-compile -r requirements.in where we have echo "connexion2 > requirements.in for example.
It'll error on the assert is instance of.
Output
Traceback (most recent call last): File "venv/bin/pip-compile", line 8, in <module> sys.exit(cli()) File "venv/lib/python3.8/site-packages/click/core.py", line 1128, in __call__ return self.main(*args, **kwargs) File "venv/lib/python3.8/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "venv/lib/python3.8/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File "venv/lib/python3.8/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "venv/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func return f(get_current_context(), *args, **kwargs) File "venv/lib/python3.8/site-packages/piptools/scripts/compile.py", line 342, in cli repository = PyPIRepository(pip_args, cache_dir=cache_dir) File "venv/lib/python3.8/site-packages/piptools/repositories/pypi.py", line 106, in __init__ self._setup_logging() File "venv/lib/python3.8/site-packages/piptools/repositories/pypi.py", line 455, in _setup_logging assert isinstance(handler, logging.StreamHandler)AssertionError
Description
I was recently trying to use
pip-tools
to generate a requirements.txt. This failed, debugging yielded that the issue lied inApparently, the RichPipStreamHandler was no longer being recognized as a type StreamHandler.
In particular, this issue only arose from
pip==22.0
onwards, this was not present inpip==21.3.1
.I'm using Python 3.8, for reference.
Expected behavior
For the RichStreamHandler to be see as an instance of type StreamHandler such that the assert succeeds.
pip version
22.0+
Python version
3.8
OS
Linux (Tried on CENTOS and Mint)
How to Reproduce
pip -U install pip==22.0
or 22+pip install pip-tools
or anything that might use the RichStreamHandlerpip-compile -r requirements.in
where we haveecho "connexion2 > requirements.in
for example.Output
Code of Conduct
The text was updated successfully, but these errors were encountered: