Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
run: "python -c 'import jwt; print(jwt.__version__)'"

- name: "Install in dev mode"
run: "python -m pip install -e .[dev]"
run: "python -m pip install -e . --group dev"

- name: "Import package in dev mode"
run: "python -c 'import jwt; print(jwt.__version__)'"
12 changes: 4 additions & 8 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,10 @@ build:
os: "ubuntu-lts-latest"
tools:
python: "3.11"

python:
install:
- method: "pip"
path: "."
extra_requirements:
- "docs"
- "crypto"
jobs:
install:
- "pip install --upgrade pip"
- "pip install .[crypto] --group 'docs'"

sphinx:
configuration: "docs/conf.py"
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ This project adheres to `Semantic Versioning <https://semver.org/>`__.
`Unreleased <https://github.com/jpadilla/pyjwt/compare/2.12.1...HEAD>`__
------------------------------------------------------------------------

Changed
~~~~~~~

- Migrate the ``dev``, ``docs``, and ``tests`` package extras to dependency groups by @kurtmckee in `#1152 <https://github.com/jpadilla/pyjwt/pull/1152>`__

`v2.12.1 <https://github.com/jpadilla/pyjwt/compare/2.12.0...2.12.1>`__
------------------------------------------------------------------------

Expand Down
38 changes: 20 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,26 @@ requires = [
"setuptools>=77.0.3",
]

[dependency-groups]
dev = [
"coverage[toml]==7.10.7",
"cryptography>=3.4.0",
"pre-commit",
"pytest>=8.4.2,<9.0.0",
"sphinx",
"sphinx-rtd-theme",
"zope.interface",
]
docs = [
"sphinx",
"sphinx-rtd-theme",
"zope.interface",
]
tests = [
"coverage[toml]==7.10.7",
"pytest>=8.4.2,<9.0.0",
]

[project]
authors = [
{ email = "hello@jpadilla.com", name = "Jose Padilla" },
Expand Down Expand Up @@ -46,24 +66,6 @@ requires-python = ">=3.9"
crypto = [
"cryptography>=3.4.0",
]
dev = [
"coverage[toml]==7.10.7",
"cryptography>=3.4.0",
"pre-commit",
"pytest>=8.4.2,<9.0.0",
"sphinx",
"sphinx-rtd-theme",
"zope.interface",
]
docs = [
"sphinx",
"sphinx-rtd-theme",
"zope.interface",
]
tests = [
"coverage[toml]==7.10.7",
"pytest>=8.4.2,<9.0.0",
]

[project.readme]
content-type = "text/x-rst"
Expand Down
13 changes: 8 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,19 @@ wheel_build_env = build_wheel
# https://github.com/pypa/setuptools/issues/1042 from breaking our builds.
setenv =
VIRTUALENV_NO_DOWNLOAD=1
extras =
dependency_groups =
tests
extras =
crypto: crypto
commands = {envpython} -b -m coverage run -m pytest {posargs}


[testenv:docs]
# The tox config must match the ReadTheDocs config.
basepython = python3.11
extras =
dependency_groups =
docs
extras =
crypto
commands =
sphinx-build -n -T -W -b html -d {envtmpdir}/doctrees docs docs/_build/html
Expand All @@ -58,8 +60,9 @@ commands =


[testenv:py{39,310,311,312,313,314}{,-crypto}-mypy]
extras =
dependency_groups =
tests
extras =
crypto: crypto
deps =
mypy
Expand All @@ -69,8 +72,8 @@ commands =
mypy

[testenv:lint]
basepython = python3.9
extras = dev
basepython = python3.10
dependency_groups = dev
passenv = HOMEPATH # needed on Windows
commands = pre-commit run --all-files

Expand Down
Loading