Skip to content

Commit

Permalink
bug: remove six requirement, add license classifer
Browse files Browse the repository at this point in the history
There are a few other "poetry" related changes
that should be made, but I'm skipping those for
now.

Closes #166, 167
  • Loading branch information
jrconlin committed Jun 14, 2024
1 parent c99d0f7 commit bb664d9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,19 @@ classifiers = [
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
]
# use the following fields defined in the setup.py file
# (When the guides talk about something being "dynamic", they
# want you to add the field here.
dynamic = ["version", "entry-points"]
dependencies = ['aiohttp', 'cryptography>=2.6.1', 'http-ece>=1.1.0', 'requests>=2.21.0', 'six>=1.15.0', 'py-vapid>=1.7.0']
dependencies = [
'aiohttp',
'cryptography>=2.6.1',
'http-ece>=1.1.0',
'requests>=2.21.0',
'py-vapid>=1.7.0',
]

[project.urls]
Homepage = "https://github.com/web-push-libs/pywebpush"
Expand Down
5 changes: 2 additions & 3 deletions pywebpush/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import aiohttp
import http_ece
import requests
import six
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.asymmetric import ec
from cryptography.hazmat.primitives import serialization
Expand Down Expand Up @@ -175,7 +174,7 @@ def __init__(
for k in ["p256dh", "auth"]:
if keys.get(k) is None:
raise WebPushException("Missing keys value: {}".format(k))
if isinstance(keys[k], six.text_type):
if isinstance(keys[k], str):
keys[k] = bytes(cast(str, keys[k]).encode("utf8"))
receiver_raw = base64.urlsafe_b64decode(
self._repad(cast(bytes, keys["p256dh"]))
Expand Down Expand Up @@ -236,7 +235,7 @@ def encode(
format=serialization.PublicFormat.UncompressedPoint,
)

if isinstance(data, six.text_type):
if isinstance(data, str):
data = bytes(data.encode("utf8"))
if content_encoding == "aes128gcm":
self.verb("Encrypting to aes128gcm...")
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ aiohttp
cryptography>=2.6.1
http-ece>=1.1.0
requests>=2.21.0
six>=1.15.0
py-vapid>=1.7.0
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from setuptools import find_packages, setup

__version__ = "2.0.0"
__version__ = "2.1.0"


def read_from(file):
Expand Down

0 comments on commit bb664d9

Please sign in to comment.