malevich-coretools 0.3.51__py3-none-any.whl → 0.3.53__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.
Potentially problematic release.
This version of malevich-coretools might be problematic. Click here for more details.
- malevich_coretools/funcs/funcs.py +12 -5
- malevich_coretools/funcs/helpers.py +4 -4
- malevich_coretools/utils.py +181 -181
- {malevich_coretools-0.3.51.dist-info → malevich_coretools-0.3.53.dist-info}/METADATA +1 -1
- {malevich_coretools-0.3.51.dist-info → malevich_coretools-0.3.53.dist-info}/RECORD +8 -8
- {malevich_coretools-0.3.51.dist-info → malevich_coretools-0.3.53.dist-info}/WHEEL +1 -1
- {malevich_coretools-0.3.51.dist-info → malevich_coretools-0.3.53.dist-info}/licenses/LICENSE +0 -0
- {malevich_coretools-0.3.51.dist-info → malevich_coretools-0.3.53.dist-info}/top_level.txt +0 -0
|
@@ -7,6 +7,7 @@ from typing import Any, Callable, Optional
|
|
|
7
7
|
|
|
8
8
|
import aiohttp
|
|
9
9
|
import requests
|
|
10
|
+
from aiohttp.client_exceptions import ClientResponseError
|
|
10
11
|
from requests.models import Response
|
|
11
12
|
|
|
12
13
|
from malevich_coretools.abstract.abstract import * # noqa: F403
|
|
@@ -1630,29 +1631,35 @@ async def __get_result(id: str, is_text: bool = True, check_time: float = LONG_S
|
|
|
1630
1631
|
|
|
1631
1632
|
async def __async_check_response(response: aiohttp.ClientResponse, show_func: Optional[Callable]=None, path: Optional[str] = None): # noqa: ANN202
|
|
1632
1633
|
if not response.ok:
|
|
1634
|
+
text = await response.text()
|
|
1633
1635
|
if show_func is None:
|
|
1634
1636
|
if path is not None:
|
|
1635
|
-
text = await response.text()
|
|
1636
1637
|
msg = f"failed: {text}" if len(text) > 0 else "failed"
|
|
1637
1638
|
Config.logger.error(f"{path} {msg}")
|
|
1638
1639
|
else:
|
|
1639
|
-
Config.logger.error(
|
|
1640
|
+
Config.logger.error(text)
|
|
1640
1641
|
else:
|
|
1641
1642
|
if path is not None:
|
|
1642
1643
|
Config.logger.error(f"{path} failed")
|
|
1643
|
-
show_func(
|
|
1644
|
+
show_func(text, err=True)
|
|
1645
|
+
|
|
1646
|
+
if response.reason is not None and len(response.reason) == 0:
|
|
1647
|
+
response.reason = text
|
|
1644
1648
|
response.raise_for_status()
|
|
1645
1649
|
|
|
1646
1650
|
|
|
1647
1651
|
def __check_response(path: str, response: Response, show_func: Optional[Callable]=None): # noqa: ANN202
|
|
1648
1652
|
if response.status_code >= 400:
|
|
1653
|
+
text = response.text
|
|
1649
1654
|
if show_func is None:
|
|
1650
|
-
text = response.text
|
|
1651
1655
|
msg = f"failed: {text}" if len(text) > 0 else "failed"
|
|
1652
1656
|
Config.logger.error(f"{path} {msg}")
|
|
1653
1657
|
else:
|
|
1654
1658
|
Config.logger.error(f"{path} failed")
|
|
1655
|
-
show_func(
|
|
1659
|
+
show_func(text, err=True)
|
|
1660
|
+
|
|
1661
|
+
if response.reason is not None and len(response.reason) == 0:
|
|
1662
|
+
response.reason = text
|
|
1656
1663
|
response.raise_for_status()
|
|
1657
1664
|
|
|
1658
1665
|
|
|
@@ -38,7 +38,7 @@ def create_collection_from_file_df(
|
|
|
38
38
|
name: Optional[str],
|
|
39
39
|
metadata: Optional[Union[Dict[str, Any], str]],
|
|
40
40
|
*args,
|
|
41
|
-
is_async: Literal[False],
|
|
41
|
+
is_async: Literal[False] = False,
|
|
42
42
|
**kwargs
|
|
43
43
|
) -> Alias.Id:
|
|
44
44
|
pass
|
|
@@ -80,7 +80,7 @@ def update_collection_from_file_df(
|
|
|
80
80
|
name: Optional[str],
|
|
81
81
|
metadata: Optional[Union[Dict[str, Any], str]],
|
|
82
82
|
*args,
|
|
83
|
-
is_async: Literal[False],
|
|
83
|
+
is_async: Literal[False] = False,
|
|
84
84
|
**kwargs
|
|
85
85
|
) -> Alias.Id:
|
|
86
86
|
pass
|
|
@@ -154,7 +154,7 @@ def create_collection_from_df(
|
|
|
154
154
|
metadata: Optional[Union[Dict[str, Any], str]],
|
|
155
155
|
batcher: Optional[Batcher] = None,
|
|
156
156
|
*args,
|
|
157
|
-
is_async: Literal[False],
|
|
157
|
+
is_async: Literal[False] = False,
|
|
158
158
|
**kwargs
|
|
159
159
|
) -> Alias.Id:
|
|
160
160
|
pass
|
|
@@ -200,7 +200,7 @@ def update_collection_from_df(
|
|
|
200
200
|
metadata: Optional[Union[Dict[str, Any], str]],
|
|
201
201
|
batcher: Optional[Batcher] = None,
|
|
202
202
|
*args,
|
|
203
|
-
is_async: Literal[False],
|
|
203
|
+
is_async: Literal[False] = False,
|
|
204
204
|
**kwargs
|
|
205
205
|
) -> Alias.Id:
|
|
206
206
|
pass
|