tinybird 0.0.1.dev142__py3-none-any.whl → 0.0.1.dev143__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 tinybird might be problematic. Click here for more details.

tinybird/tb/__cli__.py CHANGED
@@ -4,5 +4,5 @@ __description__ = 'Tinybird Command Line Tool'
4
4
  __url__ = 'https://www.tinybird.co/docs/cli/introduction.html'
5
5
  __author__ = 'Tinybird'
6
6
  __author_email__ = 'support@tinybird.co'
7
- __version__ = '0.0.1.dev142'
8
- __revision__ = 'f5afbf8'
7
+ __version__ = '0.0.1.dev143'
8
+ __revision__ = '1424df6'
@@ -0,0 +1,26 @@
1
+ from typing import Optional
2
+
3
+ import requests
4
+
5
+ from tinybird.feedback_manager import FeedbackManager
6
+ from tinybird.syncasync import sync_to_async
7
+ from tinybird.tb.modules.common import getenv_bool
8
+ from tinybird.tb.modules.exceptions import CLIException
9
+
10
+ PYPY_URL = "https://pypi.org/pypi/tinybird/json"
11
+ requests_get = sync_to_async(requests.get, thread_sensitive=False)
12
+
13
+
14
+ class CheckPypi:
15
+ async def get_latest_version(self) -> Optional[str]:
16
+ version: Optional[str] = None
17
+ try:
18
+ disable_ssl: bool = getenv_bool("TB_DISABLE_SSL_CHECKS", False)
19
+ response: requests.Response = await requests_get(PYPY_URL, verify=not disable_ssl)
20
+ if response.status_code != 200:
21
+ raise CLIException(FeedbackManager.error_exception(error=response.content.decode("utf-8")))
22
+ version = response.json()["info"]["version"]
23
+ except Exception as e:
24
+ raise CLIException(FeedbackManager.error_exception(error=str(e)))
25
+
26
+ return version
@@ -18,6 +18,7 @@ import humanfriendly
18
18
  from click import Context
19
19
 
20
20
  from tinybird.tb import __cli__
21
+ from tinybird.tb.check_pypi import CheckPypi
21
22
  from tinybird.tb.client import (
22
23
  AuthException,
23
24
  AuthNoTokenException,
@@ -97,8 +98,6 @@ async def cli(
97
98
  click.echo(FeedbackManager.warning_disabled_ssl_checks())
98
99
 
99
100
  if not environ.get("PYTEST", None) and version_warning and not token:
100
- from tinybird.check_pypi import CheckPypi
101
-
102
101
  latest_version = await CheckPypi().get_latest_version()
103
102
 
104
103
  if "x.y.z" in CURRENT_VERSION:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: tinybird
3
- Version: 0.0.1.dev142
3
+ Version: 0.0.1.dev143
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/cli/introduction.html
6
6
  Author: Tinybird
@@ -12,14 +12,15 @@ tinybird/syncasync.py,sha256=IPnOx6lMbf9SNddN1eBtssg8vCLHMt76SuZ6YNYm-Yk,27761
12
12
  tinybird/tornado_template.py,sha256=jjNVDMnkYFWXflmT8KU_Ssbo5vR8KQq3EJMk5vYgXRw,41959
13
13
  tinybird/ch_utils/constants.py,sha256=aYvg2C_WxYWsnqPdZB1ZFoIr8ZY-XjUXYyHKE9Ansj0,3890
14
14
  tinybird/ch_utils/engine.py,sha256=BZuPM7MFS7vaEKK5tOMR2bwSAgJudPrJt27uVEwZmTY,40512
15
- tinybird/tb/__cli__.py,sha256=FiDNG4mtU95TLlzBQHhR-AONnTf_kHYcJ-aOS9NiGJY,252
15
+ tinybird/tb/__cli__.py,sha256=9EeTlKgqbi_u5xvGReU9kR6x0ytXafOiTEjw0iYH0MU,252
16
+ tinybird/tb/check_pypi.py,sha256=rW4QmDRbtgKdUUwJCnBkVjmTjZSZGN-XgZhx7vMkC0w,1009
16
17
  tinybird/tb/cli.py,sha256=6X7pMjscB1yDsnzBaZBnF4pCBJ7tZgCC500CtPEP-qQ,1106
17
18
  tinybird/tb/client.py,sha256=aaPKq5C77e72kR7IMv9WrvnvNki8mKMOTi9EsCp0eUc,55962
18
19
  tinybird/tb/config.py,sha256=HLMHbJg6BjeGZ2KiJA-BCCVnk8w959xsSaDEEePakZg,3981
19
20
  tinybird/tb/modules/auth.py,sha256=_OeYnmTH83lnqCgQEdS6K0bx1KBUeRmZk2M7JnRmWpk,9037
20
21
  tinybird/tb/modules/build.py,sha256=5SX59ssq0KaRrgzk21KmYUnB6xOdQ_O59n7rxFBQQ1Y,17393
21
22
  tinybird/tb/modules/cicd.py,sha256=Ug7LijuHDIqKR6rm8OLZispWp75Zv6TyonAme8K9jaI,7114
22
- tinybird/tb/modules/cli.py,sha256=AHtGb8UHpuJwD8CPP9MuMvMxrV-NXOb0nP2N9EvTq7c,14081
23
+ tinybird/tb/modules/cli.py,sha256=V8fC0GLt5HWtOTk6TOZM5xUAY9PoH05kyJxE6Zu4MT4,14075
23
24
  tinybird/tb/modules/common.py,sha256=jThkqkIJ_blXXUZ2-3HdjG1dpLKOCE_TjXA0jSesIx0,85712
24
25
  tinybird/tb/modules/config.py,sha256=ziqW_t_mRVvWOd85VoB4vKyvgMkEfpXDf9H4v38p2xc,11422
25
26
  tinybird/tb/modules/connection.py,sha256=7oOR7x4PhBcm1ETFFCH2YJ_3oeGXjAbmx1cnZX9_L70,9014
@@ -79,8 +80,8 @@ tinybird/tb_cli_modules/config.py,sha256=IsgdtFRnUrkY8-Zo32lmk6O7u3bHie1QCxLwgp4
79
80
  tinybird/tb_cli_modules/exceptions.py,sha256=pmucP4kTF4irIt7dXiG-FcnI-o3mvDusPmch1L8RCWk,3367
80
81
  tinybird/tb_cli_modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGMk,166
81
82
  tinybird/tb_cli_modules/telemetry.py,sha256=Hh2Io8ZPROSunbOLuMvuIFU4TqwWPmQTqal4WS09K1A,10449
82
- tinybird-0.0.1.dev142.dist-info/METADATA,sha256=cLQ2idtXHX8zrnepIevHMdqAhr-OkgPdom1t_SGM050,1612
83
- tinybird-0.0.1.dev142.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
84
- tinybird-0.0.1.dev142.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
85
- tinybird-0.0.1.dev142.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
86
- tinybird-0.0.1.dev142.dist-info/RECORD,,
83
+ tinybird-0.0.1.dev143.dist-info/METADATA,sha256=hS0Itd2jL-PCljQBtYEQgFFD0a0PvZlSvrQzjJdghpE,1612
84
+ tinybird-0.0.1.dev143.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
85
+ tinybird-0.0.1.dev143.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
86
+ tinybird-0.0.1.dev143.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
87
+ tinybird-0.0.1.dev143.dist-info/RECORD,,