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

Test failures on Python 3.11 due to asyncio.coroutine being removed #180

Open
mgorny opened this issue May 19, 2022 · 0 comments
Open

Test failures on Python 3.11 due to asyncio.coroutine being removed #180

mgorny opened this issue May 19, 2022 · 0 comments

Comments

@mgorny
Copy link

mgorny commented May 19, 2022

The three following tests are failing on Python 3.11 since it removed deprecated asyncio.coroutine decorator:

============================================================== FAILURES ===============================================================
__________________________________________________ test_as_future_coroutine[asyncio] __________________________________________________

framework = <module 'txaio.aio' from '/tmp/portage/dev-python/txaio-22.2.1/work/txaio-22.2.1/txaio/aio.py'>

    def test_as_future_coroutine(framework):
        '''
        call a coroutine (asyncio)
        '''
        pytest.importorskip('asyncio')
        # can import asyncio on python3.4, but might still be using
        # twisted
        if not txaio.using_asyncio:
            return
    
        errors = []
        results = []
        calls = []
    
>       from asyncio import coroutine
E       ImportError: cannot import name 'coroutine' from 'asyncio' (/usr/lib/python3.11/asyncio/__init__.py)

calls      = []
errors     = []
framework  = <module 'txaio.aio' from '/tmp/portage/dev-python/txaio-22.2.1/work/txaio-22.2.1/txaio/aio.py'>
results    = []

test/test_as_future.py:105: ImportError
______________________________________________ test_explicit_reactor_coroutine[asyncio] _______________________________________________

framework = <module 'txaio.aio' from '/tmp/portage/dev-python/txaio-22.2.1/work/txaio-22.2.1/txaio/aio.py'>

    def test_explicit_reactor_coroutine(framework):
        """
        If we set an event-loop, Futures + Tasks should use it.
        """
        pytest.importorskip('asyncio')
        if txaio.using_twisted:
            pytest.skip()
    
>       from asyncio import coroutine
E       ImportError: cannot import name 'coroutine' from 'asyncio' (/usr/lib/python3.11/asyncio/__init__.py)

framework  = <module 'txaio.aio' from '/tmp/portage/dev-python/txaio-22.2.1/work/txaio-22.2.1/txaio/aio.py'>

test/test_call_later.py:174: ImportError
______________________________________________________ test_is_future_coroutine _______________________________________________________

framework_aio = <module 'txaio.aio' from '/tmp/portage/dev-python/txaio-22.2.1/work/txaio-22.2.1/txaio/aio.py'>

    def test_is_future_coroutine(framework_aio):
        '''
        Returning an immediate value from as_future
        '''
        pytest.importorskip('asyncio')  # 'aio' might be using trollius
>       from asyncio import coroutine
E       ImportError: cannot import name 'coroutine' from 'asyncio' (/usr/lib/python3.11/asyncio/__init__.py)

framework_aio = <module 'txaio.aio' from '/tmp/portage/dev-python/txaio-22.2.1/work/txaio-22.2.1/txaio/aio.py'>

test/test_is_future.py:45: ImportError
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 a pull request may close this issue.

1 participant