You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when building dependent packages in Fedora with Python 3.14.0a1, I got this when building meson-python:
____________________________ test_invalid_build_dir ____________________________
package_pure = PosixPath('/builddir/build/BUILD/python-meson-python-0.17.0-build/meson_python-0.17.0/tests/packages/pure')
tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_invalid_build_dir0')
mocker = <pytest_mock.plugin.MockerFixture object at 0x7f1b7d91b750>
@pytest.mark.skipif(
sys.version_info < (3, 8),
reason="unittest.mock doesn't support the required APIs for this test",
)
def test_invalid_build_dir(package_pure, tmp_path, mocker):
> meson = mocker.spy(mesonpy.Project, '_run')
/builddir/build/BUILD/python-meson-python-0.17.0-build/meson_python-0.17.0/tests/test_project.py:168:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.14/site-packages/pytest_mock/plugin.py:199: in spy
if asyncio.iscoroutinefunction(method):
/usr/lib64/python3.14/asyncio/coroutines.py:23: in iscoroutinefunction
warnings._deprecated("asyncio.iscoroutinefunction",
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = 'asyncio.iscoroutinefunction'
message = '{name!r} is deprecated and slated for removal in Python {remove}; use inspect.iscoroutinefunction() instead'
def _deprecated(name, message=_DEPRECATED_MSG, *, remove, _version=sys.version_info):
"""Warn that *name* is deprecated or should be removed.
RuntimeError is raised if *remove* specifies a major/minor tuple older than
the current Python version or the same version but past the alpha.
The *message* argument is formatted with *name* and *remove* as a Python
version tuple (e.g. (3, 11)).
"""
remove_formatted = f"{remove[0]}.{remove[1]}"
if (_version[:2] > remove) or (_version[:2] == remove and _version[3] != "alpha"):
msg = f"{name!r} was slated for removal after Python {remove_formatted} alpha"
raise RuntimeError(msg)
else:
msg = message.format(name=name, remove=remove_formatted)
> warn(msg, DeprecationWarning, stacklevel=3)
E DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead
/usr/lib64/python3.14/warnings.py:668: DeprecationWarning
I just thought I send you a heads-up. It seems inspect.iscoroutinefunction is available since Python 3.5, so that should be safe to use. Will check.
The text was updated successfully, but these errors were encountered:
hroncok
added a commit
to hroncok/pytest-mock
that referenced
this issue
Oct 24, 2024
DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead
Fixespytest-dev#468
DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead
Fixespytest-dev#468
…469)
DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead
Fixes#468
Hello,
when building dependent packages in Fedora with Python 3.14.0a1, I got this when building meson-python:
I just thought I send you a heads-up. It seems inspect.iscoroutinefunction is available since Python 3.5, so that should be safe to use. Will check.
The text was updated successfully, but these errors were encountered: