Skip to content

Commit e51c4fa

Browse files
authored
Drop six requirement, already py3 only (#24)
Drop not needed dependency (six) anymore.
1 parent d63a22a commit e51c4fa

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## Apr 28, 2020 - 1.3.0
2+
- Drop six dependency
3+
14
## Apr 17, 2020 - 1.2.2
25
- Fix version number
36

setup.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,15 @@
55

66
requests = "requests>=2.22.0,<3"
77

8-
install_requires = [
9-
"pycryptodomex>=3.8.1,<4",
10-
requests,
11-
"pyjwt==1.7.1",
12-
"six>=1.12.0",
13-
]
8+
install_requires = ["pycryptodomex>=3.8.1,<4", requests, "pyjwt==1.7.1"]
149
long_description = open("README.md", "r").read()
1510
tests_require = ["pytest"]
1611

1712
about = {}
1813
with open("stream_chat/__pkg__.py") as fp:
1914
exec(fp.read(), about)
2015

16+
2117
class PyTest(TestCommand):
2218
def finalize_options(self):
2319
TestCommand.finalize_options(self)
@@ -27,14 +23,20 @@ def finalize_options(self):
2723
def run_tests(self):
2824
# import here, cause outside the eggs aren't loaded
2925
import pytest
26+
3027
pytest_cmd = ["stream_chat/", "-v"]
3128

3229
try:
3330
import pytest_cov
34-
pytest_cmd += ["--cov=stream_chat/", "--cov-report=html", "--cov-report=annotate"]
31+
32+
pytest_cmd += [
33+
"--cov=stream_chat/",
34+
"--cov-report=html",
35+
"--cov-report=annotate",
36+
]
3537
except ImportError:
3638
pass
37-
39+
3840
errno = pytest.main(pytest_cmd)
3941
sys.exit(errno)
4042

@@ -55,7 +57,7 @@ def run_tests(self):
5557
extras_require={"test": tests_require},
5658
tests_require=tests_require,
5759
include_package_data=True,
58-
python_requires='>=3.5',
60+
python_requires=">=3.5",
5961
classifiers=[
6062
"Intended Audience :: Developers",
6163
"Intended Audience :: System Administrators",

stream_chat/client.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
import jwt
88
import requests
9-
import six
109

1110
from stream_chat.__pkg__ import __version__
1211
from stream_chat.channel import Channel
@@ -286,9 +285,7 @@ def verify_webhook(self, request_body, x_signature):
286285
:return: bool
287286
"""
288287
signature = hmac.new(
289-
key=six.b(self.api_secret),
290-
msg=six.b(request_body),
291-
digestmod=hashlib.sha256,
288+
key=self.api_secret.encode(), msg=request_body, digestmod=hashlib.sha256
292289
).hexdigest()
293290
return signature == x_signature
294291

0 commit comments

Comments
 (0)