Skip to content

Modernize packaging, CI, and API for 2.0 - #8

Open
anaptfox wants to merge 7 commits into
masterfrom
modernize-python-env
Open

anaptfox wants to merge 7 commits into
masterfrom
modernize-python-env

Conversation

@anaptfox

Copy link
Copy Markdown
  • Replace setup.py with pyproject.toml and uv; Python 3.11+ required
  • CI: test 3.11-3.14, add wheel build check and ruff lint, pin actions by SHA
  • Upgrade paho-mqtt 1.x to 2.x
  • 2.0 API cleanup: AuthError/LosantError, keyword-only options, aware UTC dates, type hints
  • Add CHANGELOG, issue/PR templates, 1.x to 2.0 migration notes

@spacetc62 spacetc62 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

could you add some "live" integration tests, like the losant-rest-js client has? https://github.com/Losant/losant-mqtt-js/blob/master/test/integration/device-spec.js
https://app.losant.com/applications/577bd4229623b80100e3b234

You can add the device secret as a github actions secret.
Bonus points if you make live tests that work for both access key and device certificate authentication.

Comment thread README.rst

* Python 3.11 or newer is required. Python 2.7 and 3.8 through 3.10 are no longer supported.
* paho-mqtt 2.x is used. If you also use paho directly, note that paho 2.x changed its callback API.
* ``secure`` and ``transport`` are keyword-only:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this seems to be the only actual breaking change - is this actually needed?

matrix:
python: [ '3.11', '3.10', '3.9', '3.8' ]
runs-on: 'ubuntu-latest'
python: [ '3.11', '3.12', '3.13', '3.14' ]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what about 3.15?

@spacetc62 spacetc62 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

also, add the create/update vex as I did here: https://github.com/Losant/bravado-server/tree/master/.github/workflows

in addition, when I did housekeeping on bravado-core/bravado-server, I combined lint and test so I didn't have to install deps twice (quicker workflows) - does that make sense here?

@spacetc62 spacetc62 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

if we are going to have breaking changes, how do you feel about changing the folder name from losantmqtt to losant_mqtt? which would (I think) change the import to be from losant_mqtt? (which would be more correct for python I think?)

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