From f42745ac87968e64a68731fcd470e7005722b39b Mon Sep 17 00:00:00 2001 From: prateek-dagar Date: Mon, 3 Aug 2026 23:26:42 +0530 Subject: [PATCH 1/2] Move development dependencies to dependency-groups (PEP 735) --- docs/changelog.md | 3 +++ docs/contributing.md | 4 ++-- pyproject.toml | 2 +- tox.ini | 6 +++--- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index 4ea8000..bd7d9c3 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [4.2.0](https://github.com/nhairs/python-json-logger/compare/v4.1.0...v4.2.0) - UNRELEASED +### Changed +- Move development dependencies from `project.optional-dependencies.dev` to `[dependency-groups].dev` (PEP 735). [#46](https://github.com/nhairs/python-json-logger/issues/46) + ### Fixed - Logging a `dict` no longer modifies it. `exc_info` and `stack_info` were previously added to the caller's `dict`. [#66](https://github.com/nhairs/python-json-logger/pull/66) diff --git a/docs/contributing.md b/docs/contributing.md index aff0ca9..7662dc8 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -33,10 +33,10 @@ While the style guide covers detailed conventions, always try to match the style #### Development Setup -All devlopment tooling can be installed (usually into a virtual environment), using the `dev` optional dependency: +All development tooling can be installed (usually into a virtual environment) using `uv` with the `dev` dependency group: ```shell -pip install -e '.[dev]'` +uv sync --group dev ``` Before creating your pull request you'll want to format your code and run the linters and tests: diff --git a/pyproject.toml b/pyproject.toml index cb64e3b..f14b802 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ classifiers = [ Homepage = "https://nhairs.github.io/python-json-logger" GitHub = "https://github.com/nhairs/python-json-logger" -[project.optional-dependencies] +[dependency-groups] dev = [ ## Optional but required for dev "orjson;implementation_name!='pypy'", diff --git a/tox.ini b/tox.ini index 51ca12b..4a21c2e 100644 --- a/tox.ini +++ b/tox.ini @@ -4,19 +4,19 @@ envlist = py{310,311,312,313,314}, pypy{310,311} [testenv] description = run unit tests -extras = dev +dependency_groups = dev commands = pytest tests [testenv:format] description = run formatters -extras = dev +dependency_groups = dev commands = black src tests [testenv:lint] description = run linters -extras = dev +dependency_groups = dev commands = validate-pyproject pyproject.toml black --check --diff src tests From c317221e7494719c78862e67b3f0c115b6873852 Mon Sep 17 00:00:00 2001 From: Nicholas Hairs Date: Thu, 6 Aug 2026 20:04:22 +1000 Subject: [PATCH 2/2] Update docs/changelog.md --- docs/changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changelog.md b/docs/changelog.md index bd7d9c3..64d53c1 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -12,7 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Logging a `dict` no longer modifies it. `exc_info` and `stack_info` were previously added to the caller's `dict`. [#66](https://github.com/nhairs/python-json-logger/pull/66) -Thanks @gaoflow +Thanks @gaoflow, @prateek-dagar ## [4.1.0](https://github.com/nhairs/python-json-logger/compare/v4.0.0...v4.1.0) - 2026-03-29