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

Pytest warnings about Python 3.10 #61

Closed
cclauss opened this issue Jul 20, 2021 · 3 comments
Closed

Pytest warnings about Python 3.10 #61

cclauss opened this issue Jul 20, 2021 · 3 comments

Comments

@cclauss
Copy link
Contributor

cclauss commented Jul 20, 2021

DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.

$ python setup.py test

=============================== warnings summary ===============================
tests/test_client.py: 14 warnings
tests/test_iterator.py: 5 warnings
  /opt/hostedtoolcache/Python/3.9.6/x64/lib/python3.9/site-packages/aiohttp-4.0.0a1-py3.9-linux-x86_64.egg/aiohttp/connector.py:944: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.
    hosts = await asyncio.shield(self._resolve_host(

tests/test_client.py: 11 warnings
tests/test_iterator.py: 3 warnings
  /opt/hostedtoolcache/Python/3.9.6/x64/lib/python3.9/site-packages/aiohttp-4.0.0a1-py3.9-linux-x86_64.egg/aiohttp/locks.py:21: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.
    self._event = asyncio.Event(loop=loop)

-- Docs: https://docs.pytest.org/en/stable/warnings.html
======================= 17 passed, 33 warnings in 0.90s ========================
@mgmacias95
Copy link
Member

Hello @cclauss,

Thank you for opening this issue. The code shown in that warning is part of one of our dependencies: aiohttp. It seems its already fixed on their side (aio-libs/aiohttp#4477). Which aiohttp version are you using? Our setup.py is configured to use the last one available at pypi:

vt-py/setup.py

Line 38 in e00b0a0

install_requires=['aiohttp'],

Regards,
Marta

@ejaz629
Copy link

ejaz629 commented Feb 15, 2022

I am trying to download samples based on hashes using the following example source code: https://github.com/VirusTotal/vt-py/blob/master/examples/download_files.py

I encountered the following error (TypeError: As of 3.10, the loop parameter was removed from Queue() since it is no longer necessary) which i tried to solve but did not succeeded.

Thanks

@cclauss
Copy link
Contributor Author

cclauss commented Feb 15, 2022

Change asyncio.Queue(loop=loop) to asyncio.Queue()

@cclauss cclauss closed this as completed Feb 15, 2022
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

No branches or pull requests

3 participants