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

aiohttp version 3.8.0 throws SyntaxError on import #103

Closed
aaraney opened this issue Nov 3, 2021 · 4 comments · Fixed by #104
Closed

aiohttp version 3.8.0 throws SyntaxError on import #103

aaraney opened this issue Nov 3, 2021 · 4 comments · Fixed by #104
Labels
bug Something isn't working
Milestone

Comments

@aaraney
Copy link
Contributor

aaraney commented Nov 3, 2021

The problem

aiohttp version 3.8.0, released on 11/31/21, causes SyntaxError. It is related to usage of the python-forge package.

Steps to reproduce the behavior

pip install -U aiohttp-client-cache

import aiohttp_client_cache

>'base_url:typing.Union[str, yarl.URL, NoneType]=None' of kind 'POSITIONAL_OR_KEYWORD' follows 'cache:CacheBackend=None' of kind 'KEYWORD_ONLY'
Traceback (most recent call last):
  File "/Users/araney/github/test_hydrotools/venv/lib/python3.8/site-packages/aiohttp_client_cache/docs/forge_utils.py", line 32, in wrapper
    return revision(target_function)
  File "/Users/araney/github/test_hydrotools/venv/lib/python3.8/site-packages/forge/_revision.py", line 330, in __call__
    next_.validate()
  File "/Users/araney/github/test_hydrotools/venv/lib/python3.8/site-packages/forge/_signature.py", line 1344, in validate
    raise SyntaxError(
SyntaxError: 'base_url:typing.Union[str, yarl.URL, NoneType]=None' of kind 'POSITIONAL_OR_KEYWORD' follows 'cache:CacheBackend=None' of kind 'KEYWORD_ONLY'

Environment

  • aiohttp-client-cache version: [e.g. 0.5.1]
  • Python version: [e.g. 3.8.10]
  • Platform: [e.g. MacOSX 11.5.2]
@aaraney aaraney added the bug Something isn't working label Nov 3, 2021
@JWCook
Copy link
Member

JWCook commented Nov 3, 2021

Thanks for reporting! Looks like a new base_url param was added in aio-libs/aiohttp#6129, and for some reason it's positional-or-keyword instead of keyword-only like the rest of the params. I'll get that fixed shortly.

@JWCook JWCook added this to the v0.6 milestone Nov 3, 2021
@aaraney
Copy link
Contributor Author

aaraney commented Nov 3, 2021

Awesome! Thanks and cheers!

@JWCook
Copy link
Member

JWCook commented Nov 3, 2021

@aaraney Done! This is fixed in 0.5.2.

@aaraney
Copy link
Contributor Author

aaraney commented Nov 3, 2021

Fantastic! Thanks @JWCook!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants