You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an options() method available for RouteTableDef in web_routedef.py for 3.8.1, but when I go to use the decorator approach for creating a route I get a failure saying AttributeError: 'RouteTableDef' object has no attribute 'options'. I downloaded the source from PyPI and the options method seems to be missing.
Is there some reason why this method would not be included in the package distributed on PyPI? Thanks!
To Reproduce
Install aiohttp 3.8.1 from PyPI
Attempt to create a route using the following approach
Traceback (most recent call last):
File "/home/tyler/.pyenv/versions/3.10.0/lib/python3.10/runpy.py", line 196, in _run_module_as_mainreturn _run_code(code, main_globals, None,
File "/home/tyler/.pyenv/versions/3.10.0/lib/python3.10/runpy.py", line 86, in _run_codeexec(code, run_globals)
File "/home/tyler/code/python/email-service/service/__main__.py", line 12, in <module>@routes.options("/email")
AttributeError: 'RouteTableDef' object has no attribute 'options'
But it might be a good idea to include in the released version for consistency with master. I'm not sure I know how to do the backport myself, otherwise I'd open a PR.
Describe the bug
There is an
options()
method available forRouteTableDef
inweb_routedef.py
for 3.8.1, but when I go to use the decorator approach for creating a route I get a failure sayingAttributeError: 'RouteTableDef' object has no attribute 'options'
. I downloaded the source from PyPI and the options method seems to be missing.Is there some reason why this method would not be included in the package distributed on PyPI? Thanks!
To Reproduce
Expected behavior
To be able to use the following approach to creating a route that can handle an OPTIONS request
Logs/tracebacks
Python Version
aiohttp Version
multidict Version
yarl Version
OS
Arch Linux
Related component
Server
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: