Please confirm the following
Describe the bug
I've defined a pydantic model (let's call it User) as the input model of my view function, which has a field annotated as uuid.UUID named user_id.
When I pass user.user_id as a part of params in a request(use aiohttp), yarl will convert the type of uuid.UUID into int before cast it into string.
For example: uuid.UUID('3199712f-1b78-4420-852b-a73ee09e6a8f') -> '65928888857327045292976149998723820175'
by this line: https://github.com/aio-libs/yarl/blob/master/yarl/_query.py#L35
So i've change my code to check every param in params if it's instance of uuid.UUID.
I came here to ask if this conversion behavior is as expected? Is there a better compatibility implementation?
To Reproduce
as description above
Expected behavior
as description above
Logs/tracebacks
Python Version
multidict Version
$ python -m pip show multidict
6.1.0
propcache Version
$ python -m pip show propcache
0.2.1
yarl Version
$ python -m pip show yarl
1.18.3
OS
linux or macos
Additional context
No response
Please confirm the following
vulnerability, to the best of my knowledge. (These must be shared by
submitting this report form instead, if
any hesitation exists.)
Describe the bug
I've defined a pydantic model (let's call it
User) as the input model of my view function, which has a field annotated as uuid.UUID nameduser_id.When I pass user.user_id as a part of params in a request(use aiohttp), yarl will convert the type of uuid.UUID into int before cast it into string.
For example: uuid.UUID('3199712f-1b78-4420-852b-a73ee09e6a8f') -> '65928888857327045292976149998723820175'
by this line: https://github.com/aio-libs/yarl/blob/master/yarl/_query.py#L35
So i've change my code to check every param in params if it's instance of uuid.UUID.
I came here to ask if this conversion behavior is as expected? Is there a better compatibility implementation?
To Reproduce
as description above
Expected behavior
as description above
Logs/tracebacks
Python Version
multidict Version
propcache Version
yarl Version
OS
linux or macos
Additional context
No response