From 26bd187552793c497cd777bf58c11a5525353f36 Mon Sep 17 00:00:00 2001 From: Snehil Kishore Date: Tue, 10 Nov 2026 13:34:13 +0530 Subject: [PATCH 1/5] chore: drop Python 3.9 support Python 3.9 has reached end of life. The minimum supported version is now 3.10, the ada-url constraint is a single entry, the CI matrix no longer includes 3.9, and the test runner returns to ubuntu-latest. --- .github/workflows/test.yml | 5 +- .ruff.toml | 2 +- README.md | 2 +- poetry.lock | 406 +------------------------------------ pyproject.toml | 7 +- requirements.txt | 3 +- 6 files changed, 11 insertions(+), 414 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 62f6fcf..7c53fbc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,11 +19,10 @@ concurrency: jobs: test: - # Pinned: ubuntu-latest is now 26.04, which has no Python 3.9 build in actions/python-versions - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest strategy: matrix: - python-version: [3.9, "3.10", "3.11", "3.12"] + python-version: ["3.10", "3.11", "3.12"] steps: - name: Checkout code diff --git a/.ruff.toml b/.ruff.toml index 6f69fd7..9b0d945 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -1,5 +1,5 @@ line-length = 100 -target-version = "py39" +target-version = "py310" [lint] select = [ diff --git a/README.md b/README.md index c949635..395cf4f 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ This library is part of Auth0's Python ecosystem for server-side authentication ### 1. Install the SDK -_This library requires Python 3.9.2+._ +_This library requires Python 3.10+._ ```shell pip install auth0-api-python diff --git a/poetry.lock b/poetry.lock index eef710d..a4433b7 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,70 +1,5 @@ # This file is automatically @generated by Poetry 2.4.1 and should not be changed by hand. -[[package]] -name = "ada-url" -version = "1.27.0" -description = "URL parser and manipulator based on the WHAT WG URL standard" -optional = false -python-versions = ">=3.9" -groups = ["main"] -markers = "python_version == \"3.9\"" -files = [ - {file = "ada_url-1.27.0-cp310-cp310-macosx_10_15_universal2.whl", hash = "sha256:00d4da718deb454c4a5a0dc4ebcb3a98c63162654027571a504cce36ff79da66"}, - {file = "ada_url-1.27.0-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:686e3d43bd2d6f8be2d812ddb3e165a0f449018d00a68ca7df5a9d41f89efb44"}, - {file = "ada_url-1.27.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8e29d0447ecaf78436e85373bfa2d8f4f048905d524db04938334f5378199c6e"}, - {file = "ada_url-1.27.0-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5912f8233e954e30a7f5f48c5878596ae55e94032d276a8cc19823f6161ebbcb"}, - {file = "ada_url-1.27.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7dc998289bf93593e874bf55b87a9e1292cdab9d1c958a1bfde3b842537bd90e"}, - {file = "ada_url-1.27.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:346c4eab915f52793545fb6b8243336782d8c3574763af475a2a62ae07a7918d"}, - {file = "ada_url-1.27.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:cfcdb6d07a7c956e688a86a1bc2f567a8c4e8b3c4519e5f80ab02af71a532e48"}, - {file = "ada_url-1.27.0-cp310-cp310-win_amd64.whl", hash = "sha256:b2dfb50e9123ba7db50cf1a7a0ab2187ecdac28c9b2f750b6187fd51960efef7"}, - {file = "ada_url-1.27.0-cp311-cp311-macosx_10_15_universal2.whl", hash = "sha256:39ca8a05f31e761fd021c3cf7df7d564132a6eb84fa4c75b83ea0f08a0fa0f52"}, - {file = "ada_url-1.27.0-cp311-cp311-macosx_10_15_x86_64.whl", hash = "sha256:9f661a184a98004707e00dbf6b9b3ca7c8dc4713e3b94135a44e980f096bddb6"}, - {file = "ada_url-1.27.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b98d96b25710688a9a3c665ac7539b0ae658fc64a31a74294f39f81516e3d530"}, - {file = "ada_url-1.27.0-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b4218ede320875efddc14bc4ea53d2cefa20a40852f98cafeafa3f0ca0edeea9"}, - {file = "ada_url-1.27.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4684f04f32a69f7fd00bd0f87dfb636dc7df91b3ff64efce90bb9488807adaef"}, - {file = "ada_url-1.27.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:74d080c6b65703828038d0bebb95e5a121e66a2602da7c45841126653ab410d6"}, - {file = "ada_url-1.27.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:27c143cc7e3bd70b0094252272b19ab9be468ff01e517ded1b7e1f35502e49b6"}, - {file = "ada_url-1.27.0-cp311-cp311-win_amd64.whl", hash = "sha256:9d0c025a6972f41a4a796df7011fe73028cf19ac1837ebbefbdbfc2061d5f437"}, - {file = "ada_url-1.27.0-cp312-cp312-macosx_10_15_universal2.whl", hash = "sha256:efe34acc78cdf02c3de1b115f0fda3e9a37d4a66cdf73f8795450ddee71e1b47"}, - {file = "ada_url-1.27.0-cp312-cp312-macosx_10_15_x86_64.whl", hash = "sha256:f2bbbdc57bff941486b6b51470487894dadc1132bf0c819dcc40b9bd064d36f8"}, - {file = "ada_url-1.27.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6ac44ab21c3aaad92f132a8ca51059dc75bb19d04ece9c3443ce6688ea628f35"}, - {file = "ada_url-1.27.0-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:05ed61f58493fedcc4a09546c4a1eb1281984a0d47e3269bffcbe8cf83134b29"}, - {file = "ada_url-1.27.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bb02764e5276b5c071b50ed37ff44a103fce0e6e0dea1de319a91e484e5a0297"}, - {file = "ada_url-1.27.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:360c1d24c36f9a16503a38ad0de8c58a85a54cca0bd8984a83085f27d34eb2b1"}, - {file = "ada_url-1.27.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c9f8a45aac4f78b3205b5b0b711c562449214ace540c40712cfe64d05772d4c5"}, - {file = "ada_url-1.27.0-cp312-cp312-win_amd64.whl", hash = "sha256:27bf83ed13519636e4b8c6281bab7039d444be9288276a8c6363d541fe1f8c20"}, - {file = "ada_url-1.27.0-cp313-cp313-macosx_10_15_universal2.whl", hash = "sha256:98be524a61c7d08cdaf9581a61978e280e2b8c2850bd8b475654678e57d179c5"}, - {file = "ada_url-1.27.0-cp313-cp313-macosx_10_15_x86_64.whl", hash = "sha256:22df977b491a039b8876f943c9ae42acd807e3f6f7df7d9513590866b166ffb1"}, - {file = "ada_url-1.27.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:3926ffdb607e48ce2785e5107a6b10e80fb3834b6891d7919ff519beab61cebe"}, - {file = "ada_url-1.27.0-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f523b7be5de0a1319a112e6ce45647e83785862052b2dfee65d163a99b73c094"}, - {file = "ada_url-1.27.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:69015f7e8a6240c55be0edb0c6fcf2235de1b8a8ea3c0db5c74030fd048af458"}, - {file = "ada_url-1.27.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:db575cbdd19a8f40f3e2a6424eea016335695303c1cf7eb1780f337728c9927d"}, - {file = "ada_url-1.27.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:c506654ea6426afbffae5102fa84b610a83e05ce9346b1dc6698b30634bf7999"}, - {file = "ada_url-1.27.0-cp313-cp313-win_amd64.whl", hash = "sha256:403ea8e54fec1464e381c59657215f0ebff82ccb31713056d0f1a37c4c72c6c1"}, - {file = "ada_url-1.27.0-cp39-cp39-macosx_10_15_universal2.whl", hash = "sha256:e05d310fa0449f491773865d278c054bb1b2872f820ac56c32af8196f3ca13e9"}, - {file = "ada_url-1.27.0-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:facb0c21a5ae49c7e3cde406935c1e3d8572d83ff8c18fca2e69f30da1e7f6e0"}, - {file = "ada_url-1.27.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c47a866e25473f547c7ad3503d24cad0fb61449589aefe3a7c8e71d9cc6dfdc1"}, - {file = "ada_url-1.27.0-cp39-cp39-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bf092f066615c0864b18f809ab7be89f7b3d5edbf282fad52923ef30e8b2f426"}, - {file = "ada_url-1.27.0-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:692ad41c562967949ef37ad404c052de2a648bd69cb631d853ed02381f7b4c3f"}, - {file = "ada_url-1.27.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:9cccc73048c5f58f2e92031d7064ead1d6c7e7edd5a2fedcafed3afdb839be90"}, - {file = "ada_url-1.27.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:9cd77c662483fc17b053983beb70f2456a5472921f81242edf5e6a2c1dc3003c"}, - {file = "ada_url-1.27.0-cp39-cp39-win_amd64.whl", hash = "sha256:c23e6dd12ed84cb08ba9b1c9d88cad206ac2334d3d9f1b76e5573ee7af4e32fb"}, - {file = "ada_url-1.27.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:c935c7706ba3700ac52be03750ebb439bdaf5a70dc33b83a12c7852ba2f3c372"}, - {file = "ada_url-1.27.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:483f7fc502a74a1d834e8ab851099e4fab4bcb8e00d805054422b8c5140f12ac"}, - {file = "ada_url-1.27.0-pp310-pypy310_pp73-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f0c85508be07fc36ab0dea9bc6aa60dc216ea4efc67f95a18fafeb5a3f34e5e2"}, - {file = "ada_url-1.27.0-pp310-pypy310_pp73-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:636caea7d17a4b43bd8c6ca3097ad8f10bb3d8f8ff663daee5975ca3992c1094"}, - {file = "ada_url-1.27.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:0c9d2f39aa3a827d15a68545f49c6095e73ac81bfc3d2a5371d77db2074c684b"}, - {file = "ada_url-1.27.0-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:6f537647694d9f61ca9e7bbe91fb04358315b3264910d88a9e9b81441281c512"}, - {file = "ada_url-1.27.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:34e301627a32db3f25575e432cb5f1cf5282ac30da529cb05751b64ea34f7d25"}, - {file = "ada_url-1.27.0-pp39-pypy39_pp73-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c8dff83c18bddb332c8fb74e3079768406e360fd9d21a831cbb35c1de5505226"}, - {file = "ada_url-1.27.0-pp39-pypy39_pp73-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:995036f5a1d2150ecbd8c6688ce4375136ffb5ae28a4d8f24580fe58c9df1046"}, - {file = "ada_url-1.27.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:1f0eb46b845fc874cb61f848c6b59cff7832d81fb97a963bf24a6524df23f7f6"}, - {file = "ada_url-1.27.0.tar.gz", hash = "sha256:f7adceb709e552aabbb680c1a0b4a856d76fdfca1922ca91236f84fc5c73ee7c"}, -] - -[package.dependencies] -cffi = "*" - [[package]] name = "ada-url" version = "1.32.0" @@ -72,7 +7,6 @@ description = "URL parser and manipulator based on the WHAT WG URL standard" optional = false python-versions = ">=3.10" groups = ["main"] -markers = "python_version >= \"3.10\"" files = [ {file = "ada_url-1.32.0-cp310-cp310-macosx_10_15_universal2.whl", hash = "sha256:c4aecd49bea562c28e7b2fe03257e88cee8f5af9f8a02c21f4deabeb341d1399"}, {file = "ada_url-1.32.0-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:3ad2c40dcf5ecf4f72ef2fb8c5edcecbaf5f1ea19418b416bd2c1785c35d7d32"}, @@ -120,27 +54,6 @@ files = [ [package.dependencies] cffi = "*" -[[package]] -name = "anyio" -version = "4.12.1" -description = "High-level concurrency and networking framework on top of asyncio or Trio" -optional = false -python-versions = ">=3.9" -groups = ["main", "dev"] -markers = "python_version == \"3.9\"" -files = [ - {file = "anyio-4.12.1-py3-none-any.whl", hash = "sha256:d405828884fc140aa80a3c667b8beed277f1dfedec42ba031bd6ac3db606ab6c"}, - {file = "anyio-4.12.1.tar.gz", hash = "sha256:41cfcc3a4c85d3f05c932da7c26d0201ac36f72abd4435ba90d0464a3ffed703"}, -] - -[package.dependencies] -exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} -idna = ">=2.8" -typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} - -[package.extras] -trio = ["trio (>=0.31.0) ; python_version < \"3.10\"", "trio (>=0.32.0) ; python_version >= \"3.10\""] - [[package]] name = "anyio" version = "4.14.2" @@ -148,7 +61,6 @@ description = "High-level concurrency and networking framework on top of asyncio optional = false python-versions = ">=3.10" groups = ["main", "dev"] -markers = "python_version >= \"3.10\"" files = [ {file = "anyio-4.14.2-py3-none-any.whl", hash = "sha256:9f505dda5ac9f0c8309b5e8bd445a8c2bf7246f3ce950121e45ea15bc41d1494"}, {file = "anyio-4.14.2.tar.gz", hash = "sha256:cfa139f3ed1a23ee8f88a145ddb5ac7605b8bbfd8592baacd7ce3d8bb4313c7f"}, @@ -162,22 +74,6 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.32.0)"] -[[package]] -name = "authlib" -version = "1.6.12" -description = "The ultimate Python library in building OAuth and OpenID Connect servers and clients." -optional = false -python-versions = ">=3.9" -groups = ["main"] -markers = "python_version == \"3.9\"" -files = [ - {file = "authlib-1.6.12-py2.py3-none-any.whl", hash = "sha256:e9229ad7fde610b139dd12f5edbe97eab9ee78bfb85691247e767727850b99ab"}, - {file = "authlib-1.6.12.tar.gz", hash = "sha256:0656d8482f28fc8221929d5f35b2bde5d13e10555ebc06b4561b0d622e83b1bd"}, -] - -[package.dependencies] -cryptography = "*" - [[package]] name = "authlib" version = "1.7.2" @@ -185,7 +81,6 @@ description = "The ultimate Python library in building OAuth and OpenID Connect optional = false python-versions = ">=3.10" groups = ["main"] -markers = "python_version >= \"3.10\"" files = [ {file = "authlib-1.7.2-py2.py3-none-any.whl", hash = "sha256:3e1faedc9d87e7d56a164eca3ccb6ace0d61b94abe83e92242f8dc8bba9b4a9f"}, {file = "authlib-1.7.2.tar.gz", hash = "sha256:2cea25fefcd4e7173bdf1372c0afc265c8034b23a8cd5dcb6a9164b826c64231"}, @@ -207,104 +102,6 @@ files = [ {file = "certifi-2026.10.23.tar.gz", hash = "sha256:a9895e6e2758b371e0545e321a3a8fd1fcfd9829ada8824a936dfb16aaaf36cd"}, ] -[[package]] -name = "cffi" -version = "2.0.0" -description = "Foreign Function Interface for Python calling C code." -optional = false -python-versions = ">=3.9" -groups = ["main"] -markers = "python_version == \"3.9\"" -files = [ - {file = "cffi-2.0.0-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:0cf2d91ecc3fcc0625c2c530fe004f82c110405f101548512cce44322fa8ac44"}, - {file = "cffi-2.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f73b96c41e3b2adedc34a7356e64c8eb96e03a3782b535e043a986276ce12a49"}, - {file = "cffi-2.0.0-cp310-cp310-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:53f77cbe57044e88bbd5ed26ac1d0514d2acf0591dd6bb02a3ae37f76811b80c"}, - {file = "cffi-2.0.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:3e837e369566884707ddaf85fc1744b47575005c0a229de3327f8f9a20f4efeb"}, - {file = "cffi-2.0.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:5eda85d6d1879e692d546a078b44251cdd08dd1cfb98dfb77b670c97cee49ea0"}, - {file = "cffi-2.0.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:9332088d75dc3241c702d852d4671613136d90fa6881da7d770a483fd05248b4"}, - {file = "cffi-2.0.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fc7de24befaeae77ba923797c7c87834c73648a05a4bde34b3b7e5588973a453"}, - {file = "cffi-2.0.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:cf364028c016c03078a23b503f02058f1814320a56ad535686f90565636a9495"}, - {file = "cffi-2.0.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e11e82b744887154b182fd3e7e8512418446501191994dbf9c9fc1f32cc8efd5"}, - {file = "cffi-2.0.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8ea985900c5c95ce9db1745f7933eeef5d314f0565b27625d9a10ec9881e1bfb"}, - {file = "cffi-2.0.0-cp310-cp310-win32.whl", hash = "sha256:1f72fb8906754ac8a2cc3f9f5aaa298070652a0ffae577e0ea9bd480dc3c931a"}, - {file = "cffi-2.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:b18a3ed7d5b3bd8d9ef7a8cb226502c6bf8308df1525e1cc676c3680e7176739"}, - {file = "cffi-2.0.0-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:b4c854ef3adc177950a8dfc81a86f5115d2abd545751a304c5bcf2c2c7283cfe"}, - {file = "cffi-2.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2de9a304e27f7596cd03d16f1b7c72219bd944e99cc52b84d0145aefb07cbd3c"}, - {file = "cffi-2.0.0-cp311-cp311-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:baf5215e0ab74c16e2dd324e8ec067ef59e41125d3eade2b863d294fd5035c92"}, - {file = "cffi-2.0.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:730cacb21e1bdff3ce90babf007d0a0917cc3e6492f336c2f0134101e0944f93"}, - {file = "cffi-2.0.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:6824f87845e3396029f3820c206e459ccc91760e8fa24422f8b0c3d1731cbec5"}, - {file = "cffi-2.0.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:9de40a7b0323d889cf8d23d1ef214f565ab154443c42737dfe52ff82cf857664"}, - {file = "cffi-2.0.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:8941aaadaf67246224cee8c3803777eed332a19d909b47e29c9842ef1e79ac26"}, - {file = "cffi-2.0.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:a05d0c237b3349096d3981b727493e22147f934b20f6f125a3eba8f994bec4a9"}, - {file = "cffi-2.0.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:94698a9c5f91f9d138526b48fe26a199609544591f859c870d477351dc7b2414"}, - {file = "cffi-2.0.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:5fed36fccc0612a53f1d4d9a816b50a36702c28a2aa880cb8a122b3466638743"}, - {file = "cffi-2.0.0-cp311-cp311-win32.whl", hash = "sha256:c649e3a33450ec82378822b3dad03cc228b8f5963c0c12fc3b1e0ab940f768a5"}, - {file = "cffi-2.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:66f011380d0e49ed280c789fbd08ff0d40968ee7b665575489afa95c98196ab5"}, - {file = "cffi-2.0.0-cp311-cp311-win_arm64.whl", hash = "sha256:c6638687455baf640e37344fe26d37c404db8b80d037c3d29f58fe8d1c3b194d"}, - {file = "cffi-2.0.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:6d02d6655b0e54f54c4ef0b94eb6be0607b70853c45ce98bd278dc7de718be5d"}, - {file = "cffi-2.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8eca2a813c1cb7ad4fb74d368c2ffbbb4789d377ee5bb8df98373c2cc0dee76c"}, - {file = "cffi-2.0.0-cp312-cp312-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:21d1152871b019407d8ac3985f6775c079416c282e431a4da6afe7aefd2bccbe"}, - {file = "cffi-2.0.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:b21e08af67b8a103c71a250401c78d5e0893beff75e28c53c98f4de42f774062"}, - {file = "cffi-2.0.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:1e3a615586f05fc4065a8b22b8152f0c1b00cdbc60596d187c2a74f9e3036e4e"}, - {file = "cffi-2.0.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:81afed14892743bbe14dacb9e36d9e0e504cd204e0b165062c488942b9718037"}, - {file = "cffi-2.0.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:3e17ed538242334bf70832644a32a7aae3d83b57567f9fd60a26257e992b79ba"}, - {file = "cffi-2.0.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3925dd22fa2b7699ed2617149842d2e6adde22b262fcbfada50e3d195e4b3a94"}, - {file = "cffi-2.0.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2c8f814d84194c9ea681642fd164267891702542f028a15fc97d4674b6206187"}, - {file = "cffi-2.0.0-cp312-cp312-win32.whl", hash = "sha256:da902562c3e9c550df360bfa53c035b2f241fed6d9aef119048073680ace4a18"}, - {file = "cffi-2.0.0-cp312-cp312-win_amd64.whl", hash = "sha256:da68248800ad6320861f129cd9c1bf96ca849a2771a59e0344e88681905916f5"}, - {file = "cffi-2.0.0-cp312-cp312-win_arm64.whl", hash = "sha256:4671d9dd5ec934cb9a73e7ee9676f9362aba54f7f34910956b84d727b0d73fb6"}, - {file = "cffi-2.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:00bdf7acc5f795150faa6957054fbbca2439db2f775ce831222b66f192f03beb"}, - {file = "cffi-2.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:45d5e886156860dc35862657e1494b9bae8dfa63bf56796f2fb56e1679fc0bca"}, - {file = "cffi-2.0.0-cp313-cp313-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:07b271772c100085dd28b74fa0cd81c8fb1a3ba18b21e03d7c27f3436a10606b"}, - {file = "cffi-2.0.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d48a880098c96020b02d5a1f7d9251308510ce8858940e6fa99ece33f610838b"}, - {file = "cffi-2.0.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:f93fd8e5c8c0a4aa1f424d6173f14a892044054871c771f8566e4008eaa359d2"}, - {file = "cffi-2.0.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:dd4f05f54a52fb558f1ba9f528228066954fee3ebe629fc1660d874d040ae5a3"}, - {file = "cffi-2.0.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c8d3b5532fc71b7a77c09192b4a5a200ea992702734a2e9279a37f2478236f26"}, - {file = "cffi-2.0.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:d9b29c1f0ae438d5ee9acb31cadee00a58c46cc9c0b2f9038c6b0b3470877a8c"}, - {file = "cffi-2.0.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6d50360be4546678fc1b79ffe7a66265e28667840010348dd69a314145807a1b"}, - {file = "cffi-2.0.0-cp313-cp313-win32.whl", hash = "sha256:74a03b9698e198d47562765773b4a8309919089150a0bb17d829ad7b44b60d27"}, - {file = "cffi-2.0.0-cp313-cp313-win_amd64.whl", hash = "sha256:19f705ada2530c1167abacb171925dd886168931e0a7b78f5bffcae5c6b5be75"}, - {file = "cffi-2.0.0-cp313-cp313-win_arm64.whl", hash = "sha256:256f80b80ca3853f90c21b23ee78cd008713787b1b1e93eae9f3d6a7134abd91"}, - {file = "cffi-2.0.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:fc33c5141b55ed366cfaad382df24fe7dcbc686de5be719b207bb248e3053dc5"}, - {file = "cffi-2.0.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c654de545946e0db659b3400168c9ad31b5d29593291482c43e3564effbcee13"}, - {file = "cffi-2.0.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:24b6f81f1983e6df8db3adc38562c83f7d4a0c36162885ec7f7b77c7dcbec97b"}, - {file = "cffi-2.0.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:12873ca6cb9b0f0d3a0da705d6086fe911591737a59f28b7936bdfed27c0d47c"}, - {file = "cffi-2.0.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:d9b97165e8aed9272a6bb17c01e3cc5871a594a446ebedc996e2397a1c1ea8ef"}, - {file = "cffi-2.0.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:afb8db5439b81cf9c9d0c80404b60c3cc9c3add93e114dcae767f1477cb53775"}, - {file = "cffi-2.0.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:737fe7d37e1a1bffe70bd5754ea763a62a066dc5913ca57e957824b72a85e205"}, - {file = "cffi-2.0.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:38100abb9d1b1435bc4cc340bb4489635dc2f0da7456590877030c9b3d40b0c1"}, - {file = "cffi-2.0.0-cp314-cp314-win32.whl", hash = "sha256:087067fa8953339c723661eda6b54bc98c5625757ea62e95eb4898ad5e776e9f"}, - {file = "cffi-2.0.0-cp314-cp314-win_amd64.whl", hash = "sha256:203a48d1fb583fc7d78a4c6655692963b860a417c0528492a6bc21f1aaefab25"}, - {file = "cffi-2.0.0-cp314-cp314-win_arm64.whl", hash = "sha256:dbd5c7a25a7cb98f5ca55d258b103a2054f859a46ae11aaf23134f9cc0d356ad"}, - {file = "cffi-2.0.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:9a67fc9e8eb39039280526379fb3a70023d77caec1852002b4da7e8b270c4dd9"}, - {file = "cffi-2.0.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:7a66c7204d8869299919db4d5069a82f1561581af12b11b3c9f48c584eb8743d"}, - {file = "cffi-2.0.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:7cc09976e8b56f8cebd752f7113ad07752461f48a58cbba644139015ac24954c"}, - {file = "cffi-2.0.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:92b68146a71df78564e4ef48af17551a5ddd142e5190cdf2c5624d0c3ff5b2e8"}, - {file = "cffi-2.0.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:b1e74d11748e7e98e2f426ab176d4ed720a64412b6a15054378afdb71e0f37dc"}, - {file = "cffi-2.0.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:28a3a209b96630bca57cce802da70c266eb08c6e97e5afd61a75611ee6c64592"}, - {file = "cffi-2.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:7553fb2090d71822f02c629afe6042c299edf91ba1bf94951165613553984512"}, - {file = "cffi-2.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6c6c373cfc5c83a975506110d17457138c8c63016b563cc9ed6e056a82f13ce4"}, - {file = "cffi-2.0.0-cp314-cp314t-win32.whl", hash = "sha256:1fc9ea04857caf665289b7a75923f2c6ed559b8298a1b8c49e59f7dd95c8481e"}, - {file = "cffi-2.0.0-cp314-cp314t-win_amd64.whl", hash = "sha256:d68b6cef7827e8641e8ef16f4494edda8b36104d79773a334beaa1e3521430f6"}, - {file = "cffi-2.0.0-cp314-cp314t-win_arm64.whl", hash = "sha256:0a1527a803f0a659de1af2e1fd700213caba79377e27e4693648c2923da066f9"}, - {file = "cffi-2.0.0-cp39-cp39-macosx_10_13_x86_64.whl", hash = "sha256:fe562eb1a64e67dd297ccc4f5addea2501664954f2692b69a76449ec7913ecbf"}, - {file = "cffi-2.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:de8dad4425a6ca6e4e5e297b27b5c824ecc7581910bf9aee86cb6835e6812aa7"}, - {file = "cffi-2.0.0-cp39-cp39-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:4647afc2f90d1ddd33441e5b0e85b16b12ddec4fca55f0d9671fef036ecca27c"}, - {file = "cffi-2.0.0-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:3f4d46d8b35698056ec29bca21546e1551a205058ae1a181d871e278b0b28165"}, - {file = "cffi-2.0.0-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:e6e73b9e02893c764e7e8d5bb5ce277f1a009cd5243f8228f75f842bf937c534"}, - {file = "cffi-2.0.0-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:cb527a79772e5ef98fb1d700678fe031e353e765d1ca2d409c92263c6d43e09f"}, - {file = "cffi-2.0.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:61d028e90346df14fedc3d1e5441df818d095f3b87d286825dfcbd6459b7ef63"}, - {file = "cffi-2.0.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:0f6084a0ea23d05d20c3edcda20c3d006f9b6f3fefeac38f59262e10cef47ee2"}, - {file = "cffi-2.0.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:1cd13c99ce269b3ed80b417dcd591415d3372bcac067009b6e0f59c7d4015e65"}, - {file = "cffi-2.0.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:89472c9762729b5ae1ad974b777416bfda4ac5642423fa93bd57a09204712322"}, - {file = "cffi-2.0.0-cp39-cp39-win32.whl", hash = "sha256:2081580ebb843f759b9f617314a24ed5738c51d2aee65d31e02f6f7a2b97707a"}, - {file = "cffi-2.0.0-cp39-cp39-win_amd64.whl", hash = "sha256:b882b3df248017dba09d6b16defe9b5c407fe32fc7c65a9c69798e6175601be9"}, - {file = "cffi-2.0.0.tar.gz", hash = "sha256:44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529"}, -] - -[package.dependencies] -pycparser = {version = "*", markers = "implementation_name != \"PyPy\""} - [[package]] name = "cffi" version = "2.1.0" @@ -312,7 +109,6 @@ description = "Foreign Function Interface for Python calling C code." optional = false python-versions = ">=3.10" groups = ["main"] -markers = "python_version >= \"3.10\"" files = [ {file = "cffi-2.1.0-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:b65f590ef2a44640f9a05dbb548a429b4ade77913ce683ac8b1480777658a6c0"}, {file = "cffi-2.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:164bff1657b2a74f0b6d54e11c9b375bc97b931f2ca9c43fcf875838da1570dd"}, @@ -535,127 +331,6 @@ files = [ {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] -[[package]] -name = "coverage" -version = "7.10.7" -description = "Code coverage measurement for Python" -optional = false -python-versions = ">=3.9" -groups = ["dev"] -markers = "python_version == \"3.9\"" -files = [ - {file = "coverage-7.10.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:fc04cc7a3db33664e0c2d10eb8990ff6b3536f6842c9590ae8da4c614b9ed05a"}, - {file = "coverage-7.10.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e201e015644e207139f7e2351980feb7040e6f4b2c2978892f3e3789d1c125e5"}, - {file = "coverage-7.10.7-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:240af60539987ced2c399809bd34f7c78e8abe0736af91c3d7d0e795df633d17"}, - {file = "coverage-7.10.7-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:8421e088bc051361b01c4b3a50fd39a4b9133079a2229978d9d30511fd05231b"}, - {file = "coverage-7.10.7-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6be8ed3039ae7f7ac5ce058c308484787c86e8437e72b30bf5e88b8ea10f3c87"}, - {file = "coverage-7.10.7-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e28299d9f2e889e6d51b1f043f58d5f997c373cc12e6403b90df95b8b047c13e"}, - {file = "coverage-7.10.7-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:c4e16bd7761c5e454f4efd36f345286d6f7c5fa111623c355691e2755cae3b9e"}, - {file = "coverage-7.10.7-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:b1c81d0e5e160651879755c9c675b974276f135558cf4ba79fee7b8413a515df"}, - {file = "coverage-7.10.7-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:606cc265adc9aaedcc84f1f064f0e8736bc45814f15a357e30fca7ecc01504e0"}, - {file = "coverage-7.10.7-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:10b24412692df990dbc34f8fb1b6b13d236ace9dfdd68df5b28c2e39cafbba13"}, - {file = "coverage-7.10.7-cp310-cp310-win32.whl", hash = "sha256:b51dcd060f18c19290d9b8a9dd1e0181538df2ce0717f562fff6cf74d9fc0b5b"}, - {file = "coverage-7.10.7-cp310-cp310-win_amd64.whl", hash = "sha256:3a622ac801b17198020f09af3eaf45666b344a0d69fc2a6ffe2ea83aeef1d807"}, - {file = "coverage-7.10.7-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a609f9c93113be646f44c2a0256d6ea375ad047005d7f57a5c15f614dc1b2f59"}, - {file = "coverage-7.10.7-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:65646bb0359386e07639c367a22cf9b5bf6304e8630b565d0626e2bdf329227a"}, - {file = "coverage-7.10.7-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:5f33166f0dfcce728191f520bd2692914ec70fac2713f6bf3ce59c3deacb4699"}, - {file = "coverage-7.10.7-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:35f5e3f9e455bb17831876048355dca0f758b6df22f49258cb5a91da23ef437d"}, - {file = "coverage-7.10.7-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4da86b6d62a496e908ac2898243920c7992499c1712ff7c2b6d837cc69d9467e"}, - {file = "coverage-7.10.7-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:6b8b09c1fad947c84bbbc95eca841350fad9cbfa5a2d7ca88ac9f8d836c92e23"}, - {file = "coverage-7.10.7-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4376538f36b533b46f8971d3a3e63464f2c7905c9800db97361c43a2b14792ab"}, - {file = "coverage-7.10.7-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:121da30abb574f6ce6ae09840dae322bef734480ceafe410117627aa54f76d82"}, - {file = "coverage-7.10.7-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:88127d40df529336a9836870436fc2751c339fbaed3a836d42c93f3e4bd1d0a2"}, - {file = "coverage-7.10.7-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ba58bbcd1b72f136080c0bccc2400d66cc6115f3f906c499013d065ac33a4b61"}, - {file = "coverage-7.10.7-cp311-cp311-win32.whl", hash = "sha256:972b9e3a4094b053a4e46832b4bc829fc8a8d347160eb39d03f1690316a99c14"}, - {file = "coverage-7.10.7-cp311-cp311-win_amd64.whl", hash = "sha256:a7b55a944a7f43892e28ad4bc0561dfd5f0d73e605d1aa5c3c976b52aea121d2"}, - {file = "coverage-7.10.7-cp311-cp311-win_arm64.whl", hash = "sha256:736f227fb490f03c6488f9b6d45855f8e0fd749c007f9303ad30efab0e73c05a"}, - {file = "coverage-7.10.7-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7bb3b9ddb87ef7725056572368040c32775036472d5a033679d1fa6c8dc08417"}, - {file = "coverage-7.10.7-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:18afb24843cbc175687225cab1138c95d262337f5473512010e46831aa0c2973"}, - {file = "coverage-7.10.7-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:399a0b6347bcd3822be369392932884b8216d0944049ae22925631a9b3d4ba4c"}, - {file = "coverage-7.10.7-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:314f2c326ded3f4b09be11bc282eb2fc861184bc95748ae67b360ac962770be7"}, - {file = "coverage-7.10.7-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c41e71c9cfb854789dee6fc51e46743a6d138b1803fab6cb860af43265b42ea6"}, - {file = "coverage-7.10.7-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc01f57ca26269c2c706e838f6422e2a8788e41b3e3c65e2f41148212e57cd59"}, - {file = "coverage-7.10.7-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a6442c59a8ac8b85812ce33bc4d05bde3fb22321fa8294e2a5b487c3505f611b"}, - {file = "coverage-7.10.7-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:78a384e49f46b80fb4c901d52d92abe098e78768ed829c673fbb53c498bef73a"}, - {file = "coverage-7.10.7-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:5e1e9802121405ede4b0133aa4340ad8186a1d2526de5b7c3eca519db7bb89fb"}, - {file = "coverage-7.10.7-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:d41213ea25a86f69efd1575073d34ea11aabe075604ddf3d148ecfec9e1e96a1"}, - {file = "coverage-7.10.7-cp312-cp312-win32.whl", hash = "sha256:77eb4c747061a6af8d0f7bdb31f1e108d172762ef579166ec84542f711d90256"}, - {file = "coverage-7.10.7-cp312-cp312-win_amd64.whl", hash = "sha256:f51328ffe987aecf6d09f3cd9d979face89a617eacdaea43e7b3080777f647ba"}, - {file = "coverage-7.10.7-cp312-cp312-win_arm64.whl", hash = "sha256:bda5e34f8a75721c96085903c6f2197dc398c20ffd98df33f866a9c8fd95f4bf"}, - {file = "coverage-7.10.7-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:981a651f543f2854abd3b5fcb3263aac581b18209be49863ba575de6edf4c14d"}, - {file = "coverage-7.10.7-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:73ab1601f84dc804f7812dc297e93cd99381162da39c47040a827d4e8dafe63b"}, - {file = "coverage-7.10.7-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:a8b6f03672aa6734e700bbcd65ff050fd19cddfec4b031cc8cf1c6967de5a68e"}, - {file = "coverage-7.10.7-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:10b6ba00ab1132a0ce4428ff68cf50a25efd6840a42cdf4239c9b99aad83be8b"}, - {file = "coverage-7.10.7-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c79124f70465a150e89340de5963f936ee97097d2ef76c869708c4248c63ca49"}, - {file = "coverage-7.10.7-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:69212fbccdbd5b0e39eac4067e20a4a5256609e209547d86f740d68ad4f04911"}, - {file = "coverage-7.10.7-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:7ea7c6c9d0d286d04ed3541747e6597cbe4971f22648b68248f7ddcd329207f0"}, - {file = "coverage-7.10.7-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:b9be91986841a75042b3e3243d0b3cb0b2434252b977baaf0cd56e960fe1e46f"}, - {file = "coverage-7.10.7-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:b281d5eca50189325cfe1f365fafade89b14b4a78d9b40b05ddd1fc7d2a10a9c"}, - {file = "coverage-7.10.7-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:99e4aa63097ab1118e75a848a28e40d68b08a5e19ce587891ab7fd04475e780f"}, - {file = "coverage-7.10.7-cp313-cp313-win32.whl", hash = "sha256:dc7c389dce432500273eaf48f410b37886be9208b2dd5710aaf7c57fd442c698"}, - {file = "coverage-7.10.7-cp313-cp313-win_amd64.whl", hash = "sha256:cac0fdca17b036af3881a9d2729a850b76553f3f716ccb0360ad4dbc06b3b843"}, - {file = "coverage-7.10.7-cp313-cp313-win_arm64.whl", hash = "sha256:4b6f236edf6e2f9ae8fcd1332da4e791c1b6ba0dc16a2dc94590ceccb482e546"}, - {file = "coverage-7.10.7-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:a0ec07fd264d0745ee396b666d47cef20875f4ff2375d7c4f58235886cc1ef0c"}, - {file = "coverage-7.10.7-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:dd5e856ebb7bfb7672b0086846db5afb4567a7b9714b8a0ebafd211ec7ce6a15"}, - {file = "coverage-7.10.7-cp313-cp313t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:f57b2a3c8353d3e04acf75b3fed57ba41f5c0646bbf1d10c7c282291c97936b4"}, - {file = "coverage-7.10.7-cp313-cp313t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:1ef2319dd15a0b009667301a3f84452a4dc6fddfd06b0c5c53ea472d3989fbf0"}, - {file = "coverage-7.10.7-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:83082a57783239717ceb0ad584de3c69cf581b2a95ed6bf81ea66034f00401c0"}, - {file = "coverage-7.10.7-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:50aa94fb1fb9a397eaa19c0d5ec15a5edd03a47bf1a3a6111a16b36e190cff65"}, - {file = "coverage-7.10.7-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:2120043f147bebb41c85b97ac45dd173595ff14f2a584f2963891cbcc3091541"}, - {file = "coverage-7.10.7-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:2fafd773231dd0378fdba66d339f84904a8e57a262f583530f4f156ab83863e6"}, - {file = "coverage-7.10.7-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:0b944ee8459f515f28b851728ad224fa2d068f1513ef6b7ff1efafeb2185f999"}, - {file = "coverage-7.10.7-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:4b583b97ab2e3efe1b3e75248a9b333bd3f8b0b1b8e5b45578e05e5850dfb2c2"}, - {file = "coverage-7.10.7-cp313-cp313t-win32.whl", hash = "sha256:2a78cd46550081a7909b3329e2266204d584866e8d97b898cd7fb5ac8d888b1a"}, - {file = "coverage-7.10.7-cp313-cp313t-win_amd64.whl", hash = "sha256:33a5e6396ab684cb43dc7befa386258acb2d7fae7f67330ebb85ba4ea27938eb"}, - {file = "coverage-7.10.7-cp313-cp313t-win_arm64.whl", hash = "sha256:86b0e7308289ddde73d863b7683f596d8d21c7d8664ce1dee061d0bcf3fbb4bb"}, - {file = "coverage-7.10.7-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:b06f260b16ead11643a5a9f955bd4b5fd76c1a4c6796aeade8520095b75de520"}, - {file = "coverage-7.10.7-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:212f8f2e0612778f09c55dd4872cb1f64a1f2b074393d139278ce902064d5b32"}, - {file = "coverage-7.10.7-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:3445258bcded7d4aa630ab8296dea4d3f15a255588dd535f980c193ab6b95f3f"}, - {file = "coverage-7.10.7-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:bb45474711ba385c46a0bfe696c695a929ae69ac636cda8f532be9e8c93d720a"}, - {file = "coverage-7.10.7-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:813922f35bd800dca9994c5971883cbc0d291128a5de6b167c7aa697fcf59360"}, - {file = "coverage-7.10.7-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:93c1b03552081b2a4423091d6fb3787265b8f86af404cff98d1b5342713bdd69"}, - {file = "coverage-7.10.7-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:cc87dd1b6eaf0b848eebb1c86469b9f72a1891cb42ac7adcfbce75eadb13dd14"}, - {file = "coverage-7.10.7-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:39508ffda4f343c35f3236fe8d1a6634a51f4581226a1262769d7f970e73bffe"}, - {file = "coverage-7.10.7-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:925a1edf3d810537c5a3abe78ec5530160c5f9a26b1f4270b40e62cc79304a1e"}, - {file = "coverage-7.10.7-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:2c8b9a0636f94c43cd3576811e05b89aa9bc2d0a85137affc544ae5cb0e4bfbd"}, - {file = "coverage-7.10.7-cp314-cp314-win32.whl", hash = "sha256:b7b8288eb7cdd268b0304632da8cb0bb93fadcfec2fe5712f7b9cc8f4d487be2"}, - {file = "coverage-7.10.7-cp314-cp314-win_amd64.whl", hash = "sha256:1ca6db7c8807fb9e755d0379ccc39017ce0a84dcd26d14b5a03b78563776f681"}, - {file = "coverage-7.10.7-cp314-cp314-win_arm64.whl", hash = "sha256:097c1591f5af4496226d5783d036bf6fd6cd0cbc132e071b33861de756efb880"}, - {file = "coverage-7.10.7-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:a62c6ef0d50e6de320c270ff91d9dd0a05e7250cac2a800b7784bae474506e63"}, - {file = "coverage-7.10.7-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:9fa6e4dd51fe15d8738708a973470f67a855ca50002294852e9571cdbd9433f2"}, - {file = "coverage-7.10.7-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:8fb190658865565c549b6b4706856d6a7b09302c797eb2cf8e7fe9dabb043f0d"}, - {file = "coverage-7.10.7-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:affef7c76a9ef259187ef31599a9260330e0335a3011732c4b9effa01e1cd6e0"}, - {file = "coverage-7.10.7-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6e16e07d85ca0cf8bafe5f5d23a0b850064e8e945d5677492b06bbe6f09cc699"}, - {file = "coverage-7.10.7-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:03ffc58aacdf65d2a82bbeb1ffe4d01ead4017a21bfd0454983b88ca73af94b9"}, - {file = "coverage-7.10.7-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:1b4fd784344d4e52647fd7857b2af5b3fbe6c239b0b5fa63e94eb67320770e0f"}, - {file = "coverage-7.10.7-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:0ebbaddb2c19b71912c6f2518e791aa8b9f054985a0769bdb3a53ebbc765c6a1"}, - {file = "coverage-7.10.7-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:a2d9a3b260cc1d1dbdb1c582e63ddcf5363426a1a68faa0f5da28d8ee3c722a0"}, - {file = "coverage-7.10.7-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:a3cc8638b2480865eaa3926d192e64ce6c51e3d29c849e09d5b4ad95efae5399"}, - {file = "coverage-7.10.7-cp314-cp314t-win32.whl", hash = "sha256:67f8c5cbcd3deb7a60b3345dffc89a961a484ed0af1f6f73de91705cc6e31235"}, - {file = "coverage-7.10.7-cp314-cp314t-win_amd64.whl", hash = "sha256:e1ed71194ef6dea7ed2d5cb5f7243d4bcd334bfb63e59878519be558078f848d"}, - {file = "coverage-7.10.7-cp314-cp314t-win_arm64.whl", hash = "sha256:7fe650342addd8524ca63d77b2362b02345e5f1a093266787d210c70a50b471a"}, - {file = "coverage-7.10.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:fff7b9c3f19957020cac546c70025331113d2e61537f6e2441bc7657913de7d3"}, - {file = "coverage-7.10.7-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:bc91b314cef27742da486d6839b677b3f2793dfe52b51bbbb7cf736d5c29281c"}, - {file = "coverage-7.10.7-cp39-cp39-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:567f5c155eda8df1d3d439d40a45a6a5f029b429b06648235f1e7e51b522b396"}, - {file = "coverage-7.10.7-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:2af88deffcc8a4d5974cf2d502251bc3b2db8461f0b66d80a449c33757aa9f40"}, - {file = "coverage-7.10.7-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c7315339eae3b24c2d2fa1ed7d7a38654cba34a13ef19fbcb9425da46d3dc594"}, - {file = "coverage-7.10.7-cp39-cp39-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:912e6ebc7a6e4adfdbb1aec371ad04c68854cd3bf3608b3514e7ff9062931d8a"}, - {file = "coverage-7.10.7-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:f49a05acd3dfe1ce9715b657e28d138578bc40126760efb962322c56e9ca344b"}, - {file = "coverage-7.10.7-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:cce2109b6219f22ece99db7644b9622f54a4e915dad65660ec435e89a3ea7cc3"}, - {file = "coverage-7.10.7-cp39-cp39-musllinux_1_2_riscv64.whl", hash = "sha256:f3c887f96407cea3916294046fc7dab611c2552beadbed4ea901cbc6a40cc7a0"}, - {file = "coverage-7.10.7-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:635adb9a4507c9fd2ed65f39693fa31c9a3ee3a8e6dc64df033e8fdf52a7003f"}, - {file = "coverage-7.10.7-cp39-cp39-win32.whl", hash = "sha256:5a02d5a850e2979b0a014c412573953995174743a3f7fa4ea5a6e9a3c5617431"}, - {file = "coverage-7.10.7-cp39-cp39-win_amd64.whl", hash = "sha256:c134869d5ffe34547d14e174c866fd8fe2254918cc0a95e99052903bc1543e07"}, - {file = "coverage-7.10.7-py3-none-any.whl", hash = "sha256:f7941f6f2fe6dd6807a1208737b8a0cbcf1cc6d7b07d24998ad2d63590868260"}, - {file = "coverage-7.10.7.tar.gz", hash = "sha256:f4ab143ab113be368a3e9b795f9cd7906c5ef407d6173fe9675a902e1fffc239"}, -] - -[package.dependencies] -tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""} - -[package.extras] -toml = ["tomli ; python_full_version <= \"3.11.0a6\""] - [[package]] name = "coverage" version = "7.15.3" @@ -663,7 +338,6 @@ description = "Code coverage measurement for Python" optional = false python-versions = ">=3.10" groups = ["dev"] -markers = "python_version >= \"3.10\"" files = [ {file = "coverage-7.15.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:3a82b2ceee91ba353e59fe2436d8a9eae799ff9825e5385423ea205d693e2949"}, {file = "coverage-7.15.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:3088cce65e54c2eefc08e7e1ca0b0acec1e95e8cf084ac848599103ed0367f74"}, @@ -847,7 +521,7 @@ description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" groups = ["main", "dev"] -markers = "python_version < \"3.11\"" +markers = "python_version == \"3.10\"" files = [ {file = "exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598"}, {file = "exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219"}, @@ -948,19 +622,6 @@ files = [ [package.extras] all = ["mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"] -[[package]] -name = "iniconfig" -version = "2.1.0" -description = "brain-dead simple config-ini parsing" -optional = false -python-versions = ">=3.8" -groups = ["dev"] -markers = "python_version == \"3.9\"" -files = [ - {file = "iniconfig-2.1.0-py3-none-any.whl", hash = "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760"}, - {file = "iniconfig-2.1.0.tar.gz", hash = "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7"}, -] - [[package]] name = "iniconfig" version = "2.3.0" @@ -968,7 +629,6 @@ description = "brain-dead simple config-ini parsing" optional = false python-versions = ">=3.10" groups = ["dev"] -markers = "python_version >= \"3.10\"" files = [ {file = "iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12"}, {file = "iniconfig-2.3.0.tar.gz", hash = "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730"}, @@ -981,7 +641,6 @@ description = "The ultimate Python library for JOSE RFCs, including JWS, JWE, JW optional = false python-versions = ">=3.10" groups = ["main"] -markers = "python_version >= \"3.10\"" files = [ {file = "joserfc-1.7.4-py3-none-any.whl", hash = "sha256:32d46c2cd5e3203c13e87a6c61333cab310b1ba80cd54b4c4f386a848a122463"}, {file = "joserfc-1.7.4.tar.gz", hash = "sha256:b3bc561672ae541b17a9237053b48a03dacddd92d68047b3ecdfb4b5714a88ed"}, @@ -1037,19 +696,6 @@ files = [ dev = ["pre-commit", "tox"] testing = ["coverage", "pytest", "pytest-benchmark"] -[[package]] -name = "pycparser" -version = "2.23" -description = "C parser in Python" -optional = false -python-versions = ">=3.8" -groups = ["main"] -markers = "python_version == \"3.9\" and implementation_name != \"PyPy\"" -files = [ - {file = "pycparser-2.23-py3-none-any.whl", hash = "sha256:e5c6e8d3fbad53479cab09ac03729e0a9faf2bee3db8208a550daf5af81a5934"}, - {file = "pycparser-2.23.tar.gz", hash = "sha256:78816d4f24add8f10a06d6f05b4d424ad9e96cfebf68a4ddc99c65c0720d00c2"}, -] - [[package]] name = "pycparser" version = "3.0" @@ -1057,7 +703,7 @@ description = "C parser in Python" optional = false python-versions = ">=3.10" groups = ["main"] -markers = "python_version >= \"3.10\" and implementation_name != \"PyPy\"" +markers = "implementation_name != \"PyPy\"" files = [ {file = "pycparser-3.0-py3-none-any.whl", hash = "sha256:b727414169a36b7d524c1c3e31839a521725078d7b2ff038656844266160a992"}, {file = "pycparser-3.0.tar.gz", hash = "sha256:600f49d217304a5902ac3c37e1281c9fe94e4d0489de643a9504c5cdfdfc6b29"}, @@ -1192,29 +838,6 @@ files = [ [package.dependencies] six = ">=1.5" -[[package]] -name = "requests" -version = "2.32.5" -description = "Python HTTP for Humans." -optional = false -python-versions = ">=3.9" -groups = ["main"] -markers = "python_version == \"3.9\"" -files = [ - {file = "requests-2.32.5-py3-none-any.whl", hash = "sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6"}, - {file = "requests-2.32.5.tar.gz", hash = "sha256:dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf"}, -] - -[package.dependencies] -certifi = ">=2017.4.17" -charset_normalizer = ">=2,<4" -idna = ">=2.5,<4" -urllib3 = ">=1.21.1,<3" - -[package.extras] -socks = ["PySocks (>=1.5.6,!=1.5.7)"] -use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] - [[package]] name = "requests" version = "2.34.2" @@ -1222,7 +845,6 @@ description = "Python HTTP for Humans." optional = false python-versions = ">=3.10" groups = ["main"] -markers = "python_version >= \"3.10\"" files = [ {file = "requests-2.34.2-py3-none-any.whl", hash = "sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0"}, {file = "requests-2.34.2.tar.gz", hash = "sha256:f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed"}, @@ -1349,25 +971,6 @@ files = [ ] markers = {dev = "python_version < \"3.13\""} -[[package]] -name = "urllib3" -version = "2.6.3" -description = "HTTP library with thread-safe connection pooling, file post, and more." -optional = false -python-versions = ">=3.9" -groups = ["main"] -markers = "python_version == \"3.9\"" -files = [ - {file = "urllib3-2.6.3-py3-none-any.whl", hash = "sha256:bf272323e553dfb2e87d9bfd225ca7b0f467b919d7bbd355436d3fd37cb0acd4"}, - {file = "urllib3-2.6.3.tar.gz", hash = "sha256:1b62b6884944a57dbe321509ab94fd4d3b307075e0c2eae991ac71ee15ad38ed"}, -] - -[package.extras] -brotli = ["brotli (>=1.2.0) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=1.2.0.0) ; platform_python_implementation != \"CPython\""] -h2 = ["h2 (>=4,<5)"] -socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] -zstd = ["backports-zstd (>=1.0.0) ; python_version < \"3.14\""] - [[package]] name = "urllib3" version = "2.7.0" @@ -1375,7 +978,6 @@ description = "HTTP library with thread-safe connection pooling, file post, and optional = false python-versions = ">=3.10" groups = ["main"] -markers = "python_version >= \"3.10\"" files = [ {file = "urllib3-2.7.0-py3-none-any.whl", hash = "sha256:9fb4c81ebbb1ce9531cce37674bbc6f1360472bc18ca9a553ede278ef7276897"}, {file = "urllib3-2.7.0.tar.gz", hash = "sha256:231e0ec3b63ceb14667c67be60f2f2c40a518cb38b03af60abc813da26505f4c"}, @@ -1389,5 +991,5 @@ zstd = ["backports-zstd (>=1.0.0) ; python_version < \"3.14\""] [metadata] lock-version = "2.1" -python-versions = ">=3.9.2" -content-hash = "f78b7a13854c1a3aedd7ae7d4c4d0685dbeb549a5d847abd08bb98561f043b9d" +python-versions = ">=3.10" +content-hash = "3ea39fc401b3b6e510999a32e398f2364de7ab125b624af015d1f8ee2b9a35b1" diff --git a/pyproject.toml b/pyproject.toml index 75b7fb8..d0da1bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,16 +11,13 @@ packages = [ ] [tool.poetry.dependencies] -python = ">=3.9.2" +python = ">=3.10" authlib = "^1.0" # For JWT/OIDC features requests = "^2.31.0" # If you use requests for HTTP calls (e.g., discovery) httpx = "^0.28.1" cryptography = ">=43.0.1" jwcrypto = "^1.5.7" -ada-url = [ - {version = "^1.30.0", python = ">=3.10"}, - {version = "^1.27.0", python = ">=3.9,<3.10"} -] +ada-url = "^1.30.0" [tool.poetry.group.dev.dependencies] pytest = "^8.0" diff --git a/requirements.txt b/requirements.txt index 19089c2..34efe28 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,8 +3,7 @@ authlib>=1.6.12 httpx>=0.28.1 -ada-url>=1.32.0; python_version >= "3.10" -ada-url>=1.27.0; python_version < "3.10" +ada-url>=1.32.0 pytest>=8.0 pytest-cov>=4.0 pytest-asyncio>=0.25.3 From cc65101efffa958514430ff43e9097b255841f80 Mon Sep 17 00:00:00 2001 From: Snehil Kishore Date: Tue, 10 Nov 2026 13:34:15 +0530 Subject: [PATCH 2/5] chore: modernize type annotations for Python 3.10 Apply the ruff pyupgrade fixes enabled by the py310 target, replacing Optional and Union with the X | Y syntax. --- src/auth0_api_python/_internal/cache_keys.py | 17 ++++--- src/auth0_api_python/_internal/obo_cache.py | 24 +++++----- .../_internal/token_vault_cache.py | 10 ++-- src/auth0_api_python/act.py | 4 +- src/auth0_api_python/api_client.py | 46 +++++++++---------- src/auth0_api_python/cache.py | 12 ++--- src/auth0_api_python/config.py | 17 +++---- src/auth0_api_python/telemetry.py | 3 +- src/auth0_api_python/token_store.py | 4 +- src/auth0_api_python/token_utils.py | 18 ++++---- src/auth0_api_python/types.py | 8 ++-- src/auth0_api_python/utils.py | 26 +++++------ tests/conftest.py | 21 ++++----- tests/test_token_store.py | 3 +- 14 files changed, 105 insertions(+), 108 deletions(-) diff --git a/src/auth0_api_python/_internal/cache_keys.py b/src/auth0_api_python/_internal/cache_keys.py index f998706..3512b7e 100644 --- a/src/auth0_api_python/_internal/cache_keys.py +++ b/src/auth0_api_python/_internal/cache_keys.py @@ -1,21 +1,20 @@ """Cache-key builders and scope helpers for the tokens the SDK mints.""" import hashlib -from typing import Optional from ..utils import get_unverified_payload _FIELD_SEPARATOR = "\x1f" -def _normalized_scopes(scope: Optional[str]) -> str: +def _normalized_scopes(scope: str | None) -> str: """Sort and dedupe scopes so equivalent scope strings produce the same cache key.""" if not scope: return "" return " ".join(sorted(set(scope.split()))) -def is_covered_by(requested: Optional[str], granted: Optional[str]) -> bool: +def is_covered_by(requested: str | None, granted: str | None) -> bool: """True when the requested scopes are all covered by the granted scopes.""" granted_set = set(_normalized_scopes(granted).split()) requested_set = set(_normalized_scopes(requested).split()) @@ -52,7 +51,7 @@ def _obo_identity_fields( exchange_tenant: str, exchange_client_id: str, audience: str, - org_id: Optional[str], + org_id: str | None, session_key: str, ) -> list[str]: """The fields every OBO cache key shares, namespaced by key kind. @@ -81,8 +80,8 @@ def obo_cache_key( exchange_tenant: str, exchange_client_id: str, audience: str, - org_id: Optional[str], - scopes: Optional[str], + org_id: str | None, + scopes: str | None, session_key: str, ) -> str: """Token cache key for an On Behalf Of exchange. @@ -112,7 +111,7 @@ def index_cache_key( exchange_tenant: str, exchange_client_id: str, audience: str, - org_id: Optional[str], + org_id: str | None, session_key: str, ) -> str: """Cache key for the OBO token index, scoped to caller, issuer, exchange, audience, org, and session. @@ -132,7 +131,7 @@ def index_cache_key( return sub + ":" + hashlib.sha256(_FIELD_SEPARATOR.join(fields).encode()).hexdigest() -def m2m_cache_key(*, tenant: str, client_id: str, audience: str, scopes: Optional[str]) -> str: +def m2m_cache_key(*, tenant: str, client_id: str, audience: str, scopes: str | None) -> str: """Cache key for a client-credentials (M2M) exchange, scoped to tenant, client, audience, and scopes.""" fields = _FIELD_SEPARATOR.join( ["m2m", tenant, client_id, audience, _normalized_scopes(scopes)] @@ -141,7 +140,7 @@ def m2m_cache_key(*, tenant: str, client_id: str, audience: str, scopes: Optiona def token_vault_cache_key( - *, sub: str, connection: str, tenant: str, client_id: str, login_hint: Optional[str] = None + *, sub: str, connection: str, tenant: str, client_id: str, login_hint: str | None = None ) -> str: """Cache key for a Token Vault exchange, scoped to tenant, client, caller, connection, and login hint.""" fields = _FIELD_SEPARATOR.join(["token_vault", tenant, client_id, sub, connection, login_hint or ""]) diff --git a/src/auth0_api_python/_internal/obo_cache.py b/src/auth0_api_python/_internal/obo_cache.py index be86f16..6d64033 100644 --- a/src/auth0_api_python/_internal/obo_cache.py +++ b/src/auth0_api_python/_internal/obo_cache.py @@ -2,7 +2,7 @@ import logging import time -from typing import NamedTuple, Optional, cast +from typing import NamedTuple, cast from ..token_store import ( AbstractTokenStore, @@ -29,7 +29,7 @@ class _OboIdentity(NamedTuple): sub: str issuer: str incoming_client_id: str - org_id: Optional[str] + org_id: str | None session_key: str @@ -54,7 +54,7 @@ def __init__( self._exchange_client_id = exchange_client_id self._mode = scope_matching - def identity(self, verified: VerifiedToken) -> Optional[_OboIdentity]: + def identity(self, verified: VerifiedToken) -> _OboIdentity | None: """Build the cache identity from verified claims, or None when they lack a usable subject.""" claims = verified.claims sub = claims.get("sub") @@ -77,8 +77,8 @@ def identity(self, verified: VerifiedToken) -> Optional[_OboIdentity]: ) async def lookup( - self, identity: _OboIdentity, audience: str, scope: Optional[str] - ) -> Optional[OnBehalfOfTokenResult]: + self, identity: _OboIdentity, audience: str, scope: str | None + ) -> OnBehalfOfTokenResult | None: """Return a reusable cached token for this request, or None on a miss.""" if self._mode == "non_strict": return await self._index_lookup(identity, audience, scope) @@ -88,7 +88,7 @@ async def write( self, identity: _OboIdentity, audience: str, - scope: Optional[str], + scope: str | None, obo_result: OnBehalfOfTokenResult, ) -> None: """Store a freshly exchanged token under its granted scopes.""" @@ -114,7 +114,7 @@ async def write( # ===== Private methods ===== - def _token_key(self, identity: _OboIdentity, audience: str, layout: str, scopes: Optional[str]) -> str: + def _token_key(self, identity: _OboIdentity, audience: str, layout: str, scopes: str | None) -> str: return obo_cache_key( layout=layout, sub=identity.sub, @@ -156,7 +156,7 @@ def _well_formed_member(member: object) -> bool: ) @staticmethod - def _usable_entry(cached: Optional[TokenSet], now: int) -> bool: + def _usable_entry(cached: TokenSet | None, now: int) -> bool: if cached is None: return False if "access_token" not in cached or "expires_at" not in cached: @@ -177,8 +177,8 @@ def _hit(cached: TokenSet, now: int) -> OnBehalfOfTokenResult: return result async def _strict_lookup( - self, identity: _OboIdentity, audience: str, scope: Optional[str] - ) -> Optional[OnBehalfOfTokenResult]: + self, identity: _OboIdentity, audience: str, scope: str | None + ) -> OnBehalfOfTokenResult | None: now = int(time.time()) try: cached = await self._store.get(self._token_key(identity, audience, "strict", scope)) @@ -193,8 +193,8 @@ async def _strict_lookup( return self._hit(cached, now) async def _index_lookup( - self, identity: _OboIdentity, audience: str, scope: Optional[str] - ) -> Optional[OnBehalfOfTokenResult]: + self, identity: _OboIdentity, audience: str, scope: str | None + ) -> OnBehalfOfTokenResult | None: # An unscoped request is covered by every cached token, so never reuse for one. requested_scopes = _normalized_scopes(scope) if not requested_scopes: diff --git a/src/auth0_api_python/_internal/token_vault_cache.py b/src/auth0_api_python/_internal/token_vault_cache.py index 5ee5e45..cd5cf5f 100644 --- a/src/auth0_api_python/_internal/token_vault_cache.py +++ b/src/auth0_api_python/_internal/token_vault_cache.py @@ -2,7 +2,7 @@ import logging import time -from typing import Any, Optional +from typing import Any from ..token_store import AbstractTokenStore, TokenSet from .cache_expiry import is_fresh @@ -22,8 +22,8 @@ def __init__(self, token_store: AbstractTokenStore) -> None: self._store = token_store def cache_key( - self, tenant: str, client_id: str, sub: Any, connection: str, login_hint: Optional[str] = None - ) -> Optional[str]: + self, tenant: str, client_id: str, sub: Any, connection: str, login_hint: str | None = None + ) -> str | None: """Return the cache key, or None when sub is not a usable string (cache skipped with a warning).""" if not isinstance(sub, str) or not sub: logger.warning("Access token has no usable sub claim, skipping Token Vault cache") @@ -32,9 +32,9 @@ def cache_key( sub=sub, connection=connection, tenant=tenant, client_id=client_id, login_hint=login_hint ) - async def lookup(self, key: str) -> Optional[dict]: + async def lookup(self, key: str) -> dict | None: """Return a live cached token or None. Miss cases: absent, malformed, expired.""" - cached: Optional[TokenSet] = None + cached: TokenSet | None = None try: cached = await self._store.get(key) except Exception as exc: diff --git a/src/auth0_api_python/act.py b/src/auth0_api_python/act.py index 9cf5621..a910a35 100644 --- a/src/auth0_api_python/act.py +++ b/src/auth0_api_python/act.py @@ -3,14 +3,14 @@ """ from collections.abc import Mapping -from typing import Any, Optional +from typing import Any from .errors import VerifyAccessTokenError INVALID_ACT_CLAIM_MESSAGE = "Invalid act claim" -def get_current_actor(claims: Mapping[str, Any]) -> Optional[str]: +def get_current_actor(claims: Mapping[str, Any]) -> str | None: """ Return the current actor from the outermost `act.sub`, if present. diff --git a/src/auth0_api_python/api_client.py b/src/auth0_api_python/api_client.py index f1711b2..bf5e10d 100644 --- a/src/auth0_api_python/api_client.py +++ b/src/auth0_api_python/api_client.py @@ -3,7 +3,7 @@ import math import time from collections.abc import Mapping, Sequence -from typing import Any, Optional, Union +from typing import Any import httpx from authlib.jose import JsonWebKey, JsonWebToken @@ -202,9 +202,9 @@ def is_dpop_required(self) -> bool: async def _resolve_allowed_domains( self, unverified_iss: str, - request_url: Optional[str] = None, - request_headers: Optional[dict] = None - ) -> Optional[list[str]]: + request_url: str | None = None, + request_headers: dict | None = None + ) -> list[str] | None: """ Resolve and validate allowed domains for the given issuer. @@ -289,8 +289,8 @@ async def _resolve_allowed_domains( async def verify_request( self, headers: dict[str, str], - http_method: Optional[str] = None, - http_url: Optional[str] = None + http_method: str | None = None, + http_url: str | None = None ) -> dict[str, Any]: """ Dispatch based on Authorization scheme: @@ -473,9 +473,9 @@ async def verify_request( async def verify_access_token( self, access_token: str, - request_url: Optional[str] = None, - request_headers: Optional[dict] = None, - required_claims: Optional[list[str]] = None + request_url: str | None = None, + request_headers: dict | None = None, + required_claims: list[str] | None = None ) -> dict[str, Any]: """ Asynchronously verifies the provided JWT access token. @@ -769,7 +769,7 @@ async def get_access_token_for_connection( self, options: dict[str, Any], *, - verified: Optional[VerifiedToken] = None, + verified: VerifiedToken | None = None, ) -> dict[str, Any]: """ Retrieves a token for a connection. @@ -927,10 +927,10 @@ async def get_token_by_exchange_profile( self, subject_token: str, subject_token_type: str, - audience: Optional[str] = None, - scope: Optional[str] = None, - requested_token_type: Optional[str] = None, - extra: Optional[Mapping[str, Union[str, Sequence[str]]]] = None + audience: str | None = None, + scope: str | None = None, + requested_token_type: str | None = None, + extra: Mapping[str, str | Sequence[str]] | None = None ) -> dict[str, Any]: """ Exchange a subject token for an Auth0 token using RFC 8693. @@ -1126,9 +1126,9 @@ async def get_token_on_behalf_of( self, access_token: str, audience: str, - scope: Optional[str] = None, + scope: str | None = None, *, - verified: Optional[VerifiedToken] = None, + verified: VerifiedToken | None = None, ) -> OnBehalfOfTokenResult: """ Exchange an Auth0 access token for another Auth0 access token targeting a downstream API @@ -1217,7 +1217,7 @@ async def get_token_on_behalf_of( async def get_client_credentials_token( self, audience: str, - scope: Optional[str] = None, + scope: str | None = None, ) -> ClientCredentialsTokenResult: """ Obtain a client credentials (M2M) access token for a server-to-server call. @@ -1378,7 +1378,7 @@ async def get_client_credentials_token( def _apply_extra( self, params: dict[str, Any], - extra: Mapping[str, Union[str, Sequence[str]]] + extra: Mapping[str, str | Sequence[str]] ) -> None: """ Apply extra parameters to the params dict with validation. @@ -1417,7 +1417,7 @@ def _apply_extra( else: params[key] = str(v) - async def _discover(self, issuer: Optional[str] = None) -> dict[str, Any]: + async def _discover(self, issuer: str | None = None) -> dict[str, Any]: """ Lazy-load OIDC discovery metadata. @@ -1516,7 +1516,7 @@ def _validate_claims_presence( raise InvalidDpopProofError(error_message) - def _prepare_error(self, error: BaseAuthError, auth_scheme: Optional[str] = None) -> BaseAuthError: + def _prepare_error(self, error: BaseAuthError, auth_scheme: str | None = None) -> BaseAuthError: """ Prepare an error with WWW-Authenticate headers based on error type and context. @@ -1553,9 +1553,9 @@ def _prepare_error(self, error: BaseAuthError, auth_scheme: Optional[str] = None def _build_www_authenticate( self, *, - error_code: Optional[str] = None, - error_description: Optional[str] = None, - auth_scheme: Optional[str] = None + error_code: str | None = None, + error_description: str | None = None, + auth_scheme: str | None = None ) -> list[tuple[str, str]]: """ Returns one or two ('WWW-Authenticate', ...) tuples based on context. diff --git a/src/auth0_api_python/cache.py b/src/auth0_api_python/cache.py index 231cdf0..5c4939f 100644 --- a/src/auth0_api_python/cache.py +++ b/src/auth0_api_python/cache.py @@ -1,6 +1,6 @@ import time from abc import ABC, abstractmethod -from typing import Any, Optional +from typing import Any class CacheAdapter(ABC): @@ -30,7 +30,7 @@ def clear(self) -> None: """ @abstractmethod - def get(self, key: str) -> Optional[Any]: + def get(self, key: str) -> Any | None: """ Get value from cache by key. @@ -43,7 +43,7 @@ def get(self, key: str) -> Optional[Any]: pass @abstractmethod - def set(self, key: str, value: Any, ttl_seconds: Optional[int] = None) -> None: + def set(self, key: str, value: Any, ttl_seconds: int | None = None) -> None: """ Set value in cache with optional TTL. @@ -100,10 +100,10 @@ def __init__(self, max_entries: int = 100): Args: max_entries: Maximum number of cache entries (default: 100) """ - self._cache: dict[str, tuple[Any, Optional[float]]] = {} + self._cache: dict[str, tuple[Any, float | None]] = {} self._max_entries = max_entries - def get(self, key: str) -> Optional[Any]: + def get(self, key: str) -> Any | None: """ Get value from cache by key. @@ -129,7 +129,7 @@ def get(self, key: str) -> Optional[Any]: return value - def set(self, key: str, value: Any, ttl_seconds: Optional[int] = None) -> None: + def set(self, key: str, value: Any, ttl_seconds: int | None = None) -> None: """ Set value in cache with optional TTL. diff --git a/src/auth0_api_python/config.py b/src/auth0_api_python/config.py index e450e70..31da638 100644 --- a/src/auth0_api_python/config.py +++ b/src/auth0_api_python/config.py @@ -2,7 +2,8 @@ Configuration classes and utilities for auth0-api-python. """ -from typing import TYPE_CHECKING, Callable, Literal, Optional, Union +from collections.abc import Callable +from typing import TYPE_CHECKING, Literal, Optional if TYPE_CHECKING: from .cache import CacheAdapter @@ -51,10 +52,10 @@ class ApiClientOptions: """ def __init__( self, - domain: Optional[str] = None, + domain: str | None = None, audience: str = "", - domains: Optional[Union[list[str], Callable[[dict], list[str]]]] = None, - custom_fetch: Optional[Callable[..., object]] = None, + domains: list[str] | Callable[[dict], list[str]] | None = None, + custom_fetch: Callable[..., object] | None = None, cache_adapter: Optional["CacheAdapter"] = None, token_store: Optional["AbstractTokenStore"] = None, cache_ttl_seconds: int = 600, @@ -63,13 +64,13 @@ def __init__( dpop_required: bool = False, dpop_iat_leeway: int = 30, dpop_iat_offset: int = 300, - client_id: Optional[str] = None, - client_secret: Optional[str] = None, + client_id: str | None = None, + client_secret: str | None = None, timeout: float = 10.0, organization_policy: Literal["required", "allow"] = "allow", - organization_id: Optional[Union[str, list[str]]] = None, + organization_id: str | list[str] | None = None, scope_matching: str = "strict", - client_info: Optional[dict] = None, + client_info: dict | None = None, ): self.domain = domain self.domains = domains diff --git a/src/auth0_api_python/telemetry.py b/src/auth0_api_python/telemetry.py index b862612..c35856f 100644 --- a/src/auth0_api_python/telemetry.py +++ b/src/auth0_api_python/telemetry.py @@ -6,7 +6,6 @@ import importlib.metadata import json import platform -from typing import Optional _PACKAGE_NAME = "auth0-api-python" @@ -36,7 +35,7 @@ def validate_client_info(client_info: dict) -> None: raise ValueError("client_info['env'] must be a dict of string keys and string values") -def build_telemetry_headers(client_info: Optional[dict] = None) -> dict[str, str]: +def build_telemetry_headers(client_info: dict | None = None) -> dict[str, str]: """ Build the Auth0-Client and User-Agent headers. diff --git a/src/auth0_api_python/token_store.py b/src/auth0_api_python/token_store.py index 7083884..a69482a 100644 --- a/src/auth0_api_python/token_store.py +++ b/src/auth0_api_python/token_store.py @@ -3,7 +3,7 @@ from abc import ABC, abstractmethod from collections.abc import Mapping from dataclasses import dataclass -from typing import Any, Optional, TypedDict +from typing import Any, TypedDict from .encryption import decrypt, encrypt from .errors import ConfigurationError @@ -47,7 +47,7 @@ def __init__(self, *, secret: str) -> None: self._secret = secret @abstractmethod - async def get(self, key: str) -> Optional[TokenSet]: + async def get(self, key: str) -> TokenSet | None: """Return the stored token or None if absent.""" pass diff --git a/src/auth0_api_python/token_utils.py b/src/auth0_api_python/token_utils.py index c234681..515cc8c 100644 --- a/src/auth0_api_python/token_utils.py +++ b/src/auth0_api_python/token_utils.py @@ -1,6 +1,6 @@ import time import uuid -from typing import Any, Optional, Union +from typing import Any from authlib.jose import JsonWebKey, jwt @@ -27,11 +27,11 @@ async def generate_token( domain: str, user_id: str, - audience: Optional[str] = None, - issuer: Union[str, bool, None] = None, + audience: str | None = None, + issuer: str | bool | None = None, iat: bool = True, exp: bool = True, - claims: Optional[dict[str, Any]] = None, + claims: dict[str, Any] | None = None, expiration_time: int = 3600, ) -> str: """ @@ -102,11 +102,11 @@ async def generate_dpop_proof( access_token: str, http_method: str, http_url: str, - jti: Optional[str] = None, + jti: str | None = None, iat: bool = True, - claims: Optional[dict[str, Any]] = None, - header_overrides: Optional[dict[str, Any]] = None, - iat_time: Optional[int] = None, + claims: dict[str, Any] | None = None, + header_overrides: dict[str, Any] | None = None, + iat_time: int | None = None, include_jti: bool = True ) -> str: """ @@ -176,7 +176,7 @@ async def generate_token_with_cnf( domain: str, user_id: str, audience: str, - jkt_thumbprint: Optional[str] = None, + jkt_thumbprint: str | None = None, **kwargs ) -> str: """ diff --git a/src/auth0_api_python/types.py b/src/auth0_api_python/types.py index e94c044..eb7fd10 100644 --- a/src/auth0_api_python/types.py +++ b/src/auth0_api_python/types.py @@ -3,7 +3,7 @@ """ from collections.abc import Awaitable, Callable -from typing import Optional, TypedDict, Union +from typing import TypedDict class ActClaim(TypedDict, total=False): @@ -28,8 +28,8 @@ class DomainsResolverContext(TypedDict, total=False): request_headers: Request headers dict (e.g., Host, X-Forwarded-Host) (optional) unverified_iss: The issuer claim from the unverified token """ - request_url: Optional[str] - request_headers: Optional[dict] + request_url: str | None + request_headers: dict | None unverified_iss: str @@ -74,7 +74,7 @@ class ClientCredentialsTokenResult(TypedDict, total=False): DomainsResolver = Callable[ - [DomainsResolverContext], Union[list[str], Awaitable[list[str]]] + [DomainsResolverContext], list[str] | Awaitable[list[str]] ] """ Type alias for domains resolver function. diff --git a/src/auth0_api_python/utils.py b/src/auth0_api_python/utils.py index a3c63e0..7b6394b 100644 --- a/src/auth0_api_python/utils.py +++ b/src/auth0_api_python/utils.py @@ -8,14 +8,14 @@ import hashlib import json import re -from collections.abc import Mapping -from typing import Any, Callable, Optional, Union +from collections.abc import Callable, Mapping +from typing import Any import httpx from ada_url import URL -def parse_cache_control_max_age(headers: Mapping[str, str]) -> Optional[int]: +def parse_cache_control_max_age(headers: Mapping[str, str]) -> int | None: """ Parse the max-age directive from a Cache-Control HTTP header. @@ -104,9 +104,9 @@ def is_auth_server_outage(error: Exception) -> bool: async def fetch_oidc_metadata( domain: str, - custom_fetch: Optional[Callable[..., Any]] = None, - headers: Optional[dict[str, str]] = None -) -> tuple[dict[str, Any], Optional[int]]: + custom_fetch: Callable[..., Any] | None = None, + headers: dict[str, str] | None = None +) -> tuple[dict[str, Any], int | None]: """ Asynchronously fetch the OIDC config from https://{domain}/.well-known/openid-configuration. @@ -137,9 +137,9 @@ async def fetch_oidc_metadata( async def fetch_jwks( jwks_uri: str, - custom_fetch: Optional[Callable[..., Any]] = None, - headers: Optional[dict[str, str]] = None -) -> tuple[dict[str, Any], Optional[int]]: + custom_fetch: Callable[..., Any] | None = None, + headers: dict[str, str] | None = None +) -> tuple[dict[str, Any], int | None]: """ Asynchronously fetch the JSON Web Key Set from jwks_uri. @@ -167,7 +167,7 @@ async def fetch_jwks( return resp.json(), max_age -def _decode_jwt_segment(token: Union[str, bytes], segment_index: int) -> dict: +def _decode_jwt_segment(token: str | bytes, segment_index: int) -> dict: """ Decode a specific segment from a JWT without verifying signature. @@ -202,7 +202,7 @@ def _decode_jwt_segment(token: Union[str, bytes], segment_index: int) -> dict: return segment -def get_unverified_header(token: Union[str, bytes]) -> dict: +def get_unverified_header(token: str | bytes) -> dict: """ Parse the JWT header without verifying signature. @@ -218,7 +218,7 @@ def get_unverified_header(token: Union[str, bytes]) -> dict: return _decode_jwt_segment(token, 0) -def get_unverified_payload(token: Union[str, bytes]) -> dict: +def get_unverified_payload(token: str | bytes) -> dict: """ Parse the JWT payload without verifying signature. @@ -279,7 +279,7 @@ def normalize_url_for_htu(raw_url: str) -> str: except Exception as e: raise ValueError(f"Invalid URL format: {raw_url}") from e -def sha256_base64url(input_str: Union[str, bytes]) -> str: +def sha256_base64url(input_str: str | bytes) -> str: """ Compute SHA-256 digest of the input string and return a Base64URL-encoded string *without* padding. diff --git a/tests/conftest.py b/tests/conftest.py index d872400..628ccf6 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -4,7 +4,6 @@ import json import time import urllib.parse -from typing import Optional import pytest from pytest_httpx import HTTPXMock @@ -26,7 +25,7 @@ def __init__(self, *, secret: str = "test-secret-0123456789abcdef-0123456789") - super().__init__(secret=secret) self._store: dict[str, TokenSet] = {} - async def get(self, key: str) -> Optional[TokenSet]: + async def get(self, key: str) -> TokenSet | None: entry = self._store.get(key) if entry is None: return None @@ -114,14 +113,14 @@ def last_form(httpx_mock: HTTPXMock) -> dict[str, list[str]]: return urllib.parse.parse_qs(req.content.decode()) -def last_auth_header(httpx_mock: HTTPXMock) -> Optional[str]: +def last_auth_header(httpx_mock: HTTPXMock) -> str | None: """Get the Authorization header from the last request.""" return httpx_mock.get_requests()[-1].headers.get("authorization") def mock_token_response( httpx_mock: HTTPXMock, - token_json: Optional[dict] = None, + token_json: dict | None = None, status: int = 200, content_type: str = "application/json" ): @@ -183,9 +182,9 @@ def token_success(**overrides) -> dict: def assert_api_error( exc: Exception, *, - code: Optional[str] = None, - status: Optional[int] = None, - contains: Optional[str] = None + code: str | None = None, + status: int | None = None, + contains: str | None = None ): """ Assert that an exception is an ApiError with expected properties. @@ -232,10 +231,10 @@ def assert_telemetry_headers(request, name: str = "auth0-api-python"): def assert_form_post( httpx_mock: HTTPXMock, *, - expect_fields: Optional[dict[str, list[str]]] = None, - forbid_fields: Optional[list[str]] = None, - expect_basic_auth: Optional[tuple[str, str]] = None, - expect_url: Optional[str] = None + expect_fields: dict[str, list[str]] | None = None, + forbid_fields: list[str] | None = None, + expect_basic_auth: tuple[str, str] | None = None, + expect_url: str | None = None ): """ Assert properties of the last form POST request. diff --git a/tests/test_token_store.py b/tests/test_token_store.py index 73a0ec8..ad87332 100644 --- a/tests/test_token_store.py +++ b/tests/test_token_store.py @@ -2,7 +2,6 @@ import hashlib import json import time -from typing import Optional import pytest @@ -31,7 +30,7 @@ def __init__(self, *, secret: str = "test-secret-0123456789abcdef-0123456789") - super().__init__(secret=secret) self._store: dict[str, str] = {} - async def get(self, key: str) -> Optional[TokenSet]: + async def get(self, key: str) -> TokenSet | None: raw = self._store.get(key) if raw is None: return None From 54aaa5da7eddac65e2cd7e35e27ba028ef578737 Mon Sep 17 00:00:00 2001 From: Snehil Kishore Date: Tue, 10 Nov 2026 13:45:06 +0530 Subject: [PATCH 3/5] chore: add Python 3.13 and 3.14 to the test matrix --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7c53fbc..57a6368 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.10", "3.11", "3.12"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - name: Checkout code From e8c3aed7479d3395c26a95408a32b688bd9132b3 Mon Sep 17 00:00:00 2001 From: Snehil Kishore Date: Tue, 10 Nov 2026 18:03:53 +0530 Subject: [PATCH 4/5] docs: use X | None in cache and token store examples --- docs/Caching.md | 10 +++++----- docs/TokenStorage.md | 3 +-- src/auth0_api_python/cache.py | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/docs/Caching.md b/docs/Caching.md index 9123069..38a0cca 100644 --- a/docs/Caching.md +++ b/docs/Caching.md @@ -35,18 +35,18 @@ For distributed deployments (multiple servers, containers), use a shared cache b ```python import json -from typing import Any, Optional +from typing import Any from auth0_api_python import ApiClient, ApiClientOptions, CacheAdapter class RedisCache(CacheAdapter): def __init__(self, redis_client): self.redis = redis_client - def get(self, key: str) -> Optional[Any]: + def get(self, key: str) -> Any | None: value = self.redis.get(key) return json.loads(value) if value else None - def set(self, key: str, value: Any, ttl_seconds: Optional[int] = None) -> None: + def set(self, key: str, value: Any, ttl_seconds: int | None = None) -> None: serialized = json.dumps(value) if ttl_seconds: self.redis.set(key, serialized, ex=ttl_seconds) @@ -97,8 +97,8 @@ When the cache is full, the least recently used entry is evicted. A cache miss t | Method | Signature | Description | |---|---|---| -| `get` | `(key: str) -> Optional[Any]` | Return cached value or `None` if not found / expired | -| `set` | `(key: str, value: Any, ttl_seconds: Optional[int]) -> None` | Store value with optional TTL | +| `get` | `(key: str) -> Any | None` | Return cached value or `None` if not found / expired | +| `set` | `(key: str, value: Any, ttl_seconds: int | None) -> None` | Store value with optional TTL | | `delete` | `(key: str) -> None` | Remove a single entry | | `clear` | `() -> None` | Remove all entries | diff --git a/docs/TokenStorage.md b/docs/TokenStorage.md index 736cb67..5651849 100644 --- a/docs/TokenStorage.md +++ b/docs/TokenStorage.md @@ -72,7 +72,6 @@ and `delete`. The base class requires a `secret` at construction and provides `e ```python import time -from typing import Optional import redis.asyncio as redis @@ -84,7 +83,7 @@ class RedisTokenStore(AbstractTokenStore): super().__init__(secret=secret) self.redis = redis_client - async def get(self, key: str) -> Optional[TokenSet]: + async def get(self, key: str) -> TokenSet | None: raw = await self.redis.get(key) if raw is None: return None diff --git a/src/auth0_api_python/cache.py b/src/auth0_api_python/cache.py index 5c4939f..ef7449f 100644 --- a/src/auth0_api_python/cache.py +++ b/src/auth0_api_python/cache.py @@ -15,11 +15,11 @@ class RedisCache(CacheAdapter): def __init__(self, redis_client): self.redis = redis_client - def get(self, key: str) -> Optional[Any]: + def get(self, key: str) -> Any | None: value = self.redis.get(key) return json.loads(value) if value else None - def set(self, key: str, value: Any, ttl_seconds: Optional[int] = None) -> None: + def set(self, key: str, value: Any, ttl_seconds: int | None = None) -> None: self.redis.set(key, json.dumps(value), ex=ttl_seconds) def delete(self, key: str) -> None: From e270a76b4236f7437a4e90aa60605f8d10d879bf Mon Sep 17 00:00:00 2001 From: Snehil Kishore Date: Tue, 10 Nov 2026 19:49:02 +0530 Subject: [PATCH 5/5] docs: escape union pipes in the CacheAdapter table --- docs/Caching.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Caching.md b/docs/Caching.md index 38a0cca..0ab69ef 100644 --- a/docs/Caching.md +++ b/docs/Caching.md @@ -97,8 +97,8 @@ When the cache is full, the least recently used entry is evicted. A cache miss t | Method | Signature | Description | |---|---|---| -| `get` | `(key: str) -> Any | None` | Return cached value or `None` if not found / expired | -| `set` | `(key: str, value: Any, ttl_seconds: int | None) -> None` | Store value with optional TTL | +| `get` | `(key: str) -> Any \| None` | Return cached value or `None` if not found / expired | +| `set` | `(key: str, value: Any, ttl_seconds: int \| None) -> None` | Store value with optional TTL | | `delete` | `(key: str) -> None` | Remove a single entry | | `clear` | `() -> None` | Remove all entries |