-
Notifications
You must be signed in to change notification settings - Fork 39
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
Asynctest owner suggests switch to asyncmock #61
Comments
Thanks or raising this "issue". I agree that we should use Any thoughts welcome! |
I am not very experienced in supporting multiple python versions so I cannot offer lots of thoughts here. What you suggest sounds reasonable, though. I have not yet used asyncmock, either. |
In the meantime, to silence the warnings in pytest, you can add something like this to [pytest]
filterwarnings =
# respx/asynctest: https://github.com/lundberg/respx/issues/61
ignore:"@coroutine" decorator is deprecated since Python 3.8, use "async def" instead:DeprecationWarning |
I've opened #69 . Since we're only patching methods and not really using async magic mocks, I was able to drop the |
@chbndrhnns , @hugovk please try out the PR. Note that the release of this will remove the dep of |
My unit tests are passing with the #69 branch 👍
|
Thanks for testing @hugovk , |
When using the
asynctest
package (which is a dependency ofrespx
) with Python 3.8+, there are deprecation warnings:The author of asynctest suggests moving to
asyncmock
instead of resolving the issues (1, 2).I am wondering if this would be an option for you to make
respx
future-proof.The text was updated successfully, but these errors were encountered: