Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.11.0: pytest requires oauth2client module wbich not maintained since 1018 #1118

Closed
kloczek opened this issue Aug 26, 2022 · 3 comments · Fixed by #1132
Closed

2.11.0: pytest requires oauth2client module wbich not maintained since 1018 #1118

kloczek opened this issue Aug 26, 2022 · 3 comments · Fixed by #1132
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@kloczek
Copy link

kloczek commented Aug 26, 2022

pytest fails on trying to use oauth2client which is not maintained since 2018 https://github.com/googleapis/oauth2client and whole repo is lept only in arrchived read-only mode.

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-google-auth-2.11.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-google-auth-2.11.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra tests/test__oauth2client.py
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/google-auth-library-python-2.11.0
plugins: asyncio-0.19.0, localserver-0.6.0
asyncio: mode=strict
collected 0 items / 1 error

================================================================================== ERRORS ==================================================================================
_______________________________________________________________ ERROR collecting tests/test__oauth2client.py _______________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/google-auth-library-python-2.11.0/tests/test__oauth2client.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test__oauth2client.py:20: in <module>
    import oauth2client.client  # type: ignore
E   ModuleNotFoundError: No module named 'oauth2client'
========================================================================= short test summary info ==========================================================================
ERROR tests/test__oauth2client.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================= 1 error in 0.09s =============================================================================
@clundin25 clundin25 added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Aug 26, 2022
@clundin25
Copy link
Contributor

Thanks for the report @kloczek. This code exists to help users of oauth2client migrate to this library, so we do not want to remove this test.

Can you tell me a little more about your use case? A reasonable compromise to me seems to skip these tests if oauth2client is not found.

@kloczek
Copy link
Author

kloczek commented Aug 31, 2022

Thanks for the report @kloczek. This code exists to help users of oauth2client migrate to this library, so we do not want to remove this test.

OK.
Is it nott would be better to skip all units from that file if oauth2client is not installed? 🤔

@clundin25
Copy link
Contributor

Yes, that is the solution I had in mind.

clundin25 added a commit to clundin25/google-auth-library-python that referenced this issue Aug 31, 2022
clundin25 added a commit to clundin25/google-auth-library-python that referenced this issue Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
2 participants