Fix Ruff typing deprecations (#951) - #952
Open
sunilkumarvalmiki wants to merge 1 commit into
Open
Conversation
Signed-off-by: Sunil Kumar <g.sunilkumarvalmiki@gmail.com>
JamesParrott
approved these changes
Aug 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
typing.Dict,typing.List, andtyping.Tupleannotations with Python 3.9-compatible built-in generics.
IteratorandSequenceimports tocollections.abcwhere required.Scope
Changed files:
src/paho/mqtt/client.pysrc/paho/mqtt/publish.pytests/debug_helpers.pyThe commit contains 14 additions and 14 deletions. It does not change MQTT
runtime behavior, dependencies, workflows, Ruff configuration, pre-commit
configuration, or project metadata.
Before / after
At baseline revision
ac779fe09f4797781718fd64f045e27c37b30ce0, the pinnedRuff 0.1.9 check reported 18 UP006/UP035 diagnostics and exited 1. On this
branch, the same check reports zero diagnostics and exits 0.
Verification
git diff --check: passedThe aggregate
tox -e lintcommand remains non-green because existingrepository-wide Black, codespell, and Windows-typeshed mypy findings remain;
those unrelated findings are not changed here.
The latest issue discussion says PR #793 need not block this focused change
and that configuration changes should not be proposed. This PR follows that
scope and does not modify or supersede PR #793.
Addresses #951.