tinybird-cli 5.13.2.dev0__tar.gz → 5.13.2.dev1__tar.gz

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.
Files changed (48) hide show
  1. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/PKG-INFO +7 -1
  2. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/__cli__.py +2 -2
  3. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/config.py +2 -1
  4. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/datafile.py +1 -1
  5. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/datatypes.py +46 -57
  6. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/git_settings.py +4 -4
  7. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/sql.py +9 -0
  8. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/sql_toolset.py +17 -3
  9. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/syncasync.py +1 -1
  10. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/tb_cli_modules/common.py +2 -2
  11. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/tb_cli_modules/config.py +5 -5
  12. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/tb_cli_modules/datasource.py +1 -1
  13. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/tornado_template.py +1 -3
  14. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird_cli.egg-info/PKG-INFO +7 -1
  15. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/setup.cfg +0 -0
  16. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/ch_utils/constants.py +0 -0
  17. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/ch_utils/engine.py +0 -0
  18. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/check_pypi.py +0 -0
  19. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/client.py +0 -0
  20. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/connectors.py +0 -0
  21. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/context.py +0 -0
  22. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/feedback_manager.py +0 -0
  23. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/sql_template.py +0 -0
  24. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/sql_template_fmt.py +0 -0
  25. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/tb_cli.py +0 -0
  26. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/tb_cli_modules/auth.py +0 -0
  27. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/tb_cli_modules/branch.py +0 -0
  28. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/tb_cli_modules/cicd.py +0 -0
  29. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/tb_cli_modules/cli.py +0 -0
  30. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/tb_cli_modules/connection.py +0 -0
  31. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/tb_cli_modules/exceptions.py +0 -0
  32. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/tb_cli_modules/fmt.py +0 -0
  33. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/tb_cli_modules/job.py +0 -0
  34. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/tb_cli_modules/pipe.py +0 -0
  35. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/tb_cli_modules/regions.py +0 -0
  36. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/tb_cli_modules/tag.py +0 -0
  37. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/tb_cli_modules/telemetry.py +0 -0
  38. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/tb_cli_modules/test.py +0 -0
  39. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
  40. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
  41. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/tb_cli_modules/token.py +0 -0
  42. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/tb_cli_modules/workspace.py +0 -0
  43. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird/tb_cli_modules/workspace_members.py +0 -0
  44. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird_cli.egg-info/SOURCES.txt +0 -0
  45. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird_cli.egg-info/dependency_links.txt +0 -0
  46. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird_cli.egg-info/entry_points.txt +0 -0
  47. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird_cli.egg-info/requires.txt +0 -0
  48. {tinybird-cli-5.13.2.dev0 → tinybird-cli-5.13.2.dev1}/tinybird_cli.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tinybird-cli
3
- Version: 5.13.2.dev0
3
+ Version: 5.13.2.dev1
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/cli/introduction.html
6
6
  Author: Tinybird
@@ -18,6 +18,12 @@ The Tinybird command-line tool allows you to use all the Tinybird functionality
18
18
  Changelog
19
19
  ----------
20
20
 
21
+ 5.13.2.dev1
22
+ ***********
23
+
24
+ - Added `eu-west-1` region to the list of available regions.
25
+
26
+
21
27
  5.13.1
22
28
  ***********
23
29
 
@@ -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__ = '5.13.2.dev0'
8
- __revision__ = 'ba42b82'
7
+ __version__ = '5.13.2.dev1'
8
+ __revision__ = '26dd72d'
@@ -29,6 +29,7 @@ LEGACY_HOSTS = {
29
29
  "https://api.us-east.aws.tinybird.co": "https://app.tinybird.co/aws/us-east-1",
30
30
  "https://api.us-west-2.aws.tinybird.co": "https://app.tinybird.co/aws/us-west-2",
31
31
  "https://api.eu-central-1.aws.tinybird.co": "https://app.tinybird.co/aws/eu-central-1",
32
+ "https://api.eu-west-1.aws.tinybird.co": "https://app.tinybird.co/aws/eu-west-1",
32
33
  "https://api.ap-east.aws.tinybird.co": "https://app.tinybird.co/aws/ap-east",
33
34
  "https://api.wadus1.gcp.tinybird.co": "https://app.wadus.tinybird.co/gcp/wadus1",
34
35
  "https://api.wadus2.gcp.tinybird.co": "https://app.wadus.tinybird.co/gcp/wadus2",
@@ -83,7 +84,7 @@ async def get_config(host: str, token: Optional[str], semver: Optional[str] = No
83
84
  async with aiofiles.open(config_file) as file:
84
85
  res = await file.read()
85
86
  config = json.loads(res)
86
- except IOError:
87
+ except OSError:
87
88
  pass
88
89
  except json.decoder.JSONDecodeError:
89
90
  click.echo(FeedbackManager.error_load_file_config(config_file=config_file))
@@ -524,7 +524,7 @@ class CLIGitRelease:
524
524
  self, tb_client: TinyB, current_ws: Dict[str, Any], commit: Optional[str] = None
525
525
  ) -> Dict[str, Any]:
526
526
  release = await tb_client.workspace_commit_update(
527
- current_ws["id"], self.head().commit.hexsha if not commit else commit
527
+ current_ws["id"], commit if commit else self.head().commit.hexsha
528
528
  )
529
529
  return release
530
530
 
@@ -2,6 +2,7 @@ import ast
2
2
  import decimal
3
3
  import re
4
4
  from decimal import Decimal
5
+ from typing import Callable, Dict, List, Optional, Tuple
5
6
 
6
7
  datetime64_patterns = [
7
8
  r"\d\d\d\d.\d\d.\d\d(T|\s)\d\d:\d\d:\d\d.\d\d\d",
@@ -53,7 +54,7 @@ bool_allowed_values = {
53
54
  }
54
55
 
55
56
 
56
- def is_type_datetime64(type_to_check):
57
+ def is_type_datetime64(type_to_check: str) -> bool:
57
58
  """
58
59
  >>> is_type_datetime64('DateTime64')
59
60
  True
@@ -73,7 +74,7 @@ def is_type_datetime64(type_to_check):
73
74
  return re.match(datetime64_type_pattern, type_to_check) is not None
74
75
 
75
76
 
76
- def is_type_datetime(type_to_check):
77
+ def is_type_datetime(type_to_check: str) -> bool:
77
78
  """
78
79
  >>> is_type_datetime('DateTime')
79
80
  True
@@ -89,87 +90,87 @@ def is_type_datetime(type_to_check):
89
90
  return re.match(datetime_type_pattern, type_to_check) is not None
90
91
 
91
92
 
92
- def string_test(x):
93
+ def string_test(x: str) -> bool:
93
94
  return True
94
95
 
95
96
 
96
- def date_test(x):
97
- return re.match(r"\d\d\d\d-\d\d-\d\d$", x)
97
+ def date_test(x: str) -> bool:
98
+ return re.match(r"\d\d\d\d-\d\d-\d\d$", x) is not None
98
99
 
99
100
 
100
- def datetime64_test(x):
101
+ def datetime64_test(x: str) -> bool:
101
102
  return any([re.match(p, x) for p in datetime64_patterns])
102
103
 
103
104
 
104
- def datetime_test(x):
105
+ def datetime_test(x: str) -> bool:
105
106
  return any([re.match(p, x) for p in datetime_patterns])
106
107
 
107
108
 
108
- def int_8_test(x):
109
- return re.match(intx_re, x) and -int_8_max <= int(x) < int_8_max
109
+ def int_8_test(x: str) -> bool:
110
+ return re.match(intx_re, x) is not None and -int_8_max <= int(x) < int_8_max
110
111
 
111
112
 
112
- def int16_test(x):
113
- return re.match(intx_re, x) and -int16_max <= int(x) < int16_max
113
+ def int16_test(x: str) -> bool:
114
+ return re.match(intx_re, x) is not None and -int16_max <= int(x) < int16_max
114
115
 
115
116
 
116
- def int32_test(x):
117
- return re.match(intx_re, x) and -int32_max <= int(x) < int32_max
117
+ def int32_test(x: str) -> bool:
118
+ return re.match(intx_re, x) is not None and -int32_max <= int(x) < int32_max
118
119
 
119
120
 
120
- def int64_test(x):
121
- return re.match(intx_re, x) and -int64_max <= int(x) < int64_max
121
+ def int64_test(x: str) -> bool:
122
+ return re.match(intx_re, x) is not None and -int64_max <= int(x) < int64_max
122
123
 
123
124
 
124
- def int128_test(x):
125
- return re.match(intx_re, x) and -int128_max <= int(x) < int128_max
125
+ def int128_test(x: str) -> bool:
126
+ return re.match(intx_re, x) is not None and -int128_max <= int(x) < int128_max
126
127
 
127
128
 
128
- def int256_test(x):
129
- return re.match(intx_re, x) and -int256_max <= int(x) < int256_max
129
+ def int256_test(x: str) -> bool:
130
+ return re.match(intx_re, x) is not None and -int256_max <= int(x) < int256_max
130
131
 
131
132
 
132
- def uint_8_test(x):
133
- return re.match(uintx_re, x) and 0 <= int(x) < uint_8_max
133
+ def uint_8_test(x: str) -> bool:
134
+ return re.match(uintx_re, x) is not None and 0 <= int(x) < uint_8_max
134
135
 
135
136
 
136
- def uint16_test(x):
137
- return re.match(uintx_re, x) and 0 <= int(x) < uint16_max
137
+ def uint16_test(x: str) -> bool:
138
+ return re.match(uintx_re, x) is not None and 0 <= int(x) < uint16_max
138
139
 
139
140
 
140
- def uint32_test(x):
141
- return re.match(uintx_re, x) and 0 <= int(x) < uint32_max
141
+ def uint32_test(x: str) -> bool:
142
+ return re.match(uintx_re, x) is not None and 0 <= int(x) < uint32_max
142
143
 
143
144
 
144
- def uint64_test(x):
145
- return re.match(uintx_re, x) and 0 <= int(x) < uint64_max
145
+ def uint64_test(x: str) -> bool:
146
+ return re.match(uintx_re, x) is not None and 0 <= int(x) < uint64_max
146
147
 
147
148
 
148
- def uint128_test(x):
149
- return re.match(intx_re, x) and 0 <= int(x) < uint128_max
149
+ def uint128_test(x: str) -> bool:
150
+ return re.match(intx_re, x) is not None and 0 <= int(x) < uint128_max
150
151
 
151
152
 
152
- def uint256_test(x):
153
- return re.match(intx_re, x) and 0 <= int(x) < uint256_max
153
+ def uint256_test(x: str) -> bool:
154
+ return re.match(intx_re, x) is not None and 0 <= int(x) < uint256_max
154
155
 
155
156
 
156
- def float_test(x):
157
+ def float_test(x: str) -> bool:
157
158
  return "_" not in x and type_test(x, float)
158
159
 
159
160
 
160
- def float32_test(x):
161
+ def float32_test(x: str) -> bool:
161
162
  return "_" not in x and type_test(x, float) and -float32_max <= float(x) < float32_max
162
163
 
163
164
 
164
- def float64_test(x):
165
+ def float64_test(x: str) -> bool:
165
166
  return "_" not in x and type_test(x, float) and -float64_max < float(x) < float64_max
166
167
 
167
168
 
168
- def bool_test(x):
169
+ def bool_test(x: str) -> bool:
169
170
  return x in bool_allowed_values
170
171
 
171
172
 
172
- def test_numeric_testers(fn, n):
173
+ def test_numeric_testers(fn: Callable[[str], bool], n: int) -> bool:
173
174
  """
174
175
  >>> test_numeric_testers(int32_test, (2**31)-1)
175
176
  True
@@ -192,7 +193,7 @@ def test_numeric_testers(fn, n):
192
193
  return fn(str(n))
193
194
 
194
195
 
195
- def array_test(_type_test):
196
+ def array_test(_type_test: type) -> Callable[[str], bool]:
196
197
  """
197
198
  >>> array_test(str)("['blabla']")
198
199
  True
@@ -220,7 +221,7 @@ def array_test(_type_test):
220
221
  False
221
222
  """
222
223
 
223
- def _test(x):
224
+ def _test(x: str) -> bool:
224
225
  if x[0] != "[":
225
226
  return False
226
227
  try:
@@ -234,7 +235,7 @@ def array_test(_type_test):
234
235
  return _test
235
236
 
236
237
 
237
- numbers_types = (
238
+ numbers_types: Tuple[str, ...] = (
238
239
  "Int8",
239
240
  "UInt8",
240
241
  "Int16",
@@ -253,7 +254,7 @@ numbers_types = (
253
254
 
254
255
  # Use guessers for discovering types
255
256
  # I.e., when you have to take into consideration things like float precision
256
- guessers = {
257
+ guessers: Dict[str, Callable[[str], bool]] = {
257
258
  "DateTime64": datetime64_test,
258
259
  "DateTime": datetime_test,
259
260
  "Date": date_test,
@@ -274,7 +275,7 @@ guessers = {
274
275
 
275
276
  # Use testers validating a value against a type
276
277
  # I.e., you already know the type and you need to check if a value fits there
277
- testers = {
278
+ testers: Dict[str, Callable[[str], bool]] = {
278
279
  "DateTime64": datetime64_test,
279
280
  "DateTime": datetime_test,
280
281
  "Date": date_test,
@@ -300,7 +301,7 @@ testers = {
300
301
 
301
302
 
302
303
  # Search for `canBeInsideNullable` under CH code and see which ones are true.
303
- nullable_types = [
304
+ nullable_types: List[str] = [
304
305
  "Date",
305
306
  "Date32",
306
307
  "DateTime",
@@ -340,7 +341,7 @@ nullable_types = [
340
341
  ]
341
342
 
342
343
 
343
- def type_test(i, t):
344
+ def type_test(i: str, t: type) -> bool:
344
345
  try:
345
346
  t(i)
346
347
  return True
@@ -348,7 +349,7 @@ def type_test(i, t):
348
349
  return False
349
350
 
350
351
 
351
- def parse_decimal_type(typ):
352
+ def parse_decimal_type(typ: str) -> Optional[Tuple[int, int, int]]:
352
353
  """
353
354
  >>> parse_decimal_type("decimal")
354
355
 
@@ -407,19 +408,7 @@ def parse_decimal_type(typ):
407
408
  return b, p, s
408
409
 
409
410
 
410
- def is_type_decimal(type_to_check):
411
- """
412
- >>> is_type_decimal('Decimal')
413
- True
414
- >>> is_type_decimal("Decimal(10, 2)")
415
- True
416
- >>> is_type_decimal("decimal")
417
- False
418
- """
419
- return parse_decimal_type(type_to_check) is not None
420
-
421
-
422
- def get_decimal_limits(p, s):
411
+ def get_decimal_limits(p: int, s: int) -> Tuple[Decimal, Decimal]:
423
412
  """
424
413
  >>> get_decimal_limits(1, 0)
425
414
  (Decimal('-9'), Decimal('9'))
@@ -105,10 +105,10 @@ DEFAULT_INIT_FILES_DEPLOY = {
105
105
 
106
106
 
107
107
  class SemverVersions(Enum):
108
- MAJOR: str = "major"
109
- MINOR: str = "minor"
110
- PATCH: str = "patch"
111
- CURRENT: str = "current"
108
+ MAJOR = "major"
109
+ MINOR = "minor"
110
+ PATCH = "patch"
111
+ CURRENT = "current"
112
112
 
113
113
 
114
114
  def bump_version(version: str, next_version: Optional[str]) -> str:
@@ -8,6 +8,8 @@ from typing import Any, Dict, Iterable, List, Optional
8
8
  valid_chars_name: str = string.ascii_letters + string.digits + "._`*<>+-'"
9
9
  valid_chars_fn: str = valid_chars_name + "[](),=!?:/ \n\t\r"
10
10
 
11
+ INDEX_WHITELIST = ["minmax", "set", "bloom_filter", "ngrambf_v1", "tokenbf_v1"]
12
+
11
13
 
12
14
  @dataclass
13
15
  class TableIndex:
@@ -37,6 +39,13 @@ class TableIndex:
37
39
  def clear_index_sql(self):
38
40
  return f"CLEAR INDEX IF EXISTS {self.name}"
39
41
 
42
+ def validate_allowed(self):
43
+ """
44
+ Validate at API level not to depend on CLI version
45
+ """
46
+ if not any(index in self.type_full for index in INDEX_WHITELIST):
47
+ raise ValueError(f"Not allowed index '{self.type_full}'")
48
+
40
49
 
41
50
  @dataclass
42
51
  class TableProjection:
@@ -69,6 +69,7 @@ def sql_get_used_tables_cached(
69
69
  default_database: str = "",
70
70
  table_functions: bool = True,
71
71
  function_allow_list: Optional[FrozenSet[str]] = None,
72
+ function_deny_list: Optional[FrozenSet[str]] = None,
72
73
  ) -> List[Tuple[str, str, str]]:
73
74
  """More like: get used sql names
74
75
 
@@ -92,9 +93,13 @@ def sql_get_used_tables_cached(
92
93
  """
93
94
  try:
94
95
  _function_allow_list = list() if function_allow_list is None else list(function_allow_list)
96
+ _function_deny_list = list() if function_deny_list is None else list(function_deny_list)
95
97
 
96
98
  tables: List[Tuple[str, str, str]] = chquery.tables(
97
- sql, default_database=default_database, function_allow_list=_function_allow_list
99
+ sql,
100
+ default_database=default_database,
101
+ function_allow_list=_function_allow_list,
102
+ function_deny_list=_function_deny_list,
98
103
  )
99
104
  if not table_functions:
100
105
  return [(t[0], t[1], "") for t in tables if t[0] or t[1]]
@@ -118,15 +123,24 @@ def sql_get_used_tables(
118
123
  default_database: str = "",
119
124
  table_functions: bool = True,
120
125
  function_allow_list: Optional[FrozenSet[str]] = None,
126
+ function_deny_list: Optional[FrozenSet[str]] = None,
121
127
  ) -> List[Tuple[str, str, str]]:
122
128
  """More like: get used sql names
123
129
 
124
130
  Returns a list of tuples: (database_or_namespace, table_name, table_func).
125
131
  """
126
- hashable_list = frozenset() if function_allow_list is None else function_allow_list
132
+ function_allow_hashable_list = frozenset() if function_allow_list is None else function_allow_list
133
+ function_deny_hashable_list = frozenset() if function_deny_list is None else function_deny_list
127
134
 
128
135
  return copy.copy(
129
- sql_get_used_tables_cached(sql, raising, default_database, table_functions, function_allow_list=hashable_list)
136
+ sql_get_used_tables_cached(
137
+ sql,
138
+ raising,
139
+ default_database,
140
+ table_functions,
141
+ function_allow_list=function_allow_hashable_list,
142
+ function_deny_list=function_deny_hashable_list,
143
+ )
130
144
  )
131
145
 
132
146
 
@@ -73,7 +73,7 @@ class Local:
73
73
  def __init__(self, thread_critical: bool = False) -> None:
74
74
  self._thread_critical = thread_critical
75
75
  self._thread_lock = threading.RLock()
76
- self._context_refs: "weakref.WeakSet[object]" = weakref.WeakSet()
76
+ self._context_refs: weakref.WeakSet[object] = weakref.WeakSet()
77
77
  # Random suffixes stop accidental reuse between different Locals,
78
78
  # though we try to force deletion as well.
79
79
  self._attr_name = "_asgiref_local_impl_{}_{}".format(
@@ -281,7 +281,7 @@ def load_connector_config(ctx: Context, connector_name: str, debug: bool, check_
281
281
  click.echo(FeedbackManager.warning_connector_not_installed(connector=connector_name))
282
282
  return
283
283
  ctx.ensure_object(dict)[connector_name] = create_connector(connector_name, config)
284
- except IOError:
284
+ except OSError:
285
285
  if debug:
286
286
  click.echo(f"** {connector_name} connector not configured")
287
287
  pass
@@ -1062,7 +1062,7 @@ async def push_data(
1062
1062
  if connector not in ctx.obj:
1063
1063
  raise CLIException(FeedbackManager.error_connector_not_configured(connector=connector))
1064
1064
  else:
1065
- _connector: "Connector" = ctx.obj[connector]
1065
+ _connector: Connector = ctx.obj[connector]
1066
1066
  click.echo(FeedbackManager.info_starting_export_process(connector=connector))
1067
1067
  try:
1068
1068
  url = _connector.export_to_gcs(sql, datasource_name, mode)
@@ -45,10 +45,10 @@ def compare_versions(a: str, b: str) -> int:
45
45
  class ConfigValueOrigin(Enum):
46
46
  # Sources for config values (environment variables, .tinyb file or default value)
47
47
 
48
- ENVIRONMENT: str = "env"
49
- CONFIG: str = "conf"
50
- DEFAULT: str = "default"
51
- NONE: str = ""
48
+ ENVIRONMENT = "env"
49
+ CONFIG = "conf"
50
+ DEFAULT = "default"
51
+ NONE = ""
52
52
 
53
53
 
54
54
  @dataclass
@@ -153,7 +153,7 @@ class CLIConfig:
153
153
  for k, v in values.items():
154
154
  self[k] = v
155
155
  return True
156
- except IOError:
156
+ except OSError:
157
157
  return False
158
158
 
159
159
  def override_with_environment(self) -> None:
@@ -525,7 +525,7 @@ async def generate_datasource(ctx: Context, connector: str, filenames, force: bo
525
525
  """Generate a data source file based on a sample CSV file from local disk or url"""
526
526
  client: TinyB = ctx.ensure_object(dict)["client"]
527
527
 
528
- _connector: Optional["Connector"] = None
528
+ _connector: Optional[Connector] = None
529
529
  if connector:
530
530
  load_connector_config(ctx, connector, False, check_uninstalled=False)
531
531
  if connector not in ctx.ensure_object(dict):
@@ -195,8 +195,6 @@ if you need to include a literal ``{{``, ``{%``, or ``{#`` in the output.
195
195
  `filter_whitespace` for available options. New in Tornado 4.3.
196
196
  """
197
197
 
198
- from __future__ import absolute_import, division, print_function
199
-
200
198
  import ast
201
199
  import datetime
202
200
  import linecache
@@ -1163,7 +1161,7 @@ def check_valid_expr(expr):
1163
1161
  elif isinstance(expr, ast.Subscript):
1164
1162
  check_valid_expr(expr.value)
1165
1163
  if isinstance(expr.slice, ast.Index):
1166
- check_valid_expr(expr.slice.value) # type: ignore[attr-defined]
1164
+ check_valid_expr(expr.slice.value)
1167
1165
  elif isinstance(expr.slice, ast.Slice):
1168
1166
  if expr.slice.lower is not None:
1169
1167
  check_valid_expr(expr.slice.lower)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tinybird-cli
3
- Version: 5.13.2.dev0
3
+ Version: 5.13.2.dev1
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/cli/introduction.html
6
6
  Author: Tinybird
@@ -18,6 +18,12 @@ The Tinybird command-line tool allows you to use all the Tinybird functionality
18
18
  Changelog
19
19
  ----------
20
20
 
21
+ 5.13.2.dev1
22
+ ***********
23
+
24
+ - Added `eu-west-1` region to the list of available regions.
25
+
26
+
21
27
  5.13.1
22
28
  ***********
23
29