-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Open
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Environment details
- OS type and version: Linux
- Python version: 3.12.5
- pip version: 24.2
google-api-python-clientversion: 2.145.0
Steps to reproduce
python -m virtualenv venv. venv/bin/activatepip install api-clientpython -c 'from apiclient import HeaderAuthentication'pip install firebase-adminpython -c 'from apiclient import HeaderAuthentication'
I expect step 6 to be the same as step 4 here, but it results in a stack trace since firebase-admin depends on google-api-python-client which is overwriting .../site-packages/apiclient/. What's even worse is that some package managers (e.g., poetry) seem to install this in a random order resulting in it sometimes working and sometimes not.
Code example
from apiclient import HeaderAuthenticationStack trace
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: cannot import name 'HeaderAuthentication' from 'apiclient' (/private/tmp/test1/venv/lib/python3.11/site-packages/apiclient/__init__.py)
Metadata
Metadata
Assignees
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.