Skip to content

Commit d51efda

Browse files
committed
Bump to latest mock
1 parent 34abbfa commit d51efda

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

dev-requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ PyYAML==5.2
22
Pygments==2.5.2
33
Sphinx-Substitution-Extensions==2019.6.15.0
44
Sphinx==2.2.2
5-
VWS-Python-Mock==2019.9.28.0
5+
VWS-Python-Mock==2019.12.7.1
66
autoflake==1.3.1
77
check-manifest==0.40
88
codecov==2.0.15 # Upload coverage data
99
doc8==0.8.0
1010
dodgy==0.1.9 # Look for uploaded secrets
11-
dulwich==0.19.13
11+
dulwich==0.19.14
1212
flake8-commas==2.0.0 # Require silicon valley commas
1313
flake8-quotes==2.1.1 # Require single quotes
1414
flake8==3.7.9 # Lint

setup.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF = true
123123

124124
[metadata]
125125
name = VWS Python
126-
description = 'Interact with the Vuforia Web Services (VWS) API.'
126+
description = Interact with the Vuforia Web Services (VWS) API.
127127
long_description = file: README.rst
128128
keywords = vuforia client
129129
license = MIT License
@@ -134,7 +134,7 @@ classifiers =
134134
Programming Language :: Python :: 3.8
135135
License :: OSI Approved :: MIT License
136136
Development Status :: 5 - Production/Stable
137-
url = 'https://vws-python.readthedocs.io'
137+
url = https://vws-python.readthedocs.io
138138
author = Adam Dangoor
139139
author_email = [email protected]
140140

src/vws/_authorization.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ def rfc_1123_date() -> str:
2828

2929

3030
def authorization_header( # pylint: disable=too-many-arguments
31-
access_key: bytes,
32-
secret_key: bytes,
31+
access_key: str,
32+
secret_key: str,
3333
method: str,
3434
content: bytes,
3535
content_type: str,
3636
date: str,
3737
request_path: str,
38-
) -> bytes:
38+
) -> str:
3939
"""
4040
Return an `Authorization` header which can be used for a request made to
4141
the VWS API with the given attributes.
@@ -74,11 +74,11 @@ def authorization_header( # pylint: disable=too-many-arguments
7474
]
7575
string_to_sign = '\n'.join(components_to_sign)
7676
signature = compute_hmac_base64(
77-
key=secret_key,
77+
key=secret_key.encode(),
7878
data=bytes(
7979
string_to_sign,
8080
encoding='utf-8',
8181
),
8282
)
83-
auth_header = b'VWS %s:%s' % (access_key, signature)
83+
auth_header = f'VWS {access_key}:{signature.decode()}'
8484
return auth_header

src/vws/query.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ def __init__(
3636
client_secret_key: A VWS client secret key.
3737
base_vwq_url: The base URL for the VWQ API.
3838
"""
39-
self._client_access_key = client_access_key.encode()
40-
self._client_secret_key = client_secret_key.encode()
39+
self._client_access_key = client_access_key
40+
self._client_secret_key = client_secret_key
4141
self._base_vwq_url = base_vwq_url
4242

4343
def query(

src/vws/vws.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

2020

2121
def _target_api_request(
22-
server_access_key: bytes,
23-
server_secret_key: bytes,
22+
server_access_key: str,
23+
server_secret_key: str,
2424
method: str,
2525
content: bytes,
2626
request_path: str,
@@ -92,8 +92,8 @@ def __init__(
9292
server_secret_key: A VWS server secret key.
9393
base_vws_url: The base URL for the VWS API.
9494
"""
95-
self._server_access_key = server_access_key.encode()
96-
self._server_secret_key = server_secret_key.encode()
95+
self._server_access_key = server_access_key
96+
self._server_secret_key = server_secret_key
9797
self._base_vws_url = base_vws_url
9898

9999
def _make_request(

0 commit comments

Comments
 (0)