nucliadb-utils 2.46.1.post407__py3-none-any.whl → 2.46.2.post409__py3-none-any.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.
- nucliadb_utils/fastapi/versioning.py +1 -2
- nucliadb_utils/tests/asyncbenchmark.py +1 -2
- nucliadb_utils/tests/gcs.py +3 -3
- nucliadb_utils/tests/unit/test_authentication.py +5 -10
- nucliadb_utils/utilities.py +3 -3
- {nucliadb_utils-2.46.1.post407.dist-info → nucliadb_utils-2.46.2.post409.dist-info}/METADATA +3 -3
- {nucliadb_utils-2.46.1.post407.dist-info → nucliadb_utils-2.46.2.post409.dist-info}/RECORD +10 -10
- {nucliadb_utils-2.46.1.post407.dist-info → nucliadb_utils-2.46.2.post409.dist-info}/WHEEL +0 -0
- {nucliadb_utils-2.46.1.post407.dist-info → nucliadb_utils-2.46.2.post409.dist-info}/top_level.txt +0 -0
- {nucliadb_utils-2.46.1.post407.dist-info → nucliadb_utils-2.46.2.post409.dist-info}/zip-safe +0 -0
@@ -86,8 +86,7 @@ def VersionedFastAPI(
|
|
86
86
|
|
87
87
|
@parent_app.get(f"{prefix}/openapi.json", name=semver, tags=["Versions"])
|
88
88
|
@parent_app.get(f"{prefix}/docs", name=semver, tags=["Documentations"])
|
89
|
-
def noop() -> None:
|
90
|
-
...
|
89
|
+
def noop() -> None: ...
|
91
90
|
|
92
91
|
if enable_latest:
|
93
92
|
prefix = "/latest"
|
nucliadb_utils/tests/gcs.py
CHANGED
@@ -54,9 +54,9 @@ class GCS(BaseImage):
|
|
54
54
|
def get_image_options(self):
|
55
55
|
options = super().get_image_options()
|
56
56
|
options["ports"] = {str(self.port): str(self.port)}
|
57
|
-
options[
|
58
|
-
"
|
59
|
-
|
57
|
+
options["command"] = (
|
58
|
+
f"-scheme http -external-url http://{DOCKER_HOST}:{self.port} -port {self.port}"
|
59
|
+
)
|
60
60
|
return options
|
61
61
|
|
62
62
|
def check(self):
|
@@ -105,8 +105,7 @@ class TestRequires:
|
|
105
105
|
async def test_requires_async(self):
|
106
106
|
req = Request({"type": "http", "auth": Mock(scopes=["admin"])})
|
107
107
|
|
108
|
-
async def noop(request):
|
109
|
-
...
|
108
|
+
async def noop(request): ...
|
110
109
|
|
111
110
|
assert await authentication.requires(["admin"])(noop)(request=req) is None
|
112
111
|
|
@@ -114,8 +113,7 @@ class TestRequires:
|
|
114
113
|
async def test_requires_async_returns_status(self):
|
115
114
|
req = Request({"type": "http", "auth": Mock(scopes=["admin"])})
|
116
115
|
|
117
|
-
async def noop(request):
|
118
|
-
...
|
116
|
+
async def noop(request): ...
|
119
117
|
|
120
118
|
with pytest.raises(HTTPException):
|
121
119
|
assert await authentication.requires(["foobar"])(noop)(request=req)
|
@@ -124,8 +122,7 @@ class TestRequires:
|
|
124
122
|
async def test_requires_async_returns_redirect(self):
|
125
123
|
req = Request({"type": "http", "auth": Mock(scopes=["admin"])})
|
126
124
|
|
127
|
-
async def noop(request):
|
128
|
-
...
|
125
|
+
async def noop(request): ...
|
129
126
|
|
130
127
|
with patch.object(req, "url_for", return_value="http://foobar"):
|
131
128
|
resp = await authentication.requires(["foobar"], redirect="/foobar")(noop)(
|
@@ -142,8 +139,7 @@ class TestRequires:
|
|
142
139
|
send=AsyncMock(),
|
143
140
|
)
|
144
141
|
|
145
|
-
async def noop(websocket):
|
146
|
-
...
|
142
|
+
async def noop(websocket): ...
|
147
143
|
|
148
144
|
assert await authentication.requires(["admin"])(noop)(req) is None
|
149
145
|
|
@@ -155,8 +151,7 @@ class TestRequires:
|
|
155
151
|
send=AsyncMock(),
|
156
152
|
)
|
157
153
|
|
158
|
-
async def noop(websocket):
|
159
|
-
...
|
154
|
+
async def noop(websocket): ...
|
160
155
|
|
161
156
|
with patch.object(req, "close", return_value=None):
|
162
157
|
assert await authentication.requires(["notallowed"])(noop)(req) is None
|
nucliadb_utils/utilities.py
CHANGED
@@ -258,9 +258,9 @@ async def start_transaction_utility(
|
|
258
258
|
return current
|
259
259
|
|
260
260
|
if transaction_settings.transaction_local:
|
261
|
-
transaction_utility: Union[
|
262
|
-
LocalTransactionUtility
|
263
|
-
|
261
|
+
transaction_utility: Union[LocalTransactionUtility, TransactionUtility] = (
|
262
|
+
LocalTransactionUtility()
|
263
|
+
)
|
264
264
|
elif transaction_settings.transaction_jetstream_servers is not None:
|
265
265
|
transaction_utility = TransactionUtility(
|
266
266
|
nats_creds=transaction_settings.transaction_jetstream_auth,
|
{nucliadb_utils-2.46.1.post407.dist-info → nucliadb_utils-2.46.2.post409.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: nucliadb-utils
|
3
|
-
Version: 2.46.
|
3
|
+
Version: 2.46.2.post409
|
4
4
|
Home-page: https://nuclia.com
|
5
5
|
License: BSD
|
6
6
|
Classifier: Development Status :: 4 - Beta
|
@@ -21,8 +21,8 @@ Requires-Dist: nats-py[nkeys] >=2.6.0
|
|
21
21
|
Requires-Dist: pyjwt >=2.4.0
|
22
22
|
Requires-Dist: memorylru >=1.1.2
|
23
23
|
Requires-Dist: mrflagly
|
24
|
-
Requires-Dist: nucliadb-protos >=2.46.
|
25
|
-
Requires-Dist: nucliadb-telemetry >=2.46.
|
24
|
+
Requires-Dist: nucliadb-protos >=2.46.2.post409
|
25
|
+
Requires-Dist: nucliadb-telemetry >=2.46.2.post409
|
26
26
|
Provides-Extra: cache
|
27
27
|
Requires-Dist: redis >=4.3.4 ; extra == 'cache'
|
28
28
|
Requires-Dist: orjson >=3.6.7 ; extra == 'cache'
|
@@ -16,7 +16,7 @@ nucliadb_utils/settings.py,sha256=87sH3lSKvXhMVBvCkJYDRj_6MYvc5mWcqFUYcS740f0,72
|
|
16
16
|
nucliadb_utils/signals.py,sha256=KxV4UUNWf4wrEbt1iJzy6PxYuTEhi6IRisKlYlq5OtM,2702
|
17
17
|
nucliadb_utils/store.py,sha256=kQ35HemE0v4_Qg6xVqNIJi8vSFAYQtwI3rDtMsNy62Y,890
|
18
18
|
nucliadb_utils/transaction.py,sha256=CQpsuF-E2omh4gGMxXCn0dv7vL9ctxooWpSgWGbGfBA,7212
|
19
|
-
nucliadb_utils/utilities.py,sha256
|
19
|
+
nucliadb_utils/utilities.py,sha256=sR-GXi1oc1D9Hxs3vLS2PTNYRLi8U_NWJZTfm9b8iv0,13981
|
20
20
|
nucliadb_utils/audit/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
|
21
21
|
nucliadb_utils/audit/audit.py,sha256=v-e9R4hc6iVjtN2JeZk1MAhV5x_OC5s59uSv-kF3qFk,2698
|
22
22
|
nucliadb_utils/audit/basic.py,sha256=grlJpq5Z2LSkwgxY3PaaLb9e8asuevMPOgrzG1UcUDI,3267
|
@@ -29,7 +29,7 @@ nucliadb_utils/cache/settings.py,sha256=tG8SWwnJjeE_AovEgCisfxhl-hzklm1Yb9nvwYSg
|
|
29
29
|
nucliadb_utils/fastapi/__init__.py,sha256=itSI7dtTwFP55YMX4iK7JzdMHS5CQVUiB1XzQu4UBh8,833
|
30
30
|
nucliadb_utils/fastapi/openapi.py,sha256=b0pLuri0QuzQd0elDyOVXM42YYmES_cmT-jEfsQ1G6Y,1737
|
31
31
|
nucliadb_utils/fastapi/run.py,sha256=n6vOX64QqF1I5n4UlKnpm_ZJ24rmwfRGi-J9YMGpZzA,3631
|
32
|
-
nucliadb_utils/fastapi/versioning.py,sha256=
|
32
|
+
nucliadb_utils/fastapi/versioning.py,sha256=uOVdKl8GzBt8L1YnU5GjBsNeDdFV2yrjjYFEGqUXRgQ,3774
|
33
33
|
nucliadb_utils/storages/__init__.py,sha256=5Qc8AUWiJv9_JbGCBpAn88AIJhwDlm0OPQpg2ZdRL4U,872
|
34
34
|
nucliadb_utils/storages/exceptions.py,sha256=n6aBOyurWMo8mXd1XY6Psgno4VfXJ9TRbxCy67c08-g,2417
|
35
35
|
nucliadb_utils/storages/gcs.py,sha256=-M-abojobXGwZaS1kuFXRBxwashsAaTXMStjx3QpX4U,27076
|
@@ -40,9 +40,9 @@ nucliadb_utils/storages/s3.py,sha256=O2cxLQQiUG8UuicY-awB-enM7NpaS1jnSyhuNlglXMo
|
|
40
40
|
nucliadb_utils/storages/settings.py,sha256=bUl3D7To-s3OVXPFFF7LwJbEKGF2WvDM14pwqQdkyoQ,1276
|
41
41
|
nucliadb_utils/storages/storage.py,sha256=W8pDa5pXTvfDY5ugEPVESpnkpDE7hnj7jnQQaKdlXk8,20559
|
42
42
|
nucliadb_utils/tests/__init__.py,sha256=Oo9CAE7B0eW5VHn8sHd6o30SQzOWUhktLPRXdlDOleA,1456
|
43
|
-
nucliadb_utils/tests/asyncbenchmark.py,sha256=
|
43
|
+
nucliadb_utils/tests/asyncbenchmark.py,sha256=tgqWf776dyBHmekyOnmXWDB8qlRVzSKNYvBf19xVwSU,10695
|
44
44
|
nucliadb_utils/tests/conftest.py,sha256=gPYVuVhj_e6Aeanb91wvUerwuxZgaS7d3luIBRQFIU0,1876
|
45
|
-
nucliadb_utils/tests/gcs.py,sha256=
|
45
|
+
nucliadb_utils/tests/gcs.py,sha256=1dbt_zG3uZPZDF3Nyrgrvi_bsKmafAUOm4Pu4bzt7wI,3098
|
46
46
|
nucliadb_utils/tests/indexing.py,sha256=YW2QhkhO9Q_8A4kKWJaWSvXvyQ_AiAwY1VylcfVQFxk,1513
|
47
47
|
nucliadb_utils/tests/local.py,sha256=c3gZJJWmvOftruJkIQIwB3q_hh3uxEhqGIAVWim1Bbk,1343
|
48
48
|
nucliadb_utils/tests/nats.py,sha256=lgRe6YH9LSoI7XgcyKAC2VTSAtuu8EeMve0jWWC_kOY,7701
|
@@ -50,7 +50,7 @@ nucliadb_utils/tests/pg.py,sha256=HBpvaNDs9T_L55tvJCJTPnsCDrB8ehI_9HRYz6SPWNE,18
|
|
50
50
|
nucliadb_utils/tests/s3.py,sha256=YB8QqDaBXxyhHonEHmeBbRRDmvB7sTOaKBSi8KBGokg,2330
|
51
51
|
nucliadb_utils/tests/unit/__init__.py,sha256=itSI7dtTwFP55YMX4iK7JzdMHS5CQVUiB1XzQu4UBh8,833
|
52
52
|
nucliadb_utils/tests/unit/test_asyncio_utils.py,sha256=ETAkzQ-QLCEZW9ZtAslzoS0xRFMlN2-bqibUjJm-gRo,2359
|
53
|
-
nucliadb_utils/tests/unit/test_authentication.py,sha256=
|
53
|
+
nucliadb_utils/tests/unit/test_authentication.py,sha256=ujqeTHMt4kEBXmuuwLT03TeanZhob_bvg8lrfmJQT40,5301
|
54
54
|
nucliadb_utils/tests/unit/test_helpers.py,sha256=w0Yxo1NteBZi_iSRVZ3vv4J-o3Z7SJIz1q6yyXGzQLg,1574
|
55
55
|
nucliadb_utils/tests/unit/test_nats.py,sha256=4lLQOucQGwL9lubTfNFqXhXtua9u4lTlWjF_lFCYORc,4436
|
56
56
|
nucliadb_utils/tests/unit/test_run.py,sha256=VHeojVBj_AfV_uNch9eEi4zCT-O94VKjwb_O-UZgqpA,1910
|
@@ -63,8 +63,8 @@ nucliadb_utils/tests/unit/storages/test_aws.py,sha256=GCsB_jwCUNV3Ogt8TZZEmNKAHv
|
|
63
63
|
nucliadb_utils/tests/unit/storages/test_gcs.py,sha256=2XzJwgNpfjVGjtE-QdZhu3ayuT1EMEXINdM-_SatPCY,3554
|
64
64
|
nucliadb_utils/tests/unit/storages/test_pg.py,sha256=sJfUttMSzq8W1XYolAUcMxl_R5HcEzb5fpCklPeMJiY,17000
|
65
65
|
nucliadb_utils/tests/unit/storages/test_storage.py,sha256=VFpRq6Q6BjnIrBQCumYzR8DQUacwhxt5CzTKSlqqD24,6892
|
66
|
-
nucliadb_utils-2.46.
|
67
|
-
nucliadb_utils-2.46.
|
68
|
-
nucliadb_utils-2.46.
|
69
|
-
nucliadb_utils-2.46.
|
70
|
-
nucliadb_utils-2.46.
|
66
|
+
nucliadb_utils-2.46.2.post409.dist-info/METADATA,sha256=VXcsRspTEDZpVjBTMbH32wli-bwK1oMnr0mGaMDkOPA,1978
|
67
|
+
nucliadb_utils-2.46.2.post409.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
68
|
+
nucliadb_utils-2.46.2.post409.dist-info/top_level.txt,sha256=fE3vJtALTfgh7bcAWcNhcfXkNPp_eVVpbKK-2IYua3E,15
|
69
|
+
nucliadb_utils-2.46.2.post409.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
70
|
+
nucliadb_utils-2.46.2.post409.dist-info/RECORD,,
|
File without changes
|
{nucliadb_utils-2.46.1.post407.dist-info → nucliadb_utils-2.46.2.post409.dist-info}/top_level.txt
RENAMED
File without changes
|
{nucliadb_utils-2.46.1.post407.dist-info → nucliadb_utils-2.46.2.post409.dist-info}/zip-safe
RENAMED
File without changes
|