Closed euri10 closed 1 year ago
working litestar version:
[package.source]
type = "git"
url = "https://github.com/litestar-org/litestar.git"
reference = "HEAD"
resolved_reference = "a288fd49ec50426da146f8e9071163d5b892c335"
not working:
[package.source]
type = "git"
url = "https://github.com/litestar-org/litestar.git"
reference = "HEAD"
resolved_reference = "0cd1347522ee7ebb5a4b5f451a15265ff3075bf5"
Thanks.
So I think the issue is that our multipart parser grabs strings and converts them to numbers. We should instead just keep everything as string and leg msgspec handle this.
I'll take this one, will get it fixed today I hope
wrote a small failing test if that helps
wrote a small failing test if that helps
Failing test PRs are always welcome 😁
Description
I came across this weirdness today I discovered by accident, same app, my reqs are pinned but one install was performed after the other, and pydantic reqs changed in litestar in between both installs, so one install on laptop has pydantic v2, the other v1.
On venv with pydantic v1, if in the form in the bowser I enter 1234 in password I get data.password as a string as intended, while with v2 it comes as an int and I get a 400 error. Using litestar = {git = "https://github.com/litestar-org/litestar.git"}
reqs diff
❯ diff requirements_ok.txt requirements.txt ```diff 0a1,3 > annotated-types==0.5.0 ; python_version >= "3.10" and python_version < "4.0" \ > --hash=sha256:47cdc3490d9ac1506ce92c7aaa76c579dc3509ff11e098fc867e5130ab7be802 \ > --hash=sha256:58da39888f92c276ad970249761ebea80ba544b77acddaa1a4d6cf78287d45fd 79,81c82,84 < attrs==22.2.0 ; python_version >= "3.10" and python_version < "4.0" \ < --hash=sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836 \ < --hash=sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99 --- > attrs==23.1.0 ; python_version >= "3.10" and python_version < "4.0" \ > --hash=sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04 \ > --hash=sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015 89,91c92,94 < cattrs==22.2.0 ; python_version >= "3.10" and python_version < "4.0" \ < --hash=sha256:bc12b1f0d000b9f9bee83335887d532a1d3e99a833d1bf0882151c97d3e68c21 \ < --hash=sha256:f0eed5642399423cf656e7b66ce92cdc5b963ecafd041d1b24d136fdde7acf6d --- > cattrs==23.1.2 ; python_version >= "3.10" and python_version < "4.0" \ > --hash=sha256:b2bb14311ac17bed0d58785e5a60f022e5431aca3932e3fc5cc8ed8639de50a4 \ > --hash=sha256:db1c821b8c537382b2c7c66678c3790091ca0275ac486c76f3c8f3920e83c657 236,238c239,241 < click==8.1.4 ; python_version >= "3.10" and python_version < "4.0" \ < --hash=sha256:2739815aaa5d2c986a88f1e9230c55e17f0caad3d958a5e13ad0797c166db9e3 \ < --hash=sha256:b97d0c74955da062a7d4ef92fadb583806a585b2ea81958a81bd72726cbb8e37 --- > click==8.1.5 ; python_version >= "3.10" and python_version < "4.0" \ > --hash=sha256:4be4b1af8d665c6d942909916d31a213a106800c47d0eeba73d34da3cbc11367 \ > --hash=sha256:e576aa487d679441d7d30abb87e1b43d24fc53bffb8758443b1a9e1cee504548 268,270c271,273 < faker==19.0.0 ; python_version >= "3.10" and python_version < "4.0" \ < --hash=sha256:14bfe8e861efdfcdf2a3e66ff61a780d911410a474a667295bae4f8c4586456b \ < --hash=sha256:d37406dff33ae63ae019bd7bf95e33251e703cddbcb2857e0611002062f774e8 --- > faker==19.1.0 ; python_version >= "3.10" and python_version < "4.0" \ > --hash=sha256:4b7d5cd0c898f0b64f88fbf0a35aac66762f2273446ba4a4e459985a2e5c8f8c \ > --hash=sha256:d1eb772faf4a7c458c90b19d3626c40ae3460bd665ad7f5fb7b089e31d1a6dcf 831,833c834,836 < polyfactory==2.6.1 ; python_version >= "3.10" and python_version < "4.0" \ < --hash=sha256:449c37644b738e464f953a37843b990966e999474ddb39bcb9602c24d52cbb8d \ < --hash=sha256:7de8b78b6e76d9adaab3973c71735447a53f21d5351a83c06c81b5e373ddfe1f --- > polyfactory==2.6.2 ; python_version >= "3.10" and python_version < "4.0" \ > --hash=sha256:a71016770b643c3bbc26c439cffea13b8510827d6e9e40a857783f8242cb1d8f \ > --hash=sha256:becdae6720a6df87fb1aa738ba8fa5c26982d72040eb73bf7d938be2637c35b3 893,929c896,1003 < pydantic==1.10.11 ; python_version >= "3.10" and python_version < "4.0" \ < --hash=sha256:008c5e266c8aada206d0627a011504e14268a62091450210eda7c07fabe6963e \ < --hash=sha256:0588788a9a85f3e5e9ebca14211a496409cb3deca5b6971ff37c556d581854e7 \ < --hash=sha256:08a6c32e1c3809fbc49debb96bf833164f3438b3696abf0fbeceb417d123e6eb \ < --hash=sha256:16928fdc9cb273c6af00d9d5045434c39afba5f42325fb990add2c241402d151 \ < --hash=sha256:174899023337b9fc685ac8adaa7b047050616136ccd30e9070627c1aaab53a13 \ < --hash=sha256:192c608ad002a748e4a0bed2ddbcd98f9b56df50a7c24d9a931a8c5dd053bd3d \ < --hash=sha256:1954f8778489a04b245a1e7b8b22a9d3ea8ef49337285693cf6959e4b757535e \ < --hash=sha256:2417de68290434461a266271fc57274a138510dca19982336639484c73a07af6 \ < --hash=sha256:265a60da42f9f27e0b1014eab8acd3e53bd0bad5c5b4884e98a55f8f596b2c19 \ < --hash=sha256:331c031ba1554b974c98679bd0780d89670d6fd6f53f5d70b10bdc9addee1713 \ < --hash=sha256:373c0840f5c2b5b1ccadd9286782852b901055998136287828731868027a724f \ < --hash=sha256:3f34739a89260dfa420aa3cbd069fbcc794b25bbe5c0a214f8fb29e363484b66 \ < --hash=sha256:41e0bb6efe86281623abbeeb0be64eab740c865388ee934cd3e6a358784aca6e \ < --hash=sha256:4400015f15c9b464c9db2d5d951b6a780102cfa5870f2c036d37c23b56f7fc1b \ < --hash=sha256:44e51ba599c3ef227e168424e220cd3e544288c57829520dc90ea9cb190c3248 \ < --hash=sha256:469adf96c8e2c2bbfa655fc7735a2a82f4c543d9fee97bd113a7fb509bf5e622 \ < --hash=sha256:5b02d24f7b2b365fed586ed73582c20f353a4c50e4be9ba2c57ab96f8091ddae \ < --hash=sha256:7522a7666157aa22b812ce14c827574ddccc94f361237ca6ea8bb0d5c38f1629 \ < --hash=sha256:787cf23e5a0cde753f2eabac1b2e73ae3844eb873fd1f5bdbff3048d8dbb7604 \ < --hash=sha256:8268a735a14c308923e8958363e3a3404f6834bb98c11f5ab43251a4e410170c \ < --hash=sha256:8dc77064471780262b6a68fe67e013298d130414d5aaf9b562c33987dbd2cf4f \ < --hash=sha256:a451ccab49971af043ec4e0d207cbc8cbe53dbf148ef9f19599024076fe9c25b \ < --hash=sha256:a6c098d4ab5e2d5b3984d3cb2527e2d6099d3de85630c8934efcfdc348a9760e \ < --hash=sha256:abade85268cc92dff86d6effcd917893130f0ff516f3d637f50dadc22ae93999 \ < --hash=sha256:bc64eab9b19cd794a380179ac0e6752335e9555d214cfcb755820333c0784cb3 \ < --hash=sha256:c3339a46bbe6013ef7bdd2844679bfe500347ac5742cd4019a88312aa58a9847 \ < --hash=sha256:d185819a7a059550ecb85d5134e7d40f2565f3dd94cfd870132c5f91a89cf58c \ < --hash=sha256:d7781f1d13b19700b7949c5a639c764a077cbbdd4322ed505b449d3ca8edcb36 \ < --hash=sha256:e297897eb4bebde985f72a46a7552a7556a3dd11e7f76acda0c1093e3dbcf216 \ < --hash=sha256:e6cbfbd010b14c8a905a7b10f9fe090068d1744d46f9e0c021db28daeb8b6de1 \ < --hash=sha256:e9738b0f2e6c70f44ee0de53f2089d6002b10c33264abee07bdb5c7f03038303 \ < --hash=sha256:e9baf78b31da2dc3d3f346ef18e58ec5f12f5aaa17ac517e2ffd026a92a87588 \ < --hash=sha256:ef55392ec4bb5721f4ded1096241e4b7151ba6d50a50a80a2526c854f42e6a2f \ < --hash=sha256:f66d479cf7eb331372c470614be6511eae96f1f120344c25f3f9bb59fb1b5528 \ < --hash=sha256:fe429898f2c9dd209bd0632a606bddc06f8bce081bbd03d1c775a45886e2c1cb \ < --hash=sha256:ff44c5e89315b15ff1f7fdaf9853770b810936d6b01a7bcecaa227d2f8fe444f --- > pydantic-core==2.3.0 ; python_version >= "3.10" and python_version < "4.0" \ > --hash=sha256:019c5c41941438570dfc7d3f0ae389b2425add1775a357ce1e83ed1434f943d6 \ > --hash=sha256:01f56d5ee70b1d39c0fd08372cc5142274070ab7181d17c86035f130eebc05b8 \ > --hash=sha256:055f7ea6b1fbb37880d66d70eefd22dd319b09c79d2cb99b1dbfeb34b653b0b2 \ > --hash=sha256:05b4bf8c58409586a7a04c858a86ab10f28c6c1a7c33da65e0326c59d5b0ab16 \ > --hash=sha256:06884c07956526ac9ebfef40fe21a11605569b8fc0e2054a375fb39c978bf48f \ > --hash=sha256:06f33f695527f5a86e090f208978f9fd252c9cfc7e869d3b679bd71f7cb2c1fa \ > --hash=sha256:0aa429578e23885b3984c49d687cd05ab06f0b908ea1711a8bf7e503b7f97160 \ > --hash=sha256:0b3d781c71b8bfb621ef23b9c874933e2cd33237c1a65cc20eeb37437f8e7e18 \ > --hash=sha256:0dc5f516b24d24bc9e8dd9305460899f38302b3c4f9752663b396ef9848557bf \ > --hash=sha256:0fc7e0b056b66cc536e97ef60f48b3b289f6b3b62ac225afd4b22a42434617bf \ > --hash=sha256:12be3b5f54f8111ca38e6b7277f26c23ba5cb3344fae06f879a0a93dfc8b479e \ > --hash=sha256:1624baa76d1740711b2048f302ae9a6d73d277c55a8c3e88b53b773ebf73a971 \ > --hash=sha256:1aefebb506bc1fe355d91d25f12bcdea7f4d7c2d9f0f6716dd025543777c99a5 \ > --hash=sha256:1bcfb7be905aa849bd882262e1df3f75b564e2f708b4b4c7ad2d3deaf5410562 \ > --hash=sha256:1c119e9227487ad3d7c3c737d896afe548a6be554091f9745da1f4b489c40561 \ > --hash=sha256:20d710c1f79af930b8891bcebd84096798e4387ab64023ef41521d58f21277d3 \ > --hash=sha256:2183a9e18cdc0de53bdaa1675f237259162abeb62d6ac9e527c359c1074dc55d \ > --hash=sha256:27babb9879bf2c45ed655d02639f4c30e2b9ef1b71ce59c2305bbf7287910a18 \ > --hash=sha256:27c1bbfb9d84a75cf33b7f19b53c29eb7ead99b235fce52aced5507174ab8f98 \ > --hash=sha256:2b79f3681481f4424d7845cc7a261d5a4baa810d656b631fa844dc9967b36a7b \ > --hash=sha256:2f10aa5452b865818dd0137f568d443f5e93b60a27080a01aa4b7512c7ba13a3 \ > --hash=sha256:309f45d4d7481d6f09cb9e35c72caa0e50add4a30bb08c04c5fe5956a0158633 \ > --hash=sha256:31acc37288b8e69e4849f618c3d5cf13b58077c1a1ff9ade0b3065ba974cd385 \ > --hash=sha256:37c5028cebdf731298724070838fb3a71ef1fbd201d193d311ac2cbdbca25a23 \ > --hash=sha256:38a0e7ee65c8999394d92d9c724434cb629279d19844f2b69d9bbc46dc8b8b61 \ > --hash=sha256:39aa09ed7ce2a648c904f79032d16dda29e6913112af8465a7bf710eef23c7ca \ > --hash=sha256:3cd7ee8bbfab277ab56e272221886fd33a1b5943fbf45ae9195aa6a48715a8a0 \ > --hash=sha256:3d642e5c029e2acfacf6aa0a7a3e822086b3b777c70d364742561f9ca64c1ffc \ > --hash=sha256:41bbc2678a5b6a19371b2cb51f30ccea71f0c14b26477d2d884fed761cea42c7 \ > --hash=sha256:45327fc57afbe3f2c3d7f54a335d5cecee8a9fdb3906a2fbed8af4092f4926df \ > --hash=sha256:4542c98b8364b976593703a2dda97377433b102f380b61bc3a2cbc2fbdae1d1f \ > --hash=sha256:45fa1e8ad6f4367ad73674ca560da8e827cc890eaf371f3ee063d6d7366a207b \ > --hash=sha256:4638ebc17de08c2f3acba557efeb6f195c88b7299d8c55c0bb4e20638bbd4d03 \ > --hash=sha256:464bf799b422be662e5e562e62beeffc9eaa907d381a9d63a2556615bbda286d \ > --hash=sha256:4788135db4bd83a5edc3522b11544b013be7d25b74b155e08dd3b20cd6663bbb \ > --hash=sha256:47e8f034be31390a8f525431eb5e803a78ce7e2e11b32abf5361a972e14e6b61 \ > --hash=sha256:4824eb018f0a4680b1e434697a9bf3f41c7799b80076d06530cbbd212e040ccc \ > --hash=sha256:4bf20c9722821fce766e685718e739deeccc60d6bc7be5029281db41f999ee0c \ > --hash=sha256:4d3097c39d7d4e8dba2ef86de171dcccad876c36d8379415ba18a5a4d0533510 \ > --hash=sha256:4d889d498fce64bfcd8adf1a78579a7f626f825cbeb2956a24a29b35f9a1df32 \ > --hash=sha256:4d965c7c4b40d1cedec9188782e98bd576f9a04868835604200c3a6e817b824f \ > --hash=sha256:4e26944e64ecc1d7b19db954c0f7b471f3b141ec8e1a9f57cfe27671525cd248 \ > --hash=sha256:534f3f63c000f08050c6f7f4378bf2b52d7ba9214e9d35e3f60f7ad24a4d6425 \ > --hash=sha256:539432f911686cb80284c30b33eaf9f4fd9a11e1111fe0dc98fdbdce69b49821 \ > --hash=sha256:5af2d43b1978958d91351afbcc9b4d0cfe144c46c61740e82aaac8bb39ab1a4d \ > --hash=sha256:5cfb5ac4e82c47d5dc25b209dd4c3989e284b80109f9e08b33c895080c424b4f \ > --hash=sha256:616b3451b05ca63b8f433c627f68046b39543faeaa4e50d8c6699a2a1e4b85a5 \ > --hash=sha256:6441a29f42585f085db0c04cd0557d4cbbb46fa68a0972409b1cfe9f430280c1 \ > --hash=sha256:64bfd2c35a2c350f73ac52dc134d8775f93359c4c969280a6fe5301b5b6e7431 \ > --hash=sha256:6ca34c29fbd6592de5fd39e80c1993634d704c4e7e14ba54c87b2c7c53da68fe \ > --hash=sha256:73929a2fb600a2333fce2efd92596cff5e6bf8946e20e93c067b220760064862 \ > --hash=sha256:73f62bb7fd862d9bcd886e10612bade6fe042eda8b47e8c129892bcfb7b45e84 \ > --hash=sha256:7584171eb3115acd4aba699bc836634783f5bd5aab131e88d8eeb8a3328a4a72 \ > --hash=sha256:78b1ac0151271ce62bc2b33755f1043eda6a310373143a2f27e2bcd3d5fc8633 \ > --hash=sha256:7cb496e934b71f1ade844ab91d6ccac78a3520e5df02fdb2357f85a71e541e69 \ > --hash=sha256:7d55e38a89ec2ae17b2fa7ffeda6b70f63afab1888bd0d57aaa7b7879760acb4 \ > --hash=sha256:7ecf0a67b212900e92f328181fed02840d74ed39553cdb38d27314e2b9c89dfa \ > --hash=sha256:85cd9c0af34e371390e3cb2f3a470b0b40cc07568c1e966c638c49062be6352d \ > --hash=sha256:8ba3073eb38a1294e8c7902989fb80a7a147a69db2396818722bd078476586a0 \ > --hash=sha256:8d0dbcc57839831ae79fd24b1b83d42bc9448d79feaf3ed3fb5cbf94ffbf3eb7 \ > --hash=sha256:9342de50824b40f55d2600f66c6f9a91a3a24851eca39145a749a3dc804ee599 \ > --hash=sha256:937c0fe9538f1212b62df6a68f8d78df3572fe3682d9a0dd8851eac8a4e46063 \ > --hash=sha256:9eff3837d447fccf2ac38c259b14ab9cbde700df355a45a1f3ff244d5e78f8b6 \ > --hash=sha256:9ff322c7e1030543d35d83bb521b69114d3d150750528d7757544f639def9ad6 \ > --hash=sha256:a3e9a18401a28db4358da2e191508702dbf065f2664c710708cdf9552b9fa50c \ > --hash=sha256:a439fd0d45d51245bbde799726adda5bd18aed3fa2b01ab2e6a64d6d13776fa3 \ > --hash=sha256:a666134b41712e30a71afaa26deeb4da374179f769fa49784cdf0e7698880fab \ > --hash=sha256:ad442b8585ed4a3c2d22e4bf7b465d9b7d281e055b09719a8aeb5b576422dc9b \ > --hash=sha256:ad46027dbd5c1db87dc0b49becbe23093b143a20302028d387dae37ee5ef95f5 \ > --hash=sha256:ad814864aba263be9c83ada44a95f72d10caabbf91589321f95c29c902bdcff0 \ > --hash=sha256:adcb9c8848e15c613e483e0b99767ae325af27fe0dbd866df01fe5849d06e6e1 \ > --hash=sha256:af693a89db6d6ac97dd84dd7769b3f2bd9007b578127d0e7dda03053f4d3b34b \ > --hash=sha256:afa8808159169368b66e4fbeafac6c6fd8f26246dc4d0dcc2caf94bd9cf1b828 \ > --hash=sha256:ba2b807d2b62c446120906b8580cddae1d76d3de4efbb95ccc87f5e35c75b4b2 \ > --hash=sha256:ba6a8cf089222a171b8f84e6ec2d10f7a9d14f26be3a347b14775a8741810676 \ > --hash=sha256:bf3ed993bdf4754909f175ff348cf8f78d4451215b8aa338633f149ca3b1f37a \ > --hash=sha256:bf6a1d2c920cc9528e884850a4b2ee7629e3d362d5c44c66526d4097bbb07a1a \ > --hash=sha256:c089d8e7f1b4db08b2f8e4107304eec338df046275dad432635a9be9531e2fc8 \ > --hash=sha256:c24465dd11b65c8510f251b095fc788c7c91481c81840112fe3f76c30793a455 \ > --hash=sha256:cb08fab0fc1db15c277b72e33ac74ad9c0c789413da8984a3eacb22a94b42ef4 \ > --hash=sha256:cd782807d35c8a41aaa7d30b5107784420eefd9fdc1c760d86007d43ae00b15d \ > --hash=sha256:d5146a6749b1905e04e62e0ad4622f079e5582f8b3abef5fb64516c623127908 \ > --hash=sha256:dcbff997f47d45bf028bda4c3036bb3101e89a3df271281d392b6175f71c71d1 \ > --hash=sha256:dd3b023f3317dbbbc775e43651ce1a31a9cea46216ad0b5be37afc18a2007699 \ > --hash=sha256:deeb64335f489c3c11949cbd1d1668b3f1fb2d1c6a5bf40e126ef7bf95f9fa40 \ > --hash=sha256:e09d9f6d722de9d4c1c5f122ea9bc6b25a05f975457805af4dcab7b0128aacbf \ > --hash=sha256:e33fcbea3b63a339dd94de0fc442fefacfe681cc7027ce63f67af9f7ceec7422 \ > --hash=sha256:e3ed6834cc005798187a56c248a2240207cb8ffdda1c89e9afda4c3d526c2ea0 \ > --hash=sha256:e4208f23f12d0ad206a07a489ef4cb15722c10b62774c4460ee4123250be938e \ > --hash=sha256:e427b66596a6441a5607dfc0085b47d36073f88da7ac48afd284263b9b99e6ce \ > --hash=sha256:e72ac299a6bf732a60852d052acf3999d234686755a02ba111e85e7ebf8155b1 \ > --hash=sha256:ea955e4ed21f4bbb9b83fea09fc6af0bed82e69ecf6b35ec89237a0a49633033 \ > --hash=sha256:ed5babdcd3d052ba5cf8832561f18df20778c7ccf12587b2d82f7bf3bf259a0e \ > --hash=sha256:eda1a89c4526826c0a87d33596a4cd15b8f58e9250f503e39af1699ba9c878e8 \ > --hash=sha256:ef1fd1b24e9bcddcb168437686677104e205c8e25b066e73ffdf331d3bb8792b \ > --hash=sha256:ef6a222d54f742c24f6b143aab088702db3a827b224e75b9dd28b38597c595fe \ > --hash=sha256:f3dd5333049b5b3faa739e0f40b77cc8b7a1aded2f2da0e28794c81586d7b08a \ > --hash=sha256:f60e31e3e15e8c294bf70c60f8ae4d0c3caf3af8f26466e9aa8ea4c01302749b \ > --hash=sha256:f642313d559f9d9a00c4de6820124059cc3342a0d0127b18301de2c680d5ea40 \ > --hash=sha256:f868e731a18b403b88aa434d960489ceeed0ddeb44ebc02389540731a67705e0 \ > --hash=sha256:f93c867e5e85584a28c6a6feb6f2086d717266eb5d1210d096dd717b7f4dec04 > pydantic-extra-types==2.0.0 ; python_version >= "3.10" and python_version < "4.0" \ > --hash=sha256:137ddacb168d95ea77591dbb3739ec4da5eeac0fc4df7f797371d9904451a178 \ > --hash=sha256:63e5109f00815e71fff2b82090ff0523baef6b8a51889356fd984ef50c184e64 > pydantic==2.0.3 ; python_version >= "3.10" and python_version < "4.0" \ > --hash=sha256:614eb3321eb600c81899a88fa9858b008e3c79e0d4f1b49ab1f516b4b0c27cfb \ > --hash=sha256:94f13e0dcf139a5125e88283fc999788d894e14ed90cf478bcc2ee50bd4fc630 1244,1246c1318,1320 < zipp==3.15.0 ; python_version >= "3.10" and python_version < "4.0" \ < --hash=sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b \ < --hash=sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556 --- > zipp==3.16.2 ; python_version >= "3.10" and python_version < "4.0" \ > --hash=sha256:679e51dd4403591b2d6838a48de3d283f3d188412a9782faadf845f298736ba0 \ > --hash=sha256:ebc15946aa78bd63458992fc81ec3b6f7b1e92d51c35e6de1c3804e73b799147 ```URL to code causing the issue
No response
MCVE
Steps to reproduce
Screenshots
Logs
No response
Litestar Version
litestar @ git+https://github.com/litestar-org/litestar.git@HEAD ; python_version >= "3.10" and python_version < "4.0"
Platform
Funding