feat: modernize configuration & update Django & Python versions#820
Conversation
167206b to
7518838
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #820 +/- ##
========================================
+ Coverage 38.2% 38.3% +0.2%
========================================
Files 48 48
Lines 3727 3727
Branches 301 301
========================================
+ Hits 1420 1425 +5
+ Misses 2006 2001 -5
Partials 301 301
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR centralizes packaging, tooling, test, and lint configuration into pyproject.toml while updating the supported Python/Django version matrix.
Changes:
- Migrates metadata, pytest, coverage, mypy, Ruff, tox, and towncrier configuration into
pyproject.toml. - Drops older Python/Django versions and adds Python 3.14 / Django 6.0-oriented CI coverage.
- Updates CI dependency installation and cache keys to use the new configuration layout.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
pyproject.toml |
Adds centralized project metadata and tool configuration. |
setup.cfg |
Removes legacy configuration now intended to live in pyproject.toml. |
.ruff.toml |
Removes standalone Ruff config after migration. |
.github/workflows/ci.yml |
Updates CI matrix, tox setup, and cache keys for newer versions/config files. |
changelog.d/820.feature |
Adds a feature changelog entry for the modernization work. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| module = "redis.sentinel" | ||
| ignore_missing_imports = true | ||
|
|
||
| [tool.pytest] |
There was a problem hiding this comment.
This is wrong, but I will require pytest 9 to ensure this is honored
a8a2045 to
83edc73
Compare
This change centralizes configuration in `pyproject.toml`, drops EoL Python & Django versions, and adds support & testing for modern Python & Django versions.
|
I was really trying to minimize bloating this PR, but pre-commit / ruff didn't like that we were using older syntax 😒 |
| [tool.tox.gh.python] | ||
| "3.10" = ["py310"] | ||
| "3.11" = ["py311"] | ||
| "3.12" = ["py312"] | ||
| "3.13" = ["py313"] | ||
| "3.14" = ["py314"] |
There was a problem hiding this comment.
This is being done
Bumps [django-redis](https://github.com/jazzband/django-redis) from 6.0.0 to 7.0.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/jazzband/django-redis/releases">django-redis's releases</a>.</em></p> <blockquote> <h2>7.0.0</h2> <h1>django-redis 7.0.0 (2026-06-02)</h1> <h2>Features</h2> <ul> <li>Added the ability to pass redis username in the cache options (<a href="https://redirect.github.com/jazzband/django-redis/issues/657">#657</a>)</li> <li><code>RedisCache</code> does not attempt to close clients which have not been initialized. (<a href="https://redirect.github.com/jazzband/django-redis/issues/796">#796</a>)</li> <li>Add sorted set operations (zadd, zrange, zrem, etc.) and mixins for RedisCache (<a href="https://redirect.github.com/jazzband/django-redis/issues/797">#797</a>)</li> <li>Centralize configuration in <code>pyproject.toml</code>, drop EoL Python & Django versions, and add support & testing for modern Python & Django versions. (<a href="https://redirect.github.com/jazzband/django-redis/issues/820">#820</a>)</li> <li>Provide TypeVar defaults & provide initial typing for <code>RedisCache</code>. (<a href="https://redirect.github.com/jazzband/django-redis/issues/829">#829</a>)</li> </ul> <h2>Bug Fixes</h2> <ul> <li>Fix IntEnum encoding (<a href="https://redirect.github.com/jazzband/django-redis/issues/602">#602</a>)</li> <li>Fix incorrect Redis typing that relied on the legacy <code>types-redis</code> package, and update the public API to avoid exposing redis-py key types (the encode/decode/make_key methods allow a different API surface). (<a href="https://redirect.github.com/jazzband/django-redis/issues/822">#822</a>)</li> </ul> <h2>Miscellaneous</h2> <ul> <li>Drop support for Django 5.0 (EOL) (<a href="https://redirect.github.com/jazzband/django-redis/issues/779">#779</a>)</li> <li>Clean & organize ruff config (<a href="https://redirect.github.com/jazzband/django-redis/issues/781">#781</a>)</li> <li>Replace black with ruff format (<a href="https://redirect.github.com/jazzband/django-redis/issues/782">#782</a>)</li> <li>Update <code>RedisCache.close</code> to not forward <code>kwargs</code> to the client implementation. (<a href="https://redirect.github.com/jazzband/django-redis/issues/788">#788</a>)</li> <li>Rename 'name' parameter to 'key' in all sorted set methods for better consistency with Redis terminology (<a href="https://redirect.github.com/jazzband/django-redis/issues/811">#811</a>)</li> <li>Fix hash method parameters: rename 'name' → 'key', 'key' → 'field' to align with Redis/Valkey terminology. Add version parameter to hlen() and hkeys(). Fix make_key() to only apply to hash key, not fields. (<a href="https://redirect.github.com/jazzband/django-redis/issues/812">#812</a>)</li> <li>pre-commit autoupdate (<a href="https://redirect.github.com/jazzband/django-redis/issues/819">#819</a>)</li> <li>Use <code>from __future__ import annotations</code> to postpone evaluation of annotations. (<a href="https://redirect.github.com/jazzband/django-redis/issues/823">#823</a>)</li> <li>Increase mypy strictness, fix typing configuration, and fix type errors. (<a href="https://redirect.github.com/jazzband/django-redis/issues/824">#824</a>)</li> <li>This change updates the compose configuration, and moves it to <code>tests</code> directory as it is only for testing. (<a href="https://redirect.github.com/jazzband/django-redis/issues/825">#825</a>)</li> <li>Remove code handling unsupported Django versions (<a href="https://redirect.github.com/jazzband/django-redis/issues/826">#826</a>)</li> <li>Increase mypy type coverage & update strictness overrides to only target specific modules (<a href="https://redirect.github.com/jazzband/django-redis/issues/827">#827</a>)</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/jazzband/django-redis/blob/master/CHANGELOG.rst">django-redis's changelog</a>.</em></p> <blockquote> <h1>django-redis 7.0.0 (2026-06-02)</h1> <h2>Features</h2> <ul> <li>Added the ability to pass redis username in the cache options (<code>[#657](jazzband/django-redis#657) <https://github.com/jazzband/django-redis/issues/657></code>_)</li> <li><code>RedisCache</code> does not attempt to close clients which have not been initialized. (<code>[#796](jazzband/django-redis#796) <https://github.com/jazzband/django-redis/issues/796></code>_)</li> <li>Add sorted set operations (zadd, zrange, zrem, etc.) and mixins for RedisCache (<code>[#797](jazzband/django-redis#797) <https://github.com/jazzband/django-redis/issues/797></code>_)</li> <li>Centralize configuration in <code>pyproject.toml</code>, drop EoL Python & Django versions, and add support & testing for modern Python & Django versions. (<code>[#820](jazzband/django-redis#820) <https://github.com/jazzband/django-redis/issues/820></code>_)</li> <li>Provide TypeVar defaults & provide initial typing for <code>RedisCache</code>. (<code>[#829](jazzband/django-redis#829) <https://github.com/jazzband/django-redis/issues/829></code>_)</li> </ul> <h2>Bug Fixes</h2> <ul> <li>Fix IntEnum encoding (<code>[#602](jazzband/django-redis#602) <https://github.com/jazzband/django-redis/issues/602></code>_)</li> <li>Fix incorrect Redis typing that relied on the legacy <code>types-redis</code> package, and update the public API to avoid exposing redis-py key types (the encode/decode/make_key methods allow a different API surface). (<code>[#822](jazzband/django-redis#822) <https://github.com/jazzband/django-redis/issues/822></code>_)</li> </ul> <h2>Miscellaneous</h2> <ul> <li>Drop support for Django 5.0 (EOL) (<code>[#779](jazzband/django-redis#779) <https://github.com/jazzband/django-redis/issues/779></code>_)</li> <li>Clean & organize ruff config (<code>[#781](jazzband/django-redis#781) <https://github.com/jazzband/django-redis/issues/781></code>_)</li> <li>Replace black with ruff format (<code>[#782](jazzband/django-redis#782) <https://github.com/jazzband/django-redis/issues/782></code>_)</li> <li>Update <code>RedisCache.close</code> to not forward <code>kwargs</code> to the client implementation. (<code>[#788](jazzband/django-redis#788) <https://github.com/jazzband/django-redis/issues/788></code>_)</li> <li>Rename 'name' parameter to 'key' in all sorted set methods for better consistency with Redis terminology (<code>[#811](jazzband/django-redis#811) <https://github.com/jazzband/django-redis/issues/811></code>_)</li> <li>Fix hash method parameters: rename 'name' → 'key', 'key' → 'field' to align with Redis/Valkey terminology. Add version parameter to hlen() and hkeys(). Fix make_key() to only apply to hash key, not fields. (<code>[#812](jazzband/django-redis#812) <https://github.com/jazzband/django-redis/issues/812></code>_)</li> <li>pre-commit autoupdate (<code>[#819](jazzband/django-redis#819) <https://github.com/jazzband/django-redis/issues/819></code>_)</li> <li>Use <code>from __future__ import annotations</code> to postpone evaluation of annotations. (<code>[#823](jazzband/django-redis#823) <https://github.com/jazzband/django-redis/issues/823></code>_)</li> <li>Increase mypy strictness, fix typing configuration, and fix type errors. (<code>[#824](jazzband/django-redis#824) <https://github.com/jazzband/django-redis/issues/824></code>_)</li> <li>This change updates the compose configuration, and moves it to <code>tests</code> directory as it is only for testing. (<code>[#825](jazzband/django-redis#825) <https://github.com/jazzband/django-redis/issues/825></code>_)</li> <li>Remove code handling unsupported Django versions (<code>[#826](jazzband/django-redis#826) <https://github.com/jazzband/django-redis/issues/826></code>_)</li> <li>Increase mypy type coverage & update strictness overrides to only target specific modules (<code>[#827](jazzband/django-redis#827) <https://github.com/jazzband/django-redis/issues/827></code>_)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/jazzband/django-redis/commit/0ee6b11bb1affb0eda01b027eccb2d3af19d0b9f"><code>0ee6b11</code></a> release 7.0 (<a href="https://redirect.github.com/jazzband/django-redis/issues/830">#830</a>)</li> <li><a href="https://github.com/jazzband/django-redis/commit/fcc882bd431521e0829d16a0a6aa152fbb2c952d"><code>fcc882b</code></a> feat: Allow cache OPTIONS to specify USERNAME (<a href="https://redirect.github.com/jazzband/django-redis/issues/657">#657</a>)</li> <li><a href="https://github.com/jazzband/django-redis/commit/85c5c3d44af4dca2cf33e0989d331eecb609a37c"><code>85c5c3d</code></a> fix: fix encoding IntEnum values (<a href="https://redirect.github.com/jazzband/django-redis/issues/602">#602</a>)</li> <li><a href="https://github.com/jazzband/django-redis/commit/8558af4203246968568f5ee562b165d2cf7a7861"><code>8558af4</code></a> feat: update <code>RedisCache.close</code> to check for client before closing (<a href="https://redirect.github.com/jazzband/django-redis/issues/796">#796</a>)</li> <li><a href="https://github.com/jazzband/django-redis/commit/53a1de3a5286edfd0123cbcfe2c0d63a93ef7fab"><code>53a1de3</code></a> feat: provide TypeVar defaults & provide initial typing for <code>RedisCache</code> (<a href="https://redirect.github.com/jazzband/django-redis/issues/829">#829</a>)</li> <li><a href="https://github.com/jazzband/django-redis/commit/308e2e155871fbd74c6ae814cc6905c0ec030d0d"><code>308e2e1</code></a> feat: remove **kwargs from self.client.close() call in RedisCache.close() (<a href="https://redirect.github.com/jazzband/django-redis/issues/788">#788</a>)</li> <li><a href="https://github.com/jazzband/django-redis/commit/2c0e8538270ecb064c95456a013fe8b672a7dad7"><code>2c0e853</code></a> feat: increase mypy type coverage & move strictness overrides to specific mod...</li> <li><a href="https://github.com/jazzband/django-redis/commit/8fb199e922b574116568d44c689f39c446d070a1"><code>8fb199e</code></a> feat: remove code handling unsupported Django versions (<a href="https://redirect.github.com/jazzband/django-redis/issues/826">#826</a>)</li> <li><a href="https://github.com/jazzband/django-redis/commit/5d54a256cb214d2e1ff4eae421dc6a77fe6794e2"><code>5d54a25</code></a> tests: move & update compose configuration (<a href="https://redirect.github.com/jazzband/django-redis/issues/825">#825</a>)</li> <li><a href="https://github.com/jazzband/django-redis/commit/ca1f36898901d3a0d6acac088cc73c8f6d686f87"><code>ca1f368</code></a> feat: increase mypy strictness, fix typing configuration, and fix type errors...</li> <li>Additional commits viewable in <a href="https://github.com/jazzband/django-redis/compare/6.0.0...7.0.0">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This change centralizes configuration in
pyproject.toml, drops EoL Python & Django versions, and adds support & testing for modern Python & Django versions.