Merge ~maxiberta/snapstore-client:craft-store-2.1.1 into snapstore-client:master

Proposed by Maximiliano Bertacchini
Status: Merged
Approved by: Maximiliano Bertacchini
Approved revision: 7100ea8d8cece14cb7dd33a919686ab76b84dc57
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~maxiberta/snapstore-client:craft-store-2.1.1
Merge into: snapstore-client:master
Diff against target: 229 lines (+35/-48)
4 files modified
Makefile (+4/-0)
requirements-dev.txt (+20/-28)
requirements.txt (+10/-10)
store_admin/logic/http_client.py (+1/-10)
Reviewer Review Type Date Requested Status
Przemysław Suliga Approve
Review via email: mp+424908@code.launchpad.net

Commit message

Update craft-store to 2.1.1

Drop in-memory keyring hack now that craft-store supports ephemeral logins

To post a comment you must log in.
Revision history for this message
Przemysław Suliga (suligap) wrote :

+1 thanks!

review: Approve
Revision history for this message
Otto Co-Pilot (otto-copilot) wrote :
Revision history for this message
Otto Co-Pilot (otto-copilot) wrote :
Revision history for this message
Otto Co-Pilot (otto-copilot) wrote :
Revision history for this message
Otto Co-Pilot (otto-copilot) wrote :
Revision history for this message
Otto Co-Pilot (otto-copilot) wrote :
Revision history for this message
Otto Co-Pilot (otto-copilot) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/Makefile b/Makefile
2index 4649c33..1dc8c9f 100644
3--- a/Makefile
4+++ b/Makefile
5@@ -15,6 +15,10 @@ SNAPCRAFT_FLAGS ?= --use-lxd --enable-manifest
6 $(OLS_WHEELS_DIR):
7 git clone $(DEPENDENCY_REPO) $(OLS_WHEELS_DIR)
8
9+.PHONY: update-dependencies
10+update-dependencies: $(OLS_WHEELS_DIR)
11+ cd $(OLS_WHEELS_DIR) && git pull
12+
13 $(ENV)/prod: | $(OLS_WHEELS_DIR)
14 virtualenv $(ENV)
15 $(PIP) install -f $(OLS_WHEELS_DIR) --no-index -r requirements.txt
16diff --git a/requirements-dev.txt b/requirements-dev.txt
17index c80f7c8..afda69f 100644
18--- a/requirements-dev.txt
19+++ b/requirements-dev.txt
20@@ -1,18 +1,18 @@
21-acceptable==0.31
22+acceptable==0.32
23 # via -r requirements-dev.in
24-attrs==21.2.0
25+attrs==21.4.0
26 # via
27 # jsonschema
28 # pytest
29-black==22.1.0
30+black==22.3.0
31 # via -r requirements-dev.in
32 certifi==2021.10.8
33 # via requests
34-charset-normalizer==2.0.7
35+charset-normalizer==2.0.12
36 # via requests
37-click==8.0.3
38+click==8.1.3
39 # via black
40-coverage[toml]==6.3.1
41+coverage[toml]==6.3.2
42 # via
43 # -r requirements-dev.in
44 # pytest-cov
45@@ -20,35 +20,33 @@ execnet==1.9.0
46 # via pytest-xdist
47 extras==1.0.0
48 # via testtools
49-fixtures==3.0.0
50+fixtures==4.0.0
51 # via testtools
52 flake8==4.0.1
53 # via -r requirements-dev.in
54 idna==3.3
55 # via requests
56+importlib-resources==5.7.1
57+ # via jsonschema
58 iniconfig==1.1.1
59 # via pytest
60-jinja2==3.0.2
61- # via acceptable
62-jsonschema==3.2.0
63+jsonschema==4.5.1
64 # via acceptable
65-markupsafe==2.0.1
66- # via jinja2
67 mccabe==0.6.1
68 # via flake8
69 mypy-extensions==0.4.3
70 # via black
71-packaging==21.0
72+packaging==21.3
73 # via
74 # pytest
75 # pytest-sugar
76 pathspec==0.9.0
77 # via black
78-pbr==5.6.0
79+pbr==5.9.0
80 # via
81 # fixtures
82 # testtools
83-platformdirs==2.4.0
84+platformdirs==2.5.2
85 # via black
86 pluggy==1.0.0
87 # via pytest
88@@ -62,7 +60,7 @@ pyflakes==2.4.0
89 # via flake8
90 pyparsing==2.4.7
91 # via packaging
92-pyrsistent==0.18.0
93+pyrsistent==0.18.1
94 # via jsonschema
95 pytest==7.0.0
96 # via
97@@ -81,32 +79,26 @@ pytest-xdist==2.5.0
98 # via -r requirements-dev.in
99 pyyaml==6.0
100 # via acceptable
101-requests==2.26.0
102+requests==2.27.1
103 # via responses
104 responses==0.20.0
105 # via -r requirements-dev.in
106-six==1.16.0
107- # via
108- # fixtures
109- # jsonschema
110 termcolor==1.1.0
111 # via pytest-sugar
112 testtools==2.5.0
113 # via
114 # -r requirements-dev.in
115 # fixtures
116-tomli==1.2.1
117+tomli==2.0.1
118 # via
119 # black
120 # coverage
121 # pytest
122-typing-extensions==3.10.0.2
123+typing-extensions==4.2.0
124 # via black
125-urllib3==1.26.7
126+urllib3==1.26.9
127 # via
128 # requests
129 # responses
130-
131-# The following packages are considered to be unsafe in a requirements file:
132-setuptools==58.3.0
133- # via jsonschema
134+zipp==3.8.0
135+ # via importlib-resources
136diff --git a/requirements.txt b/requirements.txt
137index e4a1975..da1b653 100644
138--- a/requirements.txt
139+++ b/requirements.txt
140@@ -4,17 +4,17 @@ cffi==1.15.0
141 # via
142 # cryptography
143 # pynacl
144-charset-normalizer==2.0.7
145+charset-normalizer==2.0.12
146 # via requests
147-click==8.0.3
148+click==8.1.3
149 # via -r requirements.in
150-craft-store==2.0.1
151+craft-store==2.1.1
152 # via -r requirements.in
153-cryptography==35.0.0
154+cryptography==36.0.2
155 # via secretstorage
156 idna==3.3
157 # via requests
158-importlib-metadata==4.8.1
159+importlib-metadata==4.11.3
160 # via keyring
161 jeepney==0.7.1
162 # via
163@@ -28,7 +28,7 @@ overrides==6.1.0
164 # via craft-store
165 protobuf==3.18.1
166 # via macaroonbakery
167-pycparser==2.20
168+pycparser==2.21
169 # via cffi
170 pydantic==1.9.0
171 # via craft-store
172@@ -48,7 +48,7 @@ pytz==2021.3
173 # via pyrfc3339
174 pyxdg==0.26
175 # via -r requirements.in
176-requests==2.26.0
177+requests==2.27.1
178 # via
179 # -r requirements.in
180 # craft-store
181@@ -63,11 +63,11 @@ six==1.16.0
182 # macaroonbakery
183 # pymacaroons
184 # pynacl
185-typing-extensions==3.10.0.2
186+typing-extensions==4.2.0
187 # via pydantic
188 typing-utils==0.1.0
189 # via overrides
190-urllib3==1.26.7
191+urllib3==1.26.9
192 # via requests
193-zipp==3.5.0
194+zipp==3.8.0
195 # via importlib-metadata
196diff --git a/store_admin/logic/http_client.py b/store_admin/logic/http_client.py
197index 15b80b2..067f9c8 100644
198--- a/store_admin/logic/http_client.py
199+++ b/store_admin/logic/http_client.py
200@@ -2,8 +2,6 @@
201 # Copyright 2022 Canonical Ltd. This software is licensed under the
202 # GNU General Public License version 3 (see the file LICENSE).
203
204-import os
205-
206 import requests
207 from requests.adapters import HTTPAdapter, Retry
208 from craft_store import Auth, StoreClient, endpoints
209@@ -37,21 +35,14 @@ def get_session(unique=False):
210
211
212 def get_store_client(base_url):
213- env_auth_key = "__snap_store_auth"
214- # Ugly workaround for craft-store not allowing to use an in-memory keyring
215- # without using an environment variable for "storing" existing credentials.
216- os.environ[env_auth_key] = os.getenv(env_auth_key) or "-"
217-
218 store_client = StoreClient(
219 base_url=base_url,
220 storage_base_url="", # No uploads expected.
221 endpoints=endpoints.SNAP_STORE, # SCA.
222 user_agent=USER_AGENT,
223 application_name=APP_NAME,
224- environment_auth=env_auth_key,
225+ ephemeral=True,
226 )
227-
228- store_client.logout()
229 return store_client
230
231

Subscribers

People subscribed via source and target branches

to all changes: