Skip to content

Make documented client re-exports explicit#908

Open
vvezre wants to merge 2 commits into
eclipse-paho:masterfrom
vvezre:codex/explicit-public-reexports
Open

Make documented client re-exports explicit#908
vvezre wants to merge 2 commits into
eclipse-paho:masterfrom
vvezre:codex/explicit-public-reexports

Conversation

@vvezre

@vvezre vvezre commented Mar 16, 2026

Copy link
Copy Markdown

Summary

  • make the documented paho.mqtt.client re-exports explicit so static type checkers treat them as public API
  • add a regression test that locks the documented module-level exports in place

Testing

  • python -m pytest tests/test_client.py -k documented_public_reexports -q
  • validated with pyright against a minimal reproducer for mqtt.CallbackAPIVersion and mqtt.Properties

Closes #892

@pswsm

pswsm commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

This is nice!
Please, sign-the eca so we can move this forward, you can check how to do that in here

@JamesParrott

Copy link
Copy Markdown
Contributor

It's harmless, but @pswsm I disagree. Paho supports Python, and uses mypy itself during development. Supporting every other type checker's behaviour (in 2025 let alone what they all do now), will just add permanent clutter to to the code base and reduce readability, and increase the maintenance burden.

@PierreF The 'issue' this fixes, has no reproduction. I'd just close this.

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.

Pylance complains about "CallbackAPIVersion" is not exported from module "paho.mqtt.client"

3 participants