Skip to content

Conversation

@jrconlin
Copy link
Member

This updates things to use more modern python practices. This includes:

  • Adding a pyproject.toml file
  • Add type hints

BREAKING CHANGE
Webpusher.encode will now return a NoData exception if no data is present to encode. Chances are you probably won't be impacted by this change since most push messages contain data, but one never knows. This alters the prior behavior where it would return None.

Includes fixes from #152 by https://github.com/TobeTek (Thanks!)

This updates things to use more modern python practices. This includes: * Adding a pyproject.toml file * Add type hints **BREAKING CHANGE** `Webpusher.encode` will now return a `NoData` exception if no data is present to encode. Chances are you probably won't be impacted by this change since most push messages contain data, but one never knows. This alters the prior behavior where it would return `None`. Includes fixes from #152 by https://github.com/TobeTek (Thanks!)
@safwanrahman
Copy link
Collaborator

Thanks @jrconlin, it is very nice to see this!

@jrconlin
Copy link
Member Author

Well, still not quite sure I've got it right. Specifically, the project.scripts portion of pyproject.toml. I'd hope that creates the equivalent of python -m pywebpush but 🤷🏻‍♂️ ?

My python is a bit rusty as is, and I am WAY behind on modern packaging practices. Plus, a lot of the tutorials and docs are zero help. Any pointers and dope-slaps folk want to provide are more than welcome.

@jrconlin jrconlin marked this pull request as ready for review January 9, 2024 01:13
@jrconlin jrconlin merged commit c158097 into main Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants