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

[FIX] proxy.py: fix proxy for python 3.11 #11

Conversation

ap-wtioit
Copy link
Contributor

on our CI we got the following error during tests:

AttributeError: module 'asyncio' has no attribute 'coroutine'. Did you mean: 'coroutines'?
Traceback (most recent call last):
  File "/usr/local/bin/proxy", line 25, in <module>
    @asyncio.coroutine
     ^^^^^^^^^^^^^^^^^

As stated in the python documentation, https://docs.python.org/3.10/library/asyncio-task.html#asyncio.coroutine:

This decorator should not be used for async def coroutines.

and

Deprecated since version 3.8, will be removed in version 3.11: Use async def instead.

Info @wt-io-it

@ap-wtioit
Copy link
Contributor Author

also updated black in pre-commit to 22.3.0 to prevent:

Traceback (most recent call last):
  File "/home/runner/.cache/pre-commit/repoil7v2omk/py_env-python3/bin/black", line 8, in <module>
    sys.exit(patched_main())
  File "/home/runner/.cache/pre-commit/repoil7v2omk/py_env-python3/lib/python3.10/site-packages/black/__init__.py", line 6606, in patched_main
    patch_click()
  File "/home/runner/.cache/pre-commit/repoil7v2omk/py_env-python3/lib/python3.10/site-packages/black/__init__.py", line 6595, in patch_click
    from click import _unicodefun  # type: ignore
ImportError: cannot import name '_unicodefun' from 'click' (/home/runner/.cache/pre-commit/repoil7v2omk/py_env-python3/lib/python3.10/site-packages/click/__init__.py)

see https://stackoverflow.com/a/71674345/925125

@pedrobaeza
Copy link
Member

Sorry, I didn't see it and fix it in #18

@pedrobaeza pedrobaeza closed this Feb 6, 2024
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 this pull request may close these issues.

None yet

2 participants