singlestoredb 1.4.2__cp38-abi3-win32.whl → 1.4.3__cp38-abi3-win32.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of singlestoredb might be problematic. Click here for more details.
- _singlestoredb_accel.pyd +0 -0
- singlestoredb/__init__.py +1 -1
- singlestoredb/management/utils.py +20 -4
- {singlestoredb-1.4.2.dist-info → singlestoredb-1.4.3.dist-info}/METADATA +1 -1
- {singlestoredb-1.4.2.dist-info → singlestoredb-1.4.3.dist-info}/RECORD +9 -9
- {singlestoredb-1.4.2.dist-info → singlestoredb-1.4.3.dist-info}/LICENSE +0 -0
- {singlestoredb-1.4.2.dist-info → singlestoredb-1.4.3.dist-info}/WHEEL +0 -0
- {singlestoredb-1.4.2.dist-info → singlestoredb-1.4.3.dist-info}/entry_points.txt +0 -0
- {singlestoredb-1.4.2.dist-info → singlestoredb-1.4.3.dist-info}/top_level.txt +0 -0
_singlestoredb_accel.pyd
CHANGED
|
Binary file
|
singlestoredb/__init__.py
CHANGED
|
@@ -123,14 +123,14 @@ class NamedList(List[T]):
|
|
|
123
123
|
def _setup_authentication_info_handler() -> Callable[..., Dict[str, Any]]:
|
|
124
124
|
"""Setup authentication info event handler."""
|
|
125
125
|
|
|
126
|
-
authentication_info:
|
|
126
|
+
authentication_info: Dict[str, Any] = {}
|
|
127
127
|
|
|
128
128
|
def handle_authentication_info(msg: Dict[str, Any]) -> None:
|
|
129
129
|
"""Handle authentication info events."""
|
|
130
130
|
nonlocal authentication_info
|
|
131
131
|
if msg.get('name', '') != 'singlestore.portal.authentication_updated':
|
|
132
132
|
return
|
|
133
|
-
authentication_info =
|
|
133
|
+
authentication_info = dict(msg.get('data', {}))
|
|
134
134
|
|
|
135
135
|
events.subscribe(handle_authentication_info)
|
|
136
136
|
|
|
@@ -145,11 +145,27 @@ def _setup_authentication_info_handler() -> Callable[..., Dict[str, Any]]:
|
|
|
145
145
|
out['user'] = data['user']
|
|
146
146
|
if 'password' in data:
|
|
147
147
|
out['password'] = data['password']
|
|
148
|
-
authentication_info =
|
|
148
|
+
authentication_info = out
|
|
149
149
|
|
|
150
150
|
events.subscribe(handle_authentication_info)
|
|
151
151
|
|
|
152
|
+
def retrieve_current_authentication_info() -> List[Tuple[str, Any]]:
|
|
153
|
+
"""Retrieve JWT if not expired."""
|
|
154
|
+
nonlocal authentication_info
|
|
155
|
+
password = authentication_info.get('password')
|
|
156
|
+
if password:
|
|
157
|
+
expires = datetime.datetime.fromtimestamp(
|
|
158
|
+
jwt.decode(
|
|
159
|
+
password,
|
|
160
|
+
options={'verify_signature': False},
|
|
161
|
+
)['exp'],
|
|
162
|
+
)
|
|
163
|
+
if datetime.datetime.now() > expires:
|
|
164
|
+
authentication_info = {}
|
|
165
|
+
return list(authentication_info.items())
|
|
166
|
+
|
|
152
167
|
def get_env() -> List[Tuple[str, Any]]:
|
|
168
|
+
"""Retrieve JWT from environment."""
|
|
153
169
|
conn = {}
|
|
154
170
|
url = os.environ.get('SINGLESTOREDB_URL') or get_option('host')
|
|
155
171
|
if url:
|
|
@@ -170,7 +186,7 @@ def _setup_authentication_info_handler() -> Callable[..., Dict[str, Any]]:
|
|
|
170
186
|
return dict(
|
|
171
187
|
itertools.chain(
|
|
172
188
|
(get_env() if include_env else []),
|
|
173
|
-
|
|
189
|
+
retrieve_current_authentication_info(),
|
|
174
190
|
),
|
|
175
191
|
)
|
|
176
192
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
_singlestoredb_accel.pyd,sha256=
|
|
2
|
-
singlestoredb/__init__.py,sha256=
|
|
1
|
+
_singlestoredb_accel.pyd,sha256=JySQW9UIgy08VK7a0_0SsWZ6didExBbAyUUs4QIWxok,59904
|
|
2
|
+
singlestoredb/__init__.py,sha256=coTKAx_9TGFvUHphEf4cQk0Sd6wuK9ZrZuGjJmDVxw0,1697
|
|
3
3
|
singlestoredb/auth.py,sha256=RmYiH0Wlc2RXc4pTlRMysxtBI445ggCIwojWKC_eDLE,7844
|
|
4
4
|
singlestoredb/config.py,sha256=9pVmVEZ23NfJ3pokdBDA0cX3bwUz6SbuT4AZWAcIPR4,12235
|
|
5
5
|
singlestoredb/connection.py,sha256=xdjf6HX-BS9BmwdjA3IlKeZx_e691_dVFMY3GvX_v64,46629
|
|
@@ -38,7 +38,7 @@ singlestoredb/management/cluster.py,sha256=XfdBuTlrAG-mnW1BFKeoAr4YSE5IVgxLjbuBS
|
|
|
38
38
|
singlestoredb/management/manager.py,sha256=uGNrUe3zhuP-HUqdfwvy4MdEXTCmq-FZKjIwZSc3hOM,9096
|
|
39
39
|
singlestoredb/management/organization.py,sha256=MjZ_tIoJGZwF95yfQ_Adz8LHYwkrKyj3p5JHDk6rWHE,5187
|
|
40
40
|
singlestoredb/management/region.py,sha256=oGoLLS88dE1GmY7GCc0BV7X3f7bWwKQyeXOVBFmK9Pk,1678
|
|
41
|
-
singlestoredb/management/utils.py,sha256=
|
|
41
|
+
singlestoredb/management/utils.py,sha256=uXrKlMnzlHj3qWO2vWCJP9mykUzIfbBxzZNN2vdXCvo,11775
|
|
42
42
|
singlestoredb/management/workspace.py,sha256=BBNa3Af5IaUAwtzHWrNTJXoc8anXJ7FiWH9yIvtg79Q,63610
|
|
43
43
|
singlestoredb/mysql/__init__.py,sha256=CbpwzNUJPAmKPpIobC0-ugBta_RgHCMq7X7N75QLReY,4669
|
|
44
44
|
singlestoredb/mysql/_auth.py,sha256=YaqqyvAHmeraBv3BM207rNveUVPM-mPnW20ts_ynVWg,8341
|
|
@@ -115,9 +115,9 @@ singlestoredb/utils/events.py,sha256=rC9cHAetua_E1f-EiFkFM-gJzQSQIH5Uk-4sspC3KjI
|
|
|
115
115
|
singlestoredb/utils/mogrify.py,sha256=gCcn99-vgsGVjTUV7RHJ6hH4vCNrsGB_Xo4z8kiSPDQ,4201
|
|
116
116
|
singlestoredb/utils/results.py,sha256=wR70LhCqlobniZf52r67zYLBOKjWHQm68NAskdRQND8,15862
|
|
117
117
|
singlestoredb/utils/xdict.py,sha256=-wi1lSPTnY99fhVMBhPKJ8cCsQhNG4GMUfkEBDKYgCw,13321
|
|
118
|
-
singlestoredb-1.4.
|
|
119
|
-
singlestoredb-1.4.
|
|
120
|
-
singlestoredb-1.4.
|
|
121
|
-
singlestoredb-1.4.
|
|
122
|
-
singlestoredb-1.4.
|
|
123
|
-
singlestoredb-1.4.
|
|
118
|
+
singlestoredb-1.4.3.dist-info/LICENSE,sha256=Bojenzui8aPNjlF3w4ojguDP7sTf8vFV_9Gc2UAG1sg,11542
|
|
119
|
+
singlestoredb-1.4.3.dist-info/METADATA,sha256=JN_3ss7jeom5-_yVxjoSS-zCxNGwFTiqHEE5X991QZk,5710
|
|
120
|
+
singlestoredb-1.4.3.dist-info/WHEEL,sha256=c4k7z5HB0t-y0nBCv6KyJ6KCjn8SEGPddD0lhaPtU3E,96
|
|
121
|
+
singlestoredb-1.4.3.dist-info/entry_points.txt,sha256=bSLaTWB5zGjpVYPAaI46MkkDup0su-eb3uAhCNYuRV0,48
|
|
122
|
+
singlestoredb-1.4.3.dist-info/top_level.txt,sha256=SDtemIXf-Kp-_F2f_S6x0db33cHGOILdAEsIQZe2LZc,35
|
|
123
|
+
singlestoredb-1.4.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|