Skip to content

feat: modernize configuration & update Django & Python versions#820

Merged
terencehonles merged 1 commit into
jazzband:masterfrom
terencehonles:updates
May 29, 2026
Merged

feat: modernize configuration & update Django & Python versions#820
terencehonles merged 1 commit into
jazzband:masterfrom
terencehonles:updates

Conversation

@terencehonles
Copy link
Copy Markdown
Contributor

@terencehonles terencehonles commented May 29, 2026

This change centralizes configuration in pyproject.toml, drops EoL Python & Django versions, and adds support & testing for modern Python & Django versions.

@terencehonles terencehonles force-pushed the updates branch 2 times, most recently from 167206b to 7518838 Compare May 29, 2026 20:47
@terencehonles terencehonles marked this pull request as ready for review May 29, 2026 20:48
@terencehonles terencehonles requested a review from Copilot May 29, 2026 20:48
@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

❌ Patch coverage is 92.64706% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.3%. Comparing base (6b155fa) to head (4fc6060).

Files with missing lines Patch % Lines
django_redis/client/default.py 93.4% 4 Missing and 4 partials ⚠️
django_redis/client/sharded.py 90.7% 3 Missing ⚠️
django_redis/client/herd.py 0.0% 2 Missing ⚠️
django_redis/client/mixins/protocols.py 60.0% 2 Missing ⚠️
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             
Flag Coverage Δ
mypy 38.3% <92.7%> (+0.2%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread pyproject.toml Outdated
Comment thread pyproject.toml
module = "redis.sentinel"
ignore_missing_imports = true

[tool.pytest]
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong, but I will require pytest 9 to ensure this is honored

Comment thread pyproject.toml Outdated
@terencehonles terencehonles force-pushed the updates branch 2 times, most recently from a8a2045 to 83edc73 Compare May 29, 2026 21:07
This change centralizes configuration in `pyproject.toml`, drops EoL
Python & Django versions, and adds support & testing for modern Python &
Django versions.
@terencehonles
Copy link
Copy Markdown
Contributor Author

I was really trying to minimize bloating this PR, but pre-commit / ruff didn't like that we were using older syntax 😒

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Comment thread pyproject.toml
Comment on lines +367 to +372
[tool.tox.gh.python]
"3.10" = ["py310"]
"3.11" = ["py311"]
"3.12" = ["py312"]
"3.13" = ["py313"]
"3.14" = ["py314"]
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is being done

@terencehonles terencehonles merged commit 42d9686 into jazzband:master May 29, 2026
19 checks passed
@terencehonles terencehonles deleted the updates branch May 29, 2026 21:25
pchopinet pushed a commit to JaaJSoft/workspace that referenced this pull request Jun 5, 2026
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 &amp; Django
versions, and add support &amp; testing for modern Python &amp; Django
versions. (<a
href="https://redirect.github.com/jazzband/django-redis/issues/820">#820</a>)</li>
<li>Provide TypeVar defaults &amp; 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 &amp; 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 &amp; 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)
&lt;https://github.com/jazzband/django-redis/issues/657&gt;</code>_)</li>
<li><code>RedisCache</code> does not attempt to close clients which have
not been initialized.
(<code>[#796](jazzband/django-redis#796)
&lt;https://github.com/jazzband/django-redis/issues/796&gt;</code>_)</li>
<li>Add sorted set operations (zadd, zrange, zrem, etc.) and mixins for
RedisCache
(<code>[#797](jazzband/django-redis#797)
&lt;https://github.com/jazzband/django-redis/issues/797&gt;</code>_)</li>
<li>Centralize configuration in <code>pyproject.toml</code>, drop EoL
Python &amp; Django
versions, and add support &amp; testing for modern Python &amp; Django
versions.
(<code>[#820](jazzband/django-redis#820)
&lt;https://github.com/jazzband/django-redis/issues/820&gt;</code>_)</li>
<li>Provide TypeVar defaults &amp; provide initial typing for
<code>RedisCache</code>.
(<code>[#829](jazzband/django-redis#829)
&lt;https://github.com/jazzband/django-redis/issues/829&gt;</code>_)</li>
</ul>
<h2>Bug Fixes</h2>
<ul>
<li>Fix IntEnum encoding
(<code>[#602](jazzband/django-redis#602)
&lt;https://github.com/jazzband/django-redis/issues/602&gt;</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)
&lt;https://github.com/jazzband/django-redis/issues/822&gt;</code>_)</li>
</ul>
<h2>Miscellaneous</h2>
<ul>
<li>Drop support for Django 5.0 (EOL)
(<code>[#779](jazzband/django-redis#779)
&lt;https://github.com/jazzband/django-redis/issues/779&gt;</code>_)</li>
<li>Clean &amp; organize ruff config
(<code>[#781](jazzband/django-redis#781)
&lt;https://github.com/jazzband/django-redis/issues/781&gt;</code>_)</li>
<li>Replace black with ruff format
(<code>[#782](jazzband/django-redis#782)
&lt;https://github.com/jazzband/django-redis/issues/782&gt;</code>_)</li>
<li>Update <code>RedisCache.close</code> to not forward
<code>kwargs</code> to the client implementation.
(<code>[#788](jazzband/django-redis#788)
&lt;https://github.com/jazzband/django-redis/issues/788&gt;</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)
&lt;https://github.com/jazzband/django-redis/issues/811&gt;</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)
&lt;https://github.com/jazzband/django-redis/issues/812&gt;</code>_)</li>
<li>pre-commit autoupdate
(<code>[#819](jazzband/django-redis#819)
&lt;https://github.com/jazzband/django-redis/issues/819&gt;</code>_)</li>
<li>Use <code>from __future__ import annotations</code> to postpone
evaluation of annotations.
(<code>[#823](jazzband/django-redis#823)
&lt;https://github.com/jazzband/django-redis/issues/823&gt;</code>_)</li>
<li>Increase mypy strictness, fix typing configuration, and fix type
errors.
(<code>[#824](jazzband/django-redis#824)
&lt;https://github.com/jazzband/django-redis/issues/824&gt;</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)
&lt;https://github.com/jazzband/django-redis/issues/825&gt;</code>_)</li>
<li>Remove code handling unsupported Django versions
(<code>[#826](jazzband/django-redis#826)
&lt;https://github.com/jazzband/django-redis/issues/826&gt;</code>_)</li>
<li>Increase mypy type coverage &amp; update strictness overrides to
only target specific modules
(<code>[#827](jazzband/django-redis#827)
&lt;https://github.com/jazzband/django-redis/issues/827&gt;</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 &amp; 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 &amp; 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 &amp; 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 />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=django-redis&package-manager=uv&previous-version=6.0.0&new-version=7.0.0)](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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants