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

chore: Migrate from mock to unittest.mock #1361

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

clundin25
Copy link
Contributor

@clundin25 clundin25 requested review from a team as code owners July 25, 2023 21:52
Copy link
Contributor

@BigTailWolf BigTailWolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! One less dependency

@clundin25
Copy link
Contributor Author

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?

@BigTailWolf
Copy link
Contributor

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?

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.

@clundin25
Copy link
Contributor Author

@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

@dvzrv
Copy link

dvzrv commented Mar 5, 2024

Hi! 👋

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use unittest.mock instead of mock
3 participants