Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update for modern python #158

Merged
merged 11 commits into from
Mar 4, 2024
Merged

feat: Update for modern python #158

merged 11 commits into from
Mar 4, 2024

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
1 check passed
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