web-push-libs / pywebpush

Python Webpush Data encryption library
Mozilla Public License 2.0
303 stars 52 forks source link

Use six.text_type instead of six.string_types #119

Closed scyclops closed 4 years ago

scyclops commented 4 years ago

In Python 2, using six.string_types causes the code to attempt to re-encode already encoded data because six.string_types matches Python 2 str and unicode data. Using six.text_type makes sure that the code only attempts to encode unicode data.

jrconlin commented 4 years ago

I'll push a new version to pypi after the US holiday weekend.