Skip to content

Remove unused import from umqtt.simple - #1169

Open
Josverl wants to merge 1 commit into
micropython:masterfrom
Josverl:fix/umqtt_simple_import
Open

Josverl wants to merge 1 commit into
micropython:masterfrom
Josverl:fix/umqtt_simple_import

Conversation

@Josverl

@Josverl Josverl commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Remove (commented-out) import of hexlify from the umqtt.simple module as it is not used.

This should reduce firmware size and save some memory on import.

Testing

No specific testing was conducted.

Generative AI

I did not use generative AI tools when creating this PR.

@dpgeorge

Copy link
Copy Markdown
Member

Nice find! But I suggest actually deleting the line, not just commenting it.

And then I guess the 2 commented-out lines that use this should be removed as well (or rewritten to use msg.hex(":")).

The import is commented rather than removed.
as all its uses have also been commented out.

Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
Signed-off-by: Jos Verlinde <jos_verlinde@hotmail.com>
@Josverl
Josverl force-pushed the fix/umqtt_simple_import branch from 6e3a97f to cb10cf1 Compare November 2, 2026 11:27
Copilot AI balanced review requested due to automatic review settings November 2, 2026 11:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the unused-import and debug-comment cleanup.

No open issues 🎉

What changed in this PR

Removes an unused dependency from the umqtt.simple MQTT client without changing its protocol behavior.

Changes:

  • Removes the unused binascii.hexlify import.
  • Deletes two commented-out debug statements that referenced hexlify.
File Description
micropython/​umqtt.simple/​umqtt/​simple.py Removes the unused import and associated debug comments.

Review effort: Balanced

@Josverl

Josverl commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor Author

My assumption was that they are/were intended as a debugging aid.

After pondering a while if there would be a way to keep them but be automagically pruned by -O1 or better,
I decided to keep it simple and just remove them.

edit:

Sorry for the unintended AI review noise - I have turned automatic reviews off.

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.

3 participants