google-auth-library-python
google-auth-library-python copied to clipboard
chore: Migrate from mock to unittest.mock
- chore: Use stdlib unittest.mock instead of separate mock library. Resolves https://github.com/googleapis/google-auth-library-python/issues/1055
- Fix mypy error.
Looks like mock.AsyncMock is gated by Python 3.8.
I'm considering if we should just gate the Async code to 3.8 in that case, since it's still in "Preview".
@sai-sunder-s @arithmetic1728 @BigTailWolf thoughts?
Looks like
mock.AsyncMockis gated by Python 3.8.I'm considering if we should just gate the Async code to 3.8 in that case, since it's still in "Preview".
@sai-sunder-s @arithmetic1728 @BigTailWolf thoughts?
Do we currently have any from unittest.mock import AsyncMock in any test?
I searched across ed the repo and didn't see one of them.
@BigTailWolf It's found in the following files:
❯ rg "AsyncMock" -l
tests_async/oauth2/test__client_async.py
tests_async/oauth2/test_id_token.py
tests_async/oauth2/test_reauth_async.py
tests_async/oauth2/test_service_account_async.py
tests_async/oauth2/test_credentials_async.py
tests_async/transport/test_aiohttp_requests.py
Hi! :wave:
We are currently (finally) removing the python-mock package on Arch Linux. I am therefore very interested in this getting merged and released. Are there still specific blockers?