From 2843bab60c9d71d37bfd99be08f3de9e3c8aaf81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Thu, 9 May 2024 17:51:37 -0600 Subject: [PATCH] chore!: Make `PyJWT` and `cryptography` dependencies optional --- poetry.lock | 6 +++--- pyproject.toml | 11 ++++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index 5a970fc6f2..cf04528fe1 100644 --- a/poetry.lock +++ b/poetry.lock @@ -469,7 +469,7 @@ toml = ["tomli"] name = "cryptography" version = "42.0.8" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." -optional = false +optional = true python-versions = ">=3.7" files = [ {file = "cryptography-42.0.8-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:81d8a521705787afe7a18d5bfb47ea9d9cc068206270aad0b96a725022e18d2e"}, @@ -1528,7 +1528,7 @@ windows-terminal = ["colorama (>=0.4.6)"] name = "pyjwt" version = "2.8.0" description = "JSON Web Token implementation in Python" -optional = false +optional = true python-versions = ">=3.7" files = [ {file = "PyJWT-2.8.0-py3-none-any.whl", hash = "sha256:59127c392cc44c2da5bb3192169a91f429924e17aff6534d70fdc02ab3e04320"}, @@ -2666,7 +2666,7 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [extras] docs = ["furo", "myst-parser", "pytest", "sphinx", "sphinx-autobuild", "sphinx-copybutton", "sphinx-inline-tabs", "sphinx-notfound-page", "sphinx-reredirects"] faker = ["faker"] -jwt = [] +jwt = ["PyJWT", "cryptography"] parquet = ["numpy", "numpy", "pyarrow"] s3 = ["fs-s3fs"] testing = ["pytest", "pytest-durations"] diff --git a/pyproject.toml b/pyproject.toml index 95895ba5a1..de2db854bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,6 @@ python = ">=3.8" backoff = { version = ">=2.0.0", python = "<4" } backports-datetime-fromisoformat = { version = ">=2.0.1", python = "<3.11" } click = "~=8.0" -cryptography = ">=3.4.6" fs = ">=2.4.16" importlib-metadata = {version = "<9.0.0", python = "<3.12"} importlib-resources = {version = ">=5.12.0,!=6.2.0,!=6.3.0,!=6.3.1", python = "<3.9"} @@ -52,7 +51,6 @@ jsonpath-ng = ">=1.5.3" jsonschema = ">=4.16.0" packaging = ">=23.1" pendulum = ">=2.1.0,<4" -PyJWT = "~=2.4" python-dateutil = ">=2.8.2" python-dotenv = ">=0.20" PyYAML = ">=6.0" @@ -93,10 +91,17 @@ pytest-durations = {version = ">=1.2.0", optional = true} # installed as optional 'faker' extra faker = {version = ">=22.5,<27.0", optional = true} +# Crypto extras +cryptography = { version = ">=3.4.6", optional = true } +PyJWT = { version = "~=2.4", optional = true } + [tool.poetry.extras] # TODO: Add 'cryptography' and 'PyJWT' to the 'jwt' when we want to remove them # from the main dependencies -jwt = [] +jwt = [ + "cryptography", + "PyJWT", +] docs = [ "furo", "myst-parser",