pytest-dev / pytest-mock

Thin-wrapper around the mock package for easier use with pytest
https://pytest-mock.readthedocs.io/en/latest/
MIT License
1.86k stars 147 forks source link

Replace asyncio.iscoroutinefunction with inspect.iscoroutinefunction #469

Closed hroncok closed 1 month ago

hroncok commented 1 month ago

DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead

Fixes https://github.com/pytest-dev/pytest-mock/issues/468

hroncok commented 1 month ago

I still see the warning here when I run tox -e py314 because of pytest-asyncio. It is fixed there in https://github.com/pytest-dev/pytest-asyncio/commit/d0436985afa086a01544545ff6c38bd7383e25a9 but not yet released.


Also, about the CI failure... no idea what it means.

nicoddemus commented 1 month ago

Hmm that's strange indeed, might be something temporary? Will try to restart CI a bit later to see if it goes away.

webknjaz commented 1 month ago

@seifertm could you make a release if pytest-asyncio? Other plugins like pytest-mock start testing against Python 3.14 and hit that warning fixed in the main branch.

nicoddemus commented 1 month ago

The failure is something related to hynek/build-and-inspect-python-package, because we are having the same error in https://github.com/pytest-dev/pytest-mock/pull/466, which ran fine two weeks ago.

nicoddemus commented 1 month ago

@hroncok rebased on main, which fixed the build-and-check-package problem.

nicoddemus commented 1 month ago

Thanks @hroncok!