diff --git a/envs/pydantic-v1/poetry.lock b/envs/pydantic-v1/poetry.lock index 9b9ce87b3..2eee687b2 100644 --- a/envs/pydantic-v1/poetry.lock +++ b/envs/pydantic-v1/poetry.lock @@ -38,14 +38,14 @@ files = [ [[package]] name = "certifi" -version = "2025.1.31" +version = "2025.4.26" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" groups = ["dev"] files = [ - {file = "certifi-2025.1.31-py3-none-any.whl", hash = "sha256:ca78db4565a652026a4db2bcdf68f2fb589ea80d0be70e03929ed730746b84fe"}, - {file = "certifi-2025.1.31.tar.gz", hash = "sha256:3d5da6925056f6f18f119200434a4780a94263f10d1c21d032a6f6b2baa20651"}, + {file = "certifi-2025.4.26-py3-none-any.whl", hash = "sha256:30350364dfe371162649852c63336a15c70c6510c2ad5015b21c2345311805f3"}, + {file = "certifi-2025.4.26.tar.gz", hash = "sha256:0a816057ea3cdefcef70270d2c515e4506bbc954f417fa5ade2021213bb8f0c6"}, ] [[package]] @@ -321,7 +321,7 @@ testing = ["hatch", "pre-commit", "pytest", "tox"] [[package]] name = "githubkit" -version = "0.12.11" +version = "0.12.12" description = "GitHub SDK for Python" optional = false python-versions = "^3.9" @@ -372,14 +372,14 @@ url = "../test" [[package]] name = "h11" -version = "0.14.0" +version = "0.16.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, - {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, + {file = "h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86"}, + {file = "h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1"}, ] [[package]] @@ -405,19 +405,19 @@ yaml = ["pyyaml (==6.0.1)"] [[package]] name = "httpcore" -version = "1.0.8" +version = "1.0.9" description = "A minimal low-level HTTP client." optional = false python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "httpcore-1.0.8-py3-none-any.whl", hash = "sha256:5254cf149bcb5f75e9d1b2b9f729ea4a4b883d1ad7379fc632b727cec23674be"}, - {file = "httpcore-1.0.8.tar.gz", hash = "sha256:86e94505ed24ea06514883fd44d2bc02d90e77e7979c8eb71b90f41d364a1bad"}, + {file = "httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55"}, + {file = "httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8"}, ] [package.dependencies] certifi = "*" -h11 = ">=0.13,<0.15" +h11 = ">=0.16" [package.extras] asyncio = ["anyio (>=4.0,<5.0)"] @@ -545,62 +545,62 @@ files = [ [[package]] name = "pydantic" -version = "1.10.21" +version = "1.10.22" description = "Data validation and settings management using python type hints" optional = false python-versions = ">=3.7" groups = ["dev"] files = [ - {file = "pydantic-1.10.21-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:245e486e0fec53ec2366df9cf1cba36e0bbf066af7cd9c974bbbd9ba10e1e586"}, - {file = "pydantic-1.10.21-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6c54f8d4c151c1de784c5b93dfbb872067e3414619e10e21e695f7bb84d1d1fd"}, - {file = "pydantic-1.10.21-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b64708009cfabd9c2211295144ff455ec7ceb4c4fb45a07a804309598f36187"}, - {file = "pydantic-1.10.21-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8a148410fa0e971ba333358d11a6dea7b48e063de127c2b09ece9d1c1137dde4"}, - {file = "pydantic-1.10.21-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:36ceadef055af06e7756eb4b871cdc9e5a27bdc06a45c820cd94b443de019bbf"}, - {file = "pydantic-1.10.21-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c0501e1d12df6ab1211b8cad52d2f7b2cd81f8e8e776d39aa5e71e2998d0379f"}, - {file = "pydantic-1.10.21-cp310-cp310-win_amd64.whl", hash = "sha256:c261127c275d7bce50b26b26c7d8427dcb5c4803e840e913f8d9df3f99dca55f"}, - {file = "pydantic-1.10.21-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8b6350b68566bb6b164fb06a3772e878887f3c857c46c0c534788081cb48adf4"}, - {file = "pydantic-1.10.21-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:935b19fdcde236f4fbf691959fa5c3e2b6951fff132964e869e57c70f2ad1ba3"}, - {file = "pydantic-1.10.21-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2b6a04efdcd25486b27f24c1648d5adc1633ad8b4506d0e96e5367f075ed2e0b"}, - {file = "pydantic-1.10.21-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c1ba253eb5af8d89864073e6ce8e6c8dec5f49920cff61f38f5c3383e38b1c9f"}, - {file = "pydantic-1.10.21-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:57f0101e6c97b411f287a0b7cf5ebc4e5d3b18254bf926f45a11615d29475793"}, - {file = "pydantic-1.10.21-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:90e85834f0370d737c77a386ce505c21b06bfe7086c1c568b70e15a568d9670d"}, - {file = "pydantic-1.10.21-cp311-cp311-win_amd64.whl", hash = "sha256:6a497bc66b3374b7d105763d1d3de76d949287bf28969bff4656206ab8a53aa9"}, - {file = "pydantic-1.10.21-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:2ed4a5f13cf160d64aa331ab9017af81f3481cd9fd0e49f1d707b57fe1b9f3ae"}, - {file = "pydantic-1.10.21-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3b7693bb6ed3fbe250e222f9415abb73111bb09b73ab90d2d4d53f6390e0ccc1"}, - {file = "pydantic-1.10.21-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:185d5f1dff1fead51766da9b2de4f3dc3b8fca39e59383c273f34a6ae254e3e2"}, - {file = "pydantic-1.10.21-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:38e6d35cf7cd1727822c79e324fa0677e1a08c88a34f56695101f5ad4d5e20e5"}, - {file = "pydantic-1.10.21-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:1d7c332685eafacb64a1a7645b409a166eb7537f23142d26895746f628a3149b"}, - {file = "pydantic-1.10.21-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2c9b782db6f993a36092480eeaab8ba0609f786041b01f39c7c52252bda6d85f"}, - {file = "pydantic-1.10.21-cp312-cp312-win_amd64.whl", hash = "sha256:7ce64d23d4e71d9698492479505674c5c5b92cda02b07c91dfc13633b2eef805"}, - {file = "pydantic-1.10.21-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0067935d35044950be781933ab91b9a708eaff124bf860fa2f70aeb1c4be7212"}, - {file = "pydantic-1.10.21-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5e8148c2ce4894ce7e5a4925d9d3fdce429fb0e821b5a8783573f3611933a251"}, - {file = "pydantic-1.10.21-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a4973232c98b9b44c78b1233693e5e1938add5af18042f031737e1214455f9b8"}, - {file = "pydantic-1.10.21-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:662bf5ce3c9b1cef32a32a2f4debe00d2f4839fefbebe1d6956e681122a9c839"}, - {file = "pydantic-1.10.21-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:98737c3ab5a2f8a85f2326eebcd214510f898881a290a7939a45ec294743c875"}, - {file = "pydantic-1.10.21-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:0bb58bbe65a43483d49f66b6c8474424d551a3fbe8a7796c42da314bac712738"}, - {file = "pydantic-1.10.21-cp313-cp313-win_amd64.whl", hash = "sha256:e622314542fb48542c09c7bd1ac51d71c5632dd3c92dc82ede6da233f55f4848"}, - {file = "pydantic-1.10.21-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:d356aa5b18ef5a24d8081f5c5beb67c0a2a6ff2a953ee38d65a2aa96526b274f"}, - {file = "pydantic-1.10.21-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:08caa8c0468172d27c669abfe9e7d96a8b1655ec0833753e117061febaaadef5"}, - {file = "pydantic-1.10.21-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c677aa39ec737fec932feb68e4a2abe142682f2885558402602cd9746a1c92e8"}, - {file = "pydantic-1.10.21-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:79577cc045d3442c4e845df53df9f9202546e2ba54954c057d253fc17cd16cb1"}, - {file = "pydantic-1.10.21-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:b6b73ab347284719f818acb14f7cd80696c6fdf1bd34feee1955d7a72d2e64ce"}, - {file = "pydantic-1.10.21-cp37-cp37m-win_amd64.whl", hash = "sha256:46cffa24891b06269e12f7e1ec50b73f0c9ab4ce71c2caa4ccf1fb36845e1ff7"}, - {file = "pydantic-1.10.21-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:298d6f765e3c9825dfa78f24c1efd29af91c3ab1b763e1fd26ae4d9e1749e5c8"}, - {file = "pydantic-1.10.21-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:f2f4a2305f15eff68f874766d982114ac89468f1c2c0b97640e719cf1a078374"}, - {file = "pydantic-1.10.21-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:35b263b60c519354afb3a60107d20470dd5250b3ce54c08753f6975c406d949b"}, - {file = "pydantic-1.10.21-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e23a97a6c2f2db88995496db9387cd1727acdacc85835ba8619dce826c0b11a6"}, - {file = "pydantic-1.10.21-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:3c96fed246ccc1acb2df032ff642459e4ae18b315ecbab4d95c95cfa292e8517"}, - {file = "pydantic-1.10.21-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:b92893ebefc0151474f682e7debb6ab38552ce56a90e39a8834734c81f37c8a9"}, - {file = "pydantic-1.10.21-cp38-cp38-win_amd64.whl", hash = "sha256:b8460bc256bf0de821839aea6794bb38a4c0fbd48f949ea51093f6edce0be459"}, - {file = "pydantic-1.10.21-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5d387940f0f1a0adb3c44481aa379122d06df8486cc8f652a7b3b0caf08435f7"}, - {file = "pydantic-1.10.21-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:266ecfc384861d7b0b9c214788ddff75a2ea123aa756bcca6b2a1175edeca0fe"}, - {file = "pydantic-1.10.21-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:61da798c05a06a362a2f8c5e3ff0341743e2818d0f530eaac0d6898f1b187f1f"}, - {file = "pydantic-1.10.21-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a621742da75ce272d64ea57bd7651ee2a115fa67c0f11d66d9dcfc18c2f1b106"}, - {file = "pydantic-1.10.21-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:9e3e4000cd54ef455694b8be9111ea20f66a686fc155feda1ecacf2322b115da"}, - {file = "pydantic-1.10.21-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:f198c8206640f4c0ef5a76b779241efb1380a300d88b1bce9bfe95a6362e674d"}, - {file = "pydantic-1.10.21-cp39-cp39-win_amd64.whl", hash = "sha256:e7f0cda108b36a30c8fc882e4fc5b7eec8ef584aa43aa43694c6a7b274fb2b56"}, - {file = "pydantic-1.10.21-py3-none-any.whl", hash = "sha256:db70c920cba9d05c69ad4a9e7f8e9e83011abb2c6490e561de9ae24aee44925c"}, - {file = "pydantic-1.10.21.tar.gz", hash = "sha256:64b48e2b609a6c22178a56c408ee1215a7206077ecb8a193e2fda31858b2362a"}, + {file = "pydantic-1.10.22-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:57889565ccc1e5b7b73343329bbe6198ebc472e3ee874af2fa1865cfe7048228"}, + {file = "pydantic-1.10.22-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:90729e22426de79bc6a3526b4c45ec4400caf0d4f10d7181ba7f12c01bb3897d"}, + {file = "pydantic-1.10.22-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f8684d347f351554ec94fdcb507983d3116dc4577fb8799fed63c65869a2d10"}, + {file = "pydantic-1.10.22-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c8dad498ceff2d9ef1d2e2bc6608f5b59b8e1ba2031759b22dfb8c16608e1802"}, + {file = "pydantic-1.10.22-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:fac529cc654d4575cf8de191cce354b12ba705f528a0a5c654de6d01f76cd818"}, + {file = "pydantic-1.10.22-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:4148232aded8dd1dd13cf910a01b32a763c34bd79a0ab4d1ee66164fcb0b7b9d"}, + {file = "pydantic-1.10.22-cp310-cp310-win_amd64.whl", hash = "sha256:ece68105d9e436db45d8650dc375c760cc85a6793ae019c08769052902dca7db"}, + {file = "pydantic-1.10.22-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8e530a8da353f791ad89e701c35787418605d35085f4bdda51b416946070e938"}, + {file = "pydantic-1.10.22-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:654322b85642e9439d7de4c83cb4084ddd513df7ff8706005dada43b34544946"}, + {file = "pydantic-1.10.22-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8bece75bd1b9fc1c32b57a32831517943b1159ba18b4ba32c0d431d76a120ae"}, + {file = "pydantic-1.10.22-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eccb58767f13c6963dcf96d02cb8723ebb98b16692030803ac075d2439c07b0f"}, + {file = "pydantic-1.10.22-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:7778e6200ff8ed5f7052c1516617423d22517ad36cc7a3aedd51428168e3e5e8"}, + {file = "pydantic-1.10.22-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bffe02767d27c39af9ca7dc7cd479c00dda6346bb62ffc89e306f665108317a2"}, + {file = "pydantic-1.10.22-cp311-cp311-win_amd64.whl", hash = "sha256:23bc19c55427091b8e589bc08f635ab90005f2dc99518f1233386f46462c550a"}, + {file = "pydantic-1.10.22-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:92d0f97828a075a71d9efc65cf75db5f149b4d79a38c89648a63d2932894d8c9"}, + {file = "pydantic-1.10.22-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6af5a2811b6b95b58b829aeac5996d465a5f0c7ed84bd871d603cf8646edf6ff"}, + {file = "pydantic-1.10.22-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6cf06d8d40993e79af0ab2102ef5da77b9ddba51248e4cb27f9f3f591fbb096e"}, + {file = "pydantic-1.10.22-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:184b7865b171a6057ad97f4a17fbac81cec29bd103e996e7add3d16b0d95f609"}, + {file = "pydantic-1.10.22-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:923ad861677ab09d89be35d36111156063a7ebb44322cdb7b49266e1adaba4bb"}, + {file = "pydantic-1.10.22-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:82d9a3da1686443fb854c8d2ab9a473251f8f4cdd11b125522efb4d7c646e7bc"}, + {file = "pydantic-1.10.22-cp312-cp312-win_amd64.whl", hash = "sha256:1612604929af4c602694a7f3338b18039d402eb5ddfbf0db44f1ebfaf07f93e7"}, + {file = "pydantic-1.10.22-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:b259dc89c9abcd24bf42f31951fb46c62e904ccf4316393f317abeeecda39978"}, + {file = "pydantic-1.10.22-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9238aa0964d80c0908d2f385e981add58faead4412ca80ef0fa352094c24e46d"}, + {file = "pydantic-1.10.22-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6f8029f05b04080e3f1a550575a1bca747c0ea4be48e2d551473d47fd768fc1b"}, + {file = "pydantic-1.10.22-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5c06918894f119e0431a36c9393bc7cceeb34d1feeb66670ef9b9ca48c073937"}, + {file = "pydantic-1.10.22-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:e205311649622ee8fc1ec9089bd2076823797f5cd2c1e3182dc0e12aab835b35"}, + {file = "pydantic-1.10.22-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:815f0a73d5688d6dd0796a7edb9eca7071bfef961a7b33f91e618822ae7345b7"}, + {file = "pydantic-1.10.22-cp313-cp313-win_amd64.whl", hash = "sha256:9dfce71d42a5cde10e78a469e3d986f656afc245ab1b97c7106036f088dd91f8"}, + {file = "pydantic-1.10.22-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:3ecaf8177b06aac5d1f442db1288e3b46d9f05f34fd17fdca3ad34105328b61a"}, + {file = "pydantic-1.10.22-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fb36c2de9ea74bd7f66b5481dea8032d399affd1cbfbb9bb7ce539437f1fce62"}, + {file = "pydantic-1.10.22-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e6b8d14a256be3b8fff9286d76c532f1a7573fbba5f189305b22471c6679854d"}, + {file = "pydantic-1.10.22-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:1c33269e815db4324e71577174c29c7aa30d1bba51340ce6be976f6f3053a4c6"}, + {file = "pydantic-1.10.22-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:8661b3ab2735b2a9ccca2634738534a795f4a10bae3ab28ec0a10c96baa20182"}, + {file = "pydantic-1.10.22-cp37-cp37m-win_amd64.whl", hash = "sha256:22bdd5fe70d4549995981c55b970f59de5c502d5656b2abdfcd0a25be6f3763e"}, + {file = "pydantic-1.10.22-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:e3f33d1358aa4bc2795208cc29ff3118aeaad0ea36f0946788cf7cadeccc166b"}, + {file = "pydantic-1.10.22-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:813f079f9cd136cac621f3f9128a4406eb8abd2ad9fdf916a0731d91c6590017"}, + {file = "pydantic-1.10.22-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ab618ab8dca6eac7f0755db25f6aba3c22c40e3463f85a1c08dc93092d917704"}, + {file = "pydantic-1.10.22-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d128e1aaa38db88caca920d5822c98fc06516a09a58b6d3d60fa5ea9099b32cc"}, + {file = "pydantic-1.10.22-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:cc97bbc25def7025e55fc9016080773167cda2aad7294e06a37dda04c7d69ece"}, + {file = "pydantic-1.10.22-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:0dda5d7157d543b1fa565038cae6e952549d0f90071c839b3740fb77c820fab8"}, + {file = "pydantic-1.10.22-cp38-cp38-win_amd64.whl", hash = "sha256:a093fe44fe518cb445d23119511a71f756f8503139d02fcdd1173f7b76c95ffe"}, + {file = "pydantic-1.10.22-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ec54c89b2568b258bb30d7348ac4d82bec1b58b377fb56a00441e2ac66b24587"}, + {file = "pydantic-1.10.22-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d8f1d1a1532e4f3bcab4e34e8d2197a7def4b67072acd26cfa60e92d75803a48"}, + {file = "pydantic-1.10.22-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8ad83ca35508c27eae1005b6b61f369f78aae6d27ead2135ec156a2599910121"}, + {file = "pydantic-1.10.22-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:53cdb44b78c420f570ff16b071ea8cd5a477635c6b0efc343c8a91e3029bbf1a"}, + {file = "pydantic-1.10.22-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:16d0a5ae9d98264186ce31acdd7686ec05fd331fab9d68ed777d5cb2d1514e5e"}, + {file = "pydantic-1.10.22-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:8aee040e25843f036192b1a1af62117504a209a043aa8db12e190bb86ad7e611"}, + {file = "pydantic-1.10.22-cp39-cp39-win_amd64.whl", hash = "sha256:7f691eec68dbbfca497d3c11b92a3e5987393174cbedf03ec7a4184c35c2def6"}, + {file = "pydantic-1.10.22-py3-none-any.whl", hash = "sha256:343037d608bcbd34df937ac259708bfc83664dadf88afe8516c4f282d7d471a9"}, + {file = "pydantic-1.10.22.tar.gz", hash = "sha256:ee1006cebd43a8e7158fb7190bb8f4e2da9649719bff65d0c287282ec38dec6d"}, ] [package.dependencies] diff --git a/envs/pydantic-v2/poetry.lock b/envs/pydantic-v2/poetry.lock index cb0c17661..0aadc1ebd 100644 --- a/envs/pydantic-v2/poetry.lock +++ b/envs/pydantic-v2/poetry.lock @@ -50,14 +50,14 @@ files = [ [[package]] name = "certifi" -version = "2025.1.31" +version = "2025.4.26" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" groups = ["dev"] files = [ - {file = "certifi-2025.1.31-py3-none-any.whl", hash = "sha256:ca78db4565a652026a4db2bcdf68f2fb589ea80d0be70e03929ed730746b84fe"}, - {file = "certifi-2025.1.31.tar.gz", hash = "sha256:3d5da6925056f6f18f119200434a4780a94263f10d1c21d032a6f6b2baa20651"}, + {file = "certifi-2025.4.26-py3-none-any.whl", hash = "sha256:30350364dfe371162649852c63336a15c70c6510c2ad5015b21c2345311805f3"}, + {file = "certifi-2025.4.26.tar.gz", hash = "sha256:0a816057ea3cdefcef70270d2c515e4506bbc954f417fa5ade2021213bb8f0c6"}, ] [[package]] @@ -333,7 +333,7 @@ testing = ["hatch", "pre-commit", "pytest", "tox"] [[package]] name = "githubkit" -version = "0.12.11" +version = "0.12.12" description = "GitHub SDK for Python" optional = false python-versions = "^3.9" @@ -384,14 +384,14 @@ url = "../test" [[package]] name = "h11" -version = "0.14.0" +version = "0.16.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, - {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, + {file = "h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86"}, + {file = "h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1"}, ] [[package]] @@ -417,19 +417,19 @@ yaml = ["pyyaml (==6.0.1)"] [[package]] name = "httpcore" -version = "1.0.8" +version = "1.0.9" description = "A minimal low-level HTTP client." optional = false python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "httpcore-1.0.8-py3-none-any.whl", hash = "sha256:5254cf149bcb5f75e9d1b2b9f729ea4a4b883d1ad7379fc632b727cec23674be"}, - {file = "httpcore-1.0.8.tar.gz", hash = "sha256:86e94505ed24ea06514883fd44d2bc02d90e77e7979c8eb71b90f41d364a1bad"}, + {file = "httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55"}, + {file = "httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8"}, ] [package.dependencies] certifi = "*" -h11 = ">=0.13,<0.15" +h11 = ">=0.16" [package.extras] asyncio = ["anyio (>=4.0,<5.0)"] diff --git a/githubkit/rest/paginator.py b/githubkit/rest/paginator.py index 6d69dd5ed..d02fbf943 100644 --- a/githubkit/rest/paginator.py +++ b/githubkit/rest/paginator.py @@ -6,6 +6,7 @@ Callable, Generic, Optional, + TypedDict, TypeVar, Union, cast, @@ -16,6 +17,7 @@ import httpx from githubkit.response import Response +from githubkit.typing import HeaderTypes from githubkit.utils import is_async if TYPE_CHECKING: @@ -35,6 +37,12 @@ NEXT_LINK_PATTERN = r'<([^<>]+)>;\s*rel="next"' +class PaginatorState(TypedDict): + next_link: Optional[httpx.URL] + request_method: str + response_model: Any + + # https://docs.github.com/en/rest/using-the-rest-api/using-pagination-in-the-rest-api # https://github.com/octokit/plugin-paginate-rest.js/blob/1f44b5469b31ddec9621000e6e1aee63c71ea8bf/src/iterator.ts class Paginator(Generic[RT]): @@ -76,10 +84,7 @@ def __init__( self.map_func = map_func - self._initialized: bool = False - self._request_method: Optional[str] = None - self._response_model: Optional[Any] = None - self._next_link: Optional[httpx.URL] = None + self._state: Optional[PaginatorState] = None self._index: int = 0 self._cached_data: list[RT] = [] @@ -87,22 +92,26 @@ def __init__( @property def finalized(self) -> bool: """Whether the paginator is finalized or not.""" - return self._initialized and self._next_link is None + return (self._state["next_link"] is None) if self._state is not None else False + + @property + def _headers(self) -> Optional[HeaderTypes]: + return self.kwargs.get("headers") # type: ignore def reset(self) -> None: """Reset the paginator to the initial state.""" - self._initialized = False - self._next_link = None + self._state = None self._index = 0 self._cached_data = [] def __next__(self) -> RT: while self._index >= len(self._cached_data): - self._get_next_page() if self.finalized: raise StopIteration + self._get_next_page() + current = self._cached_data[self._index] self._index += 1 return current @@ -114,10 +123,11 @@ def __iter__(self: Self) -> Self: async def __anext__(self) -> RT: while self._index >= len(self._cached_data): - await self._aget_next_page() if self.finalized: raise StopAsyncIteration + await self._aget_next_page() + current = self._cached_data[self._index] self._index += 1 return current @@ -151,64 +161,56 @@ def _fill_cache_data(self, data: list[RT]) -> None: self._index = 0 def _get_next_page(self) -> None: - if not self._initialized: + if self._state is None: # First request - response = cast( - Response[Any], - self.request(*self.args, **self.kwargs), - ) - self._initialized = True - self._request_method = response.raw_request.method + response = cast(Response[Any], self.request(*self.args, **self.kwargs)) else: - # Next request - if self._next_link is None: - raise RuntimeError("Paginator is finalized, no more pages to fetch.") - if self._request_method is None: - raise RuntimeError("Request method is not set, this should not happen.") - if self._response_model is None: - raise RuntimeError("Response model is not set, this should not happen.") - # we request the next page with the same method and response model + if self._state["next_link"] is None: + raise RuntimeError("No next page to request") + response = cast( Response[Any], self.rest._github.request( - self._request_method, - self._next_link, - headers=self.kwargs.get("headers"), # type: ignore - response_model=self._response_model, # type: ignore + self._state["request_method"], + self._state["next_link"], + headers=self._headers, # type: ignore + response_model=self._state["response_model"], # type: ignore ), ) - self._next_link = self._find_next_link(response) + self._state = PaginatorState( + next_link=self._find_next_link(response), + request_method=response.raw_request.method, + response_model=response._data_model, + ) self._fill_cache_data(self._apply_map_func(response)) async def _aget_next_page(self) -> None: - if not self._initialized: + if self._state is None: # First request response = cast( Response[Any], await self.request(*self.args, **self.kwargs), # type: ignore ) - self._initialized = True - self._request_method = response.raw_request.method else: - # Next request - if self._next_link is None: - raise RuntimeError("Paginator is finalized, no more pages to fetch.") - if self._request_method is None: - raise RuntimeError("Request method is not set, this should not happen.") - if self._response_model is None: - raise RuntimeError("Response model is not set, this should not happen.") + # we request the next page with the same method and response model + if self._state["next_link"] is None: + raise RuntimeError("No next page to request") response = cast( Response[Any], - await self.rest._github.request( - self._request_method, - self._next_link, - headers=self.kwargs.get("headers"), # type: ignore - response_model=self._response_model, # type: ignore + await self.rest._github.arequest( + self._state["request_method"], + self._state["next_link"], + headers=self._headers, # type: ignore + response_model=self._state["response_model"], # type: ignore ), ) - self._next_link = self._find_next_link(response) + self._state = PaginatorState( + next_link=self._find_next_link(response), + request_method=response.raw_request.method, + response_model=response._data_model, + ) self._fill_cache_data(self._apply_map_func(response)) diff --git a/githubkit/versions/ghec_v2022_11_28/rest/checks.py b/githubkit/versions/ghec_v2022_11_28/rest/checks.py index e2b025917..14fbf2726 100644 --- a/githubkit/versions/ghec_v2022_11_28/rest/checks.py +++ b/githubkit/versions/ghec_v2022_11_28/rest/checks.py @@ -822,8 +822,6 @@ def rerequest_run( For more information about how to re-run GitHub Actions jobs, see "[Re-run a job from a workflow run](https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-runs#re-run-a-job-from-a-workflow-run)". - OAuth apps and personal access tokens (classic) cannot use this endpoint. - See also: https://docs.github.com/enterprise-cloud@latest//rest/checks/runs#rerequest-a-check-run """ @@ -861,8 +859,6 @@ async def async_rerequest_run( For more information about how to re-run GitHub Actions jobs, see "[Re-run a job from a workflow run](https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-runs#re-run-a-job-from-a-workflow-run)". - OAuth apps and personal access tokens (classic) cannot use this endpoint. - See also: https://docs.github.com/enterprise-cloud@latest//rest/checks/runs#rerequest-a-check-run """ @@ -1354,8 +1350,6 @@ def rerequest_suite( Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. - OAuth apps and personal access tokens (classic) cannot use this endpoint. - See also: https://docs.github.com/enterprise-cloud@latest//rest/checks/suites#rerequest-a-check-suite """ @@ -1386,8 +1380,6 @@ async def async_rerequest_suite( Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. - OAuth apps and personal access tokens (classic) cannot use this endpoint. - See also: https://docs.github.com/enterprise-cloud@latest//rest/checks/suites#rerequest-a-check-suite """ diff --git a/githubkit/versions/ghec_v2022_11_28/rest/dependabot.py b/githubkit/versions/ghec_v2022_11_28/rest/dependabot.py index d787abcd5..5d0d6ecd4 100644 --- a/githubkit/versions/ghec_v2022_11_28/rest/dependabot.py +++ b/githubkit/versions/ghec_v2022_11_28/rest/dependabot.py @@ -20,7 +20,7 @@ from githubkit.utils import UNSET, exclude_unset if TYPE_CHECKING: - from typing import Literal + from typing import Literal, Union from githubkit import GitHubCore from githubkit.response import Response @@ -79,6 +79,7 @@ def list_alerts_for_enterprise( ecosystem: Missing[str] = UNSET, package: Missing[str] = UNSET, epss_percentage: Missing[str] = UNSET, + has: Missing[Union[str, list[Literal["patch"]]]] = UNSET, scope: Missing[Literal["development", "runtime"]] = UNSET, sort: Missing[Literal["created", "updated", "epss_percentage"]] = UNSET, direction: Missing[Literal["asc", "desc"]] = UNSET, @@ -120,6 +121,7 @@ def list_alerts_for_enterprise( "ecosystem": ecosystem, "package": package, "epss_percentage": epss_percentage, + "has": has, "scope": scope, "sort": sort, "direction": direction, @@ -154,6 +156,7 @@ async def async_list_alerts_for_enterprise( ecosystem: Missing[str] = UNSET, package: Missing[str] = UNSET, epss_percentage: Missing[str] = UNSET, + has: Missing[Union[str, list[Literal["patch"]]]] = UNSET, scope: Missing[Literal["development", "runtime"]] = UNSET, sort: Missing[Literal["created", "updated", "epss_percentage"]] = UNSET, direction: Missing[Literal["asc", "desc"]] = UNSET, @@ -195,6 +198,7 @@ async def async_list_alerts_for_enterprise( "ecosystem": ecosystem, "package": package, "epss_percentage": epss_percentage, + "has": has, "scope": scope, "sort": sort, "direction": direction, @@ -229,6 +233,7 @@ def list_alerts_for_org( ecosystem: Missing[str] = UNSET, package: Missing[str] = UNSET, epss_percentage: Missing[str] = UNSET, + has: Missing[Union[str, list[Literal["patch"]]]] = UNSET, scope: Missing[Literal["development", "runtime"]] = UNSET, sort: Missing[Literal["created", "updated", "epss_percentage"]] = UNSET, direction: Missing[Literal["asc", "desc"]] = UNSET, @@ -268,6 +273,7 @@ def list_alerts_for_org( "ecosystem": ecosystem, "package": package, "epss_percentage": epss_percentage, + "has": has, "scope": scope, "sort": sort, "direction": direction, @@ -303,6 +309,7 @@ async def async_list_alerts_for_org( ecosystem: Missing[str] = UNSET, package: Missing[str] = UNSET, epss_percentage: Missing[str] = UNSET, + has: Missing[Union[str, list[Literal["patch"]]]] = UNSET, scope: Missing[Literal["development", "runtime"]] = UNSET, sort: Missing[Literal["created", "updated", "epss_percentage"]] = UNSET, direction: Missing[Literal["asc", "desc"]] = UNSET, @@ -342,6 +349,7 @@ async def async_list_alerts_for_org( "ecosystem": ecosystem, "package": package, "epss_percentage": epss_percentage, + "has": has, "scope": scope, "sort": sort, "direction": direction, @@ -1143,6 +1151,7 @@ def list_alerts_for_repo( package: Missing[str] = UNSET, manifest: Missing[str] = UNSET, epss_percentage: Missing[str] = UNSET, + has: Missing[Union[str, list[Literal["patch"]]]] = UNSET, scope: Missing[Literal["development", "runtime"]] = UNSET, sort: Missing[Literal["created", "updated", "epss_percentage"]] = UNSET, direction: Missing[Literal["asc", "desc"]] = UNSET, @@ -1174,6 +1183,7 @@ def list_alerts_for_repo( "package": package, "manifest": manifest, "epss_percentage": epss_percentage, + "has": has, "scope": scope, "sort": sort, "direction": direction, @@ -1212,6 +1222,7 @@ async def async_list_alerts_for_repo( package: Missing[str] = UNSET, manifest: Missing[str] = UNSET, epss_percentage: Missing[str] = UNSET, + has: Missing[Union[str, list[Literal["patch"]]]] = UNSET, scope: Missing[Literal["development", "runtime"]] = UNSET, sort: Missing[Literal["created", "updated", "epss_percentage"]] = UNSET, direction: Missing[Literal["asc", "desc"]] = UNSET, @@ -1243,6 +1254,7 @@ async def async_list_alerts_for_repo( "package": package, "manifest": manifest, "epss_percentage": epss_percentage, + "has": has, "scope": scope, "sort": sort, "direction": direction, diff --git a/githubkit/versions/v2022_11_28/rest/checks.py b/githubkit/versions/v2022_11_28/rest/checks.py index dc2ac8f9f..24de2a50f 100644 --- a/githubkit/versions/v2022_11_28/rest/checks.py +++ b/githubkit/versions/v2022_11_28/rest/checks.py @@ -822,8 +822,6 @@ def rerequest_run( For more information about how to re-run GitHub Actions jobs, see "[Re-run a job from a workflow run](https://docs.github.com/rest/actions/workflow-runs#re-run-a-job-from-a-workflow-run)". - OAuth apps and personal access tokens (classic) cannot use this endpoint. - See also: https://docs.github.com/rest/checks/runs#rerequest-a-check-run """ @@ -861,8 +859,6 @@ async def async_rerequest_run( For more information about how to re-run GitHub Actions jobs, see "[Re-run a job from a workflow run](https://docs.github.com/rest/actions/workflow-runs#re-run-a-job-from-a-workflow-run)". - OAuth apps and personal access tokens (classic) cannot use this endpoint. - See also: https://docs.github.com/rest/checks/runs#rerequest-a-check-run """ @@ -1354,8 +1350,6 @@ def rerequest_suite( Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. - OAuth apps and personal access tokens (classic) cannot use this endpoint. - See also: https://docs.github.com/rest/checks/suites#rerequest-a-check-suite """ @@ -1386,8 +1380,6 @@ async def async_rerequest_suite( Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. - OAuth apps and personal access tokens (classic) cannot use this endpoint. - See also: https://docs.github.com/rest/checks/suites#rerequest-a-check-suite """ diff --git a/githubkit/versions/v2022_11_28/rest/dependabot.py b/githubkit/versions/v2022_11_28/rest/dependabot.py index 66fa1c793..a5e728761 100644 --- a/githubkit/versions/v2022_11_28/rest/dependabot.py +++ b/githubkit/versions/v2022_11_28/rest/dependabot.py @@ -20,7 +20,7 @@ from githubkit.utils import UNSET, exclude_unset if TYPE_CHECKING: - from typing import Literal + from typing import Literal, Union from githubkit import GitHubCore from githubkit.response import Response @@ -79,6 +79,7 @@ def list_alerts_for_enterprise( ecosystem: Missing[str] = UNSET, package: Missing[str] = UNSET, epss_percentage: Missing[str] = UNSET, + has: Missing[Union[str, list[Literal["patch"]]]] = UNSET, scope: Missing[Literal["development", "runtime"]] = UNSET, sort: Missing[Literal["created", "updated", "epss_percentage"]] = UNSET, direction: Missing[Literal["asc", "desc"]] = UNSET, @@ -120,6 +121,7 @@ def list_alerts_for_enterprise( "ecosystem": ecosystem, "package": package, "epss_percentage": epss_percentage, + "has": has, "scope": scope, "sort": sort, "direction": direction, @@ -154,6 +156,7 @@ async def async_list_alerts_for_enterprise( ecosystem: Missing[str] = UNSET, package: Missing[str] = UNSET, epss_percentage: Missing[str] = UNSET, + has: Missing[Union[str, list[Literal["patch"]]]] = UNSET, scope: Missing[Literal["development", "runtime"]] = UNSET, sort: Missing[Literal["created", "updated", "epss_percentage"]] = UNSET, direction: Missing[Literal["asc", "desc"]] = UNSET, @@ -195,6 +198,7 @@ async def async_list_alerts_for_enterprise( "ecosystem": ecosystem, "package": package, "epss_percentage": epss_percentage, + "has": has, "scope": scope, "sort": sort, "direction": direction, @@ -229,6 +233,7 @@ def list_alerts_for_org( ecosystem: Missing[str] = UNSET, package: Missing[str] = UNSET, epss_percentage: Missing[str] = UNSET, + has: Missing[Union[str, list[Literal["patch"]]]] = UNSET, scope: Missing[Literal["development", "runtime"]] = UNSET, sort: Missing[Literal["created", "updated", "epss_percentage"]] = UNSET, direction: Missing[Literal["asc", "desc"]] = UNSET, @@ -268,6 +273,7 @@ def list_alerts_for_org( "ecosystem": ecosystem, "package": package, "epss_percentage": epss_percentage, + "has": has, "scope": scope, "sort": sort, "direction": direction, @@ -303,6 +309,7 @@ async def async_list_alerts_for_org( ecosystem: Missing[str] = UNSET, package: Missing[str] = UNSET, epss_percentage: Missing[str] = UNSET, + has: Missing[Union[str, list[Literal["patch"]]]] = UNSET, scope: Missing[Literal["development", "runtime"]] = UNSET, sort: Missing[Literal["created", "updated", "epss_percentage"]] = UNSET, direction: Missing[Literal["asc", "desc"]] = UNSET, @@ -342,6 +349,7 @@ async def async_list_alerts_for_org( "ecosystem": ecosystem, "package": package, "epss_percentage": epss_percentage, + "has": has, "scope": scope, "sort": sort, "direction": direction, @@ -1143,6 +1151,7 @@ def list_alerts_for_repo( package: Missing[str] = UNSET, manifest: Missing[str] = UNSET, epss_percentage: Missing[str] = UNSET, + has: Missing[Union[str, list[Literal["patch"]]]] = UNSET, scope: Missing[Literal["development", "runtime"]] = UNSET, sort: Missing[Literal["created", "updated", "epss_percentage"]] = UNSET, direction: Missing[Literal["asc", "desc"]] = UNSET, @@ -1174,6 +1183,7 @@ def list_alerts_for_repo( "package": package, "manifest": manifest, "epss_percentage": epss_percentage, + "has": has, "scope": scope, "sort": sort, "direction": direction, @@ -1212,6 +1222,7 @@ async def async_list_alerts_for_repo( package: Missing[str] = UNSET, manifest: Missing[str] = UNSET, epss_percentage: Missing[str] = UNSET, + has: Missing[Union[str, list[Literal["patch"]]]] = UNSET, scope: Missing[Literal["development", "runtime"]] = UNSET, sort: Missing[Literal["created", "updated", "epss_percentage"]] = UNSET, direction: Missing[Literal["asc", "desc"]] = UNSET, @@ -1243,6 +1254,7 @@ async def async_list_alerts_for_repo( "package": package, "manifest": manifest, "epss_percentage": epss_percentage, + "has": has, "scope": scope, "sort": sort, "direction": direction, diff --git a/poetry.lock b/poetry.lock index 96acc093d..374710224 100644 --- a/poetry.lock +++ b/poetry.lock @@ -84,14 +84,14 @@ extras = ["regex"] [[package]] name = "certifi" -version = "2025.1.31" +version = "2025.4.26" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" groups = ["main", "docs"] files = [ - {file = "certifi-2025.1.31-py3-none-any.whl", hash = "sha256:ca78db4565a652026a4db2bcdf68f2fb589ea80d0be70e03929ed730746b84fe"}, - {file = "certifi-2025.1.31.tar.gz", hash = "sha256:3d5da6925056f6f18f119200434a4780a94263f10d1c21d032a6f6b2baa20651"}, + {file = "certifi-2025.4.26-py3-none-any.whl", hash = "sha256:30350364dfe371162649852c63336a15c70c6510c2ad5015b21c2345311805f3"}, + {file = "certifi-2025.4.26.tar.gz", hash = "sha256:0a816057ea3cdefcef70270d2c515e4506bbc954f417fa5ade2021213bb8f0c6"}, ] [[package]] @@ -600,14 +600,14 @@ test = ["coverage[toml]", "ddt (>=1.1.1,!=1.4.3)", "mock ; python_version < \"3. [[package]] name = "h11" -version = "0.14.0" +version = "0.16.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" groups = ["main"] files = [ - {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, - {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, + {file = "h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86"}, + {file = "h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1"}, ] [[package]] @@ -633,19 +633,19 @@ yaml = ["pyyaml (==6.0.1)"] [[package]] name = "httpcore" -version = "1.0.8" +version = "1.0.9" description = "A minimal low-level HTTP client." optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "httpcore-1.0.8-py3-none-any.whl", hash = "sha256:5254cf149bcb5f75e9d1b2b9f729ea4a4b883d1ad7379fc632b727cec23674be"}, - {file = "httpcore-1.0.8.tar.gz", hash = "sha256:86e94505ed24ea06514883fd44d2bc02d90e77e7979c8eb71b90f41d364a1bad"}, + {file = "httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55"}, + {file = "httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8"}, ] [package.dependencies] certifi = "*" -h11 = ">=0.13,<0.15" +h11 = ">=0.16" [package.extras] asyncio = ["anyio (>=4.0,<5.0)"] @@ -1582,30 +1582,30 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "ruff" -version = "0.11.6" +version = "0.11.7" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" groups = ["dev"] files = [ - {file = "ruff-0.11.6-py3-none-linux_armv6l.whl", hash = "sha256:d84dcbe74cf9356d1bdb4a78cf74fd47c740bf7bdeb7529068f69b08272239a1"}, - {file = "ruff-0.11.6-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:9bc583628e1096148011a5d51ff3c836f51899e61112e03e5f2b1573a9b726de"}, - {file = "ruff-0.11.6-py3-none-macosx_11_0_arm64.whl", hash = "sha256:f2959049faeb5ba5e3b378709e9d1bf0cab06528b306b9dd6ebd2a312127964a"}, - {file = "ruff-0.11.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63c5d4e30d9d0de7fedbfb3e9e20d134b73a30c1e74b596f40f0629d5c28a193"}, - {file = "ruff-0.11.6-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:26a4b9a4e1439f7d0a091c6763a100cef8fbdc10d68593df6f3cfa5abdd9246e"}, - {file = "ruff-0.11.6-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b5edf270223dd622218256569636dc3e708c2cb989242262fe378609eccf1308"}, - {file = "ruff-0.11.6-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:f55844e818206a9dd31ff27f91385afb538067e2dc0beb05f82c293ab84f7d55"}, - {file = "ruff-0.11.6-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1d8f782286c5ff562e4e00344f954b9320026d8e3fae2ba9e6948443fafd9ffc"}, - {file = "ruff-0.11.6-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:01c63ba219514271cee955cd0adc26a4083df1956d57847978383b0e50ffd7d2"}, - {file = "ruff-0.11.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15adac20ef2ca296dd3d8e2bedc6202ea6de81c091a74661c3666e5c4c223ff6"}, - {file = "ruff-0.11.6-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:4dd6b09e98144ad7aec026f5588e493c65057d1b387dd937d7787baa531d9bc2"}, - {file = "ruff-0.11.6-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:45b2e1d6c0eed89c248d024ea95074d0e09988d8e7b1dad8d3ab9a67017a5b03"}, - {file = "ruff-0.11.6-py3-none-musllinux_1_2_i686.whl", hash = "sha256:bd40de4115b2ec4850302f1a1d8067f42e70b4990b68838ccb9ccd9f110c5e8b"}, - {file = "ruff-0.11.6-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:77cda2dfbac1ab73aef5e514c4cbfc4ec1fbef4b84a44c736cc26f61b3814cd9"}, - {file = "ruff-0.11.6-py3-none-win32.whl", hash = "sha256:5151a871554be3036cd6e51d0ec6eef56334d74dfe1702de717a995ee3d5b287"}, - {file = "ruff-0.11.6-py3-none-win_amd64.whl", hash = "sha256:cce85721d09c51f3b782c331b0abd07e9d7d5f775840379c640606d3159cae0e"}, - {file = "ruff-0.11.6-py3-none-win_arm64.whl", hash = "sha256:3567ba0d07fb170b1b48d944715e3294b77f5b7679e8ba258199a250383ccb79"}, - {file = "ruff-0.11.6.tar.gz", hash = "sha256:bec8bcc3ac228a45ccc811e45f7eb61b950dbf4cf31a67fa89352574b01c7d79"}, + {file = "ruff-0.11.7-py3-none-linux_armv6l.whl", hash = "sha256:d29e909d9a8d02f928d72ab7837b5cbc450a5bdf578ab9ebee3263d0a525091c"}, + {file = "ruff-0.11.7-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:dd1fb86b168ae349fb01dd497d83537b2c5541fe0626e70c786427dd8363aaee"}, + {file = "ruff-0.11.7-py3-none-macosx_11_0_arm64.whl", hash = "sha256:d3d7d2e140a6fbbc09033bce65bd7ea29d6a0adeb90b8430262fbacd58c38ada"}, + {file = "ruff-0.11.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4809df77de390a1c2077d9b7945d82f44b95d19ceccf0c287c56e4dc9b91ca64"}, + {file = "ruff-0.11.7-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f3a0c2e169e6b545f8e2dba185eabbd9db4f08880032e75aa0e285a6d3f48201"}, + {file = "ruff-0.11.7-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:49b888200a320dd96a68e86736cf531d6afba03e4f6cf098401406a257fcf3d6"}, + {file = "ruff-0.11.7-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:2b19cdb9cf7dae00d5ee2e7c013540cdc3b31c4f281f1dacb5a799d610e90db4"}, + {file = "ruff-0.11.7-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:64e0ee994c9e326b43539d133a36a455dbaab477bc84fe7bfbd528abe2f05c1e"}, + {file = "ruff-0.11.7-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bad82052311479a5865f52c76ecee5d468a58ba44fb23ee15079f17dd4c8fd63"}, + {file = "ruff-0.11.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7940665e74e7b65d427b82bffc1e46710ec7f30d58b4b2d5016e3f0321436502"}, + {file = "ruff-0.11.7-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:169027e31c52c0e36c44ae9a9c7db35e505fee0b39f8d9fca7274a6305295a92"}, + {file = "ruff-0.11.7-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:305b93f9798aee582e91e34437810439acb28b5fc1fee6b8205c78c806845a94"}, + {file = "ruff-0.11.7-py3-none-musllinux_1_2_i686.whl", hash = "sha256:a681db041ef55550c371f9cd52a3cf17a0da4c75d6bd691092dfc38170ebc4b6"}, + {file = "ruff-0.11.7-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:07f1496ad00a4a139f4de220b0c97da6d4c85e0e4aa9b2624167b7d4d44fd6b6"}, + {file = "ruff-0.11.7-py3-none-win32.whl", hash = "sha256:f25dfb853ad217e6e5f1924ae8a5b3f6709051a13e9dad18690de6c8ff299e26"}, + {file = "ruff-0.11.7-py3-none-win_amd64.whl", hash = "sha256:0a931d85959ceb77e92aea4bbedfded0a31534ce191252721128f77e5ae1f98a"}, + {file = "ruff-0.11.7-py3-none-win_arm64.whl", hash = "sha256:778c1e5d6f9e91034142dfd06110534ca13220bfaad5c3735f6cb844654f6177"}, + {file = "ruff-0.11.7.tar.gz", hash = "sha256:655089ad3224070736dc32844fde783454f8558e71f501cb207485fe4eee23d4"}, ] [[package]] diff --git a/pyproject.toml b/pyproject.toml index b64ea0403..0fbab2797 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "GitHubKit" -version = "0.12.11" +version = "0.12.12" description = "GitHub SDK for Python" authors = ["yanyongyu "] license = "MIT" diff --git a/tests/test_rest/test_call.py b/tests/test_rest/test_call.py index 7eb4da1af..177240160 100644 --- a/tests/test_rest/test_call.py +++ b/tests/test_rest/test_call.py @@ -4,10 +4,19 @@ from githubkit import GitHub from githubkit.versions import LATEST_VERSION -from githubkit.versions.latest.models import FullRepository +from githubkit.versions.latest.models import FullRepository, Issue OWNER = "yanyongyu" REPO = "githubkit" +ISSUE_COUNT_QUERY = """ +query($owner: String!, $repo: String!) { + repository(owner: $owner, name: $repo) { + issues { + totalCount + } + } +} +""" def test_call(g: GitHub): @@ -56,34 +65,51 @@ async def test_async_call_with_raw_body(g: GitHub): def test_paginate(g: GitHub): paginator = g.rest.paginate( - g.rest.issues.list_for_repo, owner=OWNER, repo=REPO, per_page=50 + g.rest.issues.list_for_repo, owner=OWNER, repo=REPO, state="all", per_page=50 ) - for _ in paginator: - ... + count = 0 + for issue in paginator: + assert isinstance(issue, Issue) + if not issue.pull_request: + count += 1 + + result = g.graphql.request(ISSUE_COUNT_QUERY, {"owner": OWNER, "repo": REPO}) + assert result["repository"]["issues"]["totalCount"] == count def test_paginate_with_partial(g: GitHub): paginator = g.rest.paginate( - partial(g.rest.issues.list_for_repo, OWNER, REPO), per_page=50 + partial(g.rest.issues.list_for_repo, OWNER, REPO), state="all", per_page=50 ) - for _ in paginator: - ... + for issue in paginator: + assert isinstance(issue, Issue) @pytest.mark.anyio async def test_async_paginate(g: GitHub): paginator = g.rest.paginate( - g.rest.issues.async_list_for_repo, owner=OWNER, repo=REPO, per_page=50 + g.rest.issues.async_list_for_repo, + owner=OWNER, + repo=REPO, + state="all", + per_page=50, ) - async for _ in paginator: - ... + count = 0 + async for issue in paginator: + assert isinstance(issue, Issue) + if not issue.pull_request: + count += 1 + + result = g.graphql.request(ISSUE_COUNT_QUERY, {"owner": OWNER, "repo": REPO}) + assert result["repository"]["issues"]["totalCount"] == count @pytest.mark.anyio async def test_async_paginate_with_partial(g: GitHub): paginator = g.rest.paginate( partial(g.rest.issues.async_list_for_repo, OWNER, REPO), + state="all", per_page=50, ) - async for _ in paginator: - ... + async for issue in paginator: + assert isinstance(issue, Issue)