-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Cannot have python keyword in route nameΒ #4691
Copy link
Copy link
Closed
Labels
bugpr-availablereproducer: missingThis PR or issue lacks code, which reproduce the problem described or clearly understandable STRThis PR or issue lacks code, which reproduce the problem described or clearly understandable STRserver
Metadata
Metadata
Assignees
Labels
bugpr-availablereproducer: missingThis PR or issue lacks code, which reproduce the problem described or clearly understandable STRThis PR or issue lacks code, which reproduce the problem described or clearly understandable STRserver
Type
Fields
Give feedbackNo fields configured for issues without a type.
π Describe the bug
This code is rejected with 'Incorrect route name':
This is because 'for' is a keyword, and the check rejects any keywords for some strange reason:
in https://github.com/aio-libs/aiohttp/blob/master/aiohttp/web_urldispatcher.py#L982
I think the intention was to have:
π‘ To Reproduce
π‘ Expected behavior
Should accept route names containing python keywords
π Logs/tracebacks
π Your version of the Python
π Your version of the aiohttp/yarl/multidict distributions
π Additional context