Skip to content

Commit bb664d9

Browse files
committedJun 14, 2024··
bug: remove six requirement, add license classifer
There are a few other "poetry" related changes that should be made, but I'm skipping those for now. Closes #166, 167
1 parent c99d0f7 commit bb664d9

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed
 

Diff for: ‎pyproject.toml

+8-1
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,19 @@ classifiers = [
2424
"Programming Language :: Python :: Implementation :: PyPy",
2525
"Programming Language :: Python",
2626
"Programming Language :: Python :: 3",
27+
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
2728
]
2829
# use the following fields defined in the setup.py file
2930
# (When the guides talk about something being "dynamic", they
3031
# want you to add the field here.
3132
dynamic = ["version", "entry-points"]
32-
dependencies = ['aiohttp', 'cryptography>=2.6.1', 'http-ece>=1.1.0', 'requests>=2.21.0', 'six>=1.15.0', 'py-vapid>=1.7.0']
33+
dependencies = [
34+
'aiohttp',
35+
'cryptography>=2.6.1',
36+
'http-ece>=1.1.0',
37+
'requests>=2.21.0',
38+
'py-vapid>=1.7.0',
39+
]
3340

3441
[project.urls]
3542
Homepage = "https://github.com/web-push-libs/pywebpush"

Diff for: ‎pywebpush/__init__.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import aiohttp
2020
import http_ece
2121
import requests
22-
import six
2322
from cryptography.hazmat.backends import default_backend
2423
from cryptography.hazmat.primitives.asymmetric import ec
2524
from cryptography.hazmat.primitives import serialization
@@ -175,7 +174,7 @@ def __init__(
175174
for k in ["p256dh", "auth"]:
176175
if keys.get(k) is None:
177176
raise WebPushException("Missing keys value: {}".format(k))
178-
if isinstance(keys[k], six.text_type):
177+
if isinstance(keys[k], str):
179178
keys[k] = bytes(cast(str, keys[k]).encode("utf8"))
180179
receiver_raw = base64.urlsafe_b64decode(
181180
self._repad(cast(bytes, keys["p256dh"]))
@@ -236,7 +235,7 @@ def encode(
236235
format=serialization.PublicFormat.UncompressedPoint,
237236
)
238237

239-
if isinstance(data, six.text_type):
238+
if isinstance(data, str):
240239
data = bytes(data.encode("utf8"))
241240
if content_encoding == "aes128gcm":
242241
self.verb("Encrypting to aes128gcm...")

Diff for: ‎requirements.txt

-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ aiohttp
22
cryptography>=2.6.1
33
http-ece>=1.1.0
44
requests>=2.21.0
5-
six>=1.15.0
65
py-vapid>=1.7.0

Diff for: ‎setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from setuptools import find_packages, setup
1111

12-
__version__ = "2.0.0"
12+
__version__ = "2.1.0"
1313

1414

1515
def read_from(file):

0 commit comments

Comments
 (0)
Please sign in to comment.