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

testsuite fails on python-3.9.7 due to new deprecation warnings (worked on 3.9.6) #6066

Closed
1 task done
trofi opened this issue Oct 7, 2021 · 1 comment
Closed
1 task done
Labels

Comments

@trofi
Copy link

trofi commented Oct 7, 2021

Describe the bug

After updating to python-3.9.7 from python-3.9.6 aiohttp testsuite started failing as:

    async def sleep(delay, result=None, *, loop=None):
        """Coroutine that completes after a given time (in seconds)."""
        if loop is not None:
>           warnings.warn("The loop argument is deprecated since Python 3.8, "
                          "and scheduled for removal in Python 3.10.",
                          DeprecationWarning, stacklevel=2)
E           DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.

/nix/store/56c5lnijckyrvczz03sgqs236x693fjf-python3-3.9.7/lib/python3.9/asyncio/tasks.py:639: DeprecationWarning

To Reproduce

Update to python-3.9.7 and run the testsuite.

Expected behavior

The tests should pass.

Logs/tracebacks

Example failure of the first failing test:


_______________________ ERROR at setup of test_get_route _______________________

loop = <_UnixSelectorEventLoop running=False closed=False debug=False>
app = <Application 0x7ffff3ac2670>

    @pytest.fixture
    def test_client(loop, app) -> None:
        async def make_client():
            return _TestClient(_TestServer(app, loop=loop), loop=loop)

        client = loop.run_until_complete(make_client())

>       loop.run_until_complete(client.start_server())

test_test_utils.py:73:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/nix/store/56c5lnijckyrvczz03sgqs236x693fjf-python3-3.9.7/lib/python3.9/asyncio/base_events.py:642: in run_until_complete
    return future.result()
/nix/store/zrkj2d2mis6vmg360x6zdxl2pmghiili-python3.9-aiohttp-3.7.4.post0/lib/python3.9/site-packages/aiohttp/test_utils.py:268: in start_server
    await self._server.start_server(loop=self._loop)
/nix/store/zrkj2d2mis6vmg360x6zdxl2pmghiili-python3.9-aiohttp-3.7.4.post0/lib/python3.9/site-packages/aiohttp/test_utils.py:113: in start_server
    await site.start()
/nix/store/zrkj2d2mis6vmg360x6zdxl2pmghiili-python3.9-aiohttp-3.7.4.post0/lib/python3.9/site-packages/aiohttp/web_runner.py:230: in start
    self._server = await loop.create_server(
/nix/store/56c5lnijckyrvczz03sgqs236x693fjf-python3-3.9.7/lib/python3.9/asyncio/base_events.py:1518: in create_server
    await tasks.sleep(0, loop=self)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

delay = 0, result = None

    async def sleep(delay, result=None, *, loop=None):
        """Coroutine that completes after a given time (in seconds)."""
        if loop is not None:
>           warnings.warn("The loop argument is deprecated since Python 3.8, "
                          "and scheduled for removal in Python 3.10.",
                          DeprecationWarning, stacklevel=2)
E           DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.

/nix/store/56c5lnijckyrvczz03sgqs236x693fjf-python3-3.9.7/lib/python3.9/asyncio/tasks.py:639: DeprecationWarning


### Python Version

```console
$ python --version
Python 3.9.7

aiohttp Version

$ python -m pip show aiohttp
WARNING: Package(s) not found: aiohttp

multidict Version

$ python -m pip show multidict
Name: multidict
Version: 5.1.0
Summary: multidict implementation
Home-page: https://github.com/aio-libs/multidict
Author: Andrew Svetlov
Author-email: [email protected]
License: Apache 2
Location: /nix/store/fdvkz2jvqc8ra426yp3m74ynq71g13vz-python3.9-multidict-5.1.0/lib/python3.9/site-packages
Requires:
Required-by: yarl

yarl Version

$ python -m pip show yarl
Name: yarl
Version: 1.6.3
Summary: Yet another URL library
Home-page: https://github.com/aio-libs/yarl/
Author: Andrew Svetlov
Author-email: [email protected]
License: Apache 2
Location: /nix/store/x5xcb256wikwbh2p443ximbbdn9l7h2h-python3.9-yarl-1.6.3/lib/python3.9/site-packages
Requires: idna, multidict
Required-by:

OS

Nixos x86_64-linux.

Full build/test log: python3.9-aiohttp-3.7.4.log.txt

Related component

Client

Additional context

No response

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct
@Dreamsorcerer
Copy link
Member

The 3.8 branch is ignoring the errors for the moment. It'll be fixed properly with Python 3.9.8 (out in about 4 weeks I believe).

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

No branches or pull requests

2 participants