mainsequence 8.1.20.dev7__py3-none-any.whl → 8.1.20.dev8__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.
mainsequence/cli/cli.py CHANGED
@@ -5912,7 +5912,9 @@ def _meta_table_run_query_impl(
5912
5912
  try:
5913
5913
  payload = run_meta_table_query(meta_table_uid, sql, timeout=timeout)
5914
5914
  except ApiError as e:
5915
- error(f"MetaTable query failed: {e}")
5915
+ # The api layer already names the operation in the message; prefixing again
5916
+ # produces "MetaTable query failed: MetaTable query failed: ...".
5917
+ error(str(e))
5916
5918
  raise typer.Exit(1) from e
5917
5919
 
5918
5920
  ok = bool(payload.get("ok"))
@@ -5941,7 +5943,9 @@ def _time_index_table_run_query_impl(
5941
5943
  try:
5942
5944
  payload = run_time_index_table_query(table_uid, sql, timeout=timeout)
5943
5945
  except ApiError as e:
5944
- error(f"Time-index table query failed: {e}")
5946
+ # The api layer already names the operation in the message; prefixing again
5947
+ # produces "Time-index table query failed: Time-index table query failed: ...".
5948
+ error(str(e))
5945
5949
  raise typer.Exit(1) from e
5946
5950
 
5947
5951
  ok = bool(payload.get("ok"))
@@ -1904,35 +1904,18 @@ class MetaTable(
1904
1904
 
1905
1905
  cls = type(self)
1906
1906
  url = f"{cls.get_object_url().rstrip('/')}/{self._public_uid()}/run-query/"
1907
- if cls.ENDPOINT == "time-index-meta-tables":
1908
- session = cls.build_session()
1909
- old_content_type = session.headers.get("Content-Type")
1910
- session.headers["Content-Type"] = "text/plain"
1911
- try:
1912
- response = make_request(
1913
- s=session,
1914
- loaders=cls.LOADERS,
1915
- r_type="POST",
1916
- url=url,
1917
- payload={"data": sql},
1918
- time_out=timeout,
1919
- )
1920
- finally:
1921
- if old_content_type is None:
1922
- session.headers.pop("Content-Type", None)
1923
- else:
1924
- session.headers["Content-Type"] = old_content_type
1925
- error_payload = {"data": sql}
1926
- else:
1927
- response = make_request(
1928
- s=cls.build_session(),
1929
- loaders=cls.LOADERS,
1930
- r_type="POST",
1931
- url=url,
1932
- payload={"json": sql},
1933
- time_out=timeout,
1934
- )
1935
- error_payload = {"json": sql}
1907
+ # The backend reads the request body as the raw SQL string and parses it with
1908
+ # DRF's JSON parser, for every MetaTable endpoint. Sending a JSON string is the
1909
+ # only transport it accepts; a text/plain body is rejected with HTTP 415.
1910
+ payload = {"json": sql}
1911
+ response = make_request(
1912
+ s=cls.build_session(),
1913
+ loaders=cls.LOADERS,
1914
+ r_type="POST",
1915
+ url=url,
1916
+ payload=payload,
1917
+ time_out=timeout,
1918
+ )
1936
1919
 
1937
1920
  try:
1938
1921
  data = response.json()
@@ -1942,7 +1925,7 @@ class MetaTable(
1942
1925
  if isinstance(data, dict) and "ok" in data:
1943
1926
  return data
1944
1927
 
1945
- raise_for_response(response, payload=error_payload)
1928
+ raise_for_response(response, payload=payload)
1946
1929
  return response.json()
1947
1930
 
1948
1931
  @classmethod
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mainsequence
3
- Version: 8.1.20.dev7
3
+ Version: 8.1.20.dev8
4
4
  Summary: Main Sequence SDK
5
5
  Author-email: Main Sequence GmbH <dev@main-sequence.io>
6
6
  License-Expression: LicenseRef-MainSequence-Proprietary
@@ -23,7 +23,7 @@ mainsequence/scaffold_skills.py,sha256=mhjn7Xy5BSp8711xf7jziOC-DgyI1QUNWDup-fg_7
23
23
  mainsequence/cli/__init__.py,sha256=TNxXsTPgb52OhakIda9wTRh91cqoBqgQRx5TxjzQQFU,21
24
24
  mainsequence/cli/api.py,sha256=MN1wsJrykUfzkq9wlcjY0I_v8Ls0Lk9jY9_z8mVWVwo,170143
25
25
  mainsequence/cli/browser_auth.py,sha256=C-Sbpt0Pr9Pv3Z9dO80TMk7zPcaaZ-4zvW0tbRVMrTU,9863
26
- mainsequence/cli/cli.py,sha256=DmgJHGHSA_GlnSzzDrtzNf4dDcjUX3veQhx2bciA3OY,376943
26
+ mainsequence/cli/cli.py,sha256=fuhL5BcK6EHGAB2DCNxaB58SUV_TkEdI9zoOKMDfF2I,377218
27
27
  mainsequence/cli/code_repository_status.py,sha256=SHEnU8YSWFowPG6dEdE4Yd8CS1tIcJSE1MXFLfvD3Os,5975
28
28
  mainsequence/cli/config.py,sha256=VTxa0sH-XRUlc_FnCILGlHbgaAMEaMqSJ5j1G9I6PRw,26190
29
29
  mainsequence/cli/docker_utils.py,sha256=MS2DOH-bLtpBHfw_JmYu3fx7aYP1uafF7cpsVsFxGhg,10687
@@ -53,7 +53,7 @@ mainsequence/client/data_sources_interfaces/duckdb.py,sha256=JZHsN3fB2UQYpNQJnp2
53
53
  mainsequence/client/data_sources_interfaces/local_paths.py,sha256=aO7-pTGBWItcpY1MxoYYP0mbEgB3dDWqDOwniezNw5c,323
54
54
  mainsequence/client/data_sources_interfaces/sqlite.py,sha256=gWpuG9FbPWF69urRqU_K5yWX7vkHGPeOCYaJwVu8nG0,16392
55
55
  mainsequence/client/metatables/__init__.py,sha256=dLxgfvV8t5kb59SxBowXxLJJQAc1BPgNzVUl_7U6SeA,580
56
- mainsequence/client/metatables/core.py,sha256=j-rVsQe7-l_3h3Yh_UWemeOM7sGdqsf_JPNKwmVB4AA,186505
56
+ mainsequence/client/metatables/core.py,sha256=FdYKoAU6AjIS3lFAOXT6GOJTgJvD01HFea9yb6-H1DM,185916
57
57
  mainsequence/instrumentation/__init__.py,sha256=K1W1vx2wu1QldzUD6tI4C8op9mFcVpS7D-Ina1O9TFc,152
58
58
  mainsequence/instrumentation/utils.py,sha256=b-ihjSioAepeLfMpudM2SqCtvnxMqIXileHx3klBCQU,3377
59
59
  mainsequence/meta_tables/__init__.py,sha256=aHwu6kRSunS3-ZiVnSS-8rBH09ZnWUu82hgrmnpeEf4,5267
@@ -83,9 +83,9 @@ mainsequence/meta_tables/time_index_table_updates/namespacing.py,sha256=obJfMnjL
83
83
  mainsequence/meta_tables/time_index_table_updates/runner.py,sha256=853p_iXJ835pI8pX3519HSdTw93Bqqd3JxHOfm3S6yg,34412
84
84
  mainsequence/meta_tables/time_index_table_updates/updaters.py,sha256=-6zJgi1sDRCyIyVxLwTfb2RLLZS4LC0syNJHnJRAtgU,31404
85
85
  mainsequence/meta_tables/time_index_table_updates/utils.py,sha256=O1iKp2tzCkqxyCblI6MKxez6XV180w87VszxDO9OfAE,621
86
- mainsequence-8.1.20.dev7.dist-info/licenses/LICENSE,sha256=fXoCKgEuZXmP84_QDXpvO18QHze_6AAhd-zvZBUjJxQ,4524
87
- mainsequence-8.1.20.dev7.dist-info/METADATA,sha256=Zd_MBN2AmI9Wf2jJrfRbqOijLWA5BT--0EhGoE0jCwI,7383
88
- mainsequence-8.1.20.dev7.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
89
- mainsequence-8.1.20.dev7.dist-info/entry_points.txt,sha256=XGAOq3-mF2lWWpeRJvoaWyMarRcK167mH1g124aGdUs,88
90
- mainsequence-8.1.20.dev7.dist-info/top_level.txt,sha256=BFeblM_Q9q0cUWBvTxnfWcWQEHtf5XZi9nOS-Gdfwus,28
91
- mainsequence-8.1.20.dev7.dist-info/RECORD,,
86
+ mainsequence-8.1.20.dev8.dist-info/licenses/LICENSE,sha256=fXoCKgEuZXmP84_QDXpvO18QHze_6AAhd-zvZBUjJxQ,4524
87
+ mainsequence-8.1.20.dev8.dist-info/METADATA,sha256=yvx3dZnhC2qjIGY7f4HZgNeqj0B0x69pm0oxaF1ecnQ,7383
88
+ mainsequence-8.1.20.dev8.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
89
+ mainsequence-8.1.20.dev8.dist-info/entry_points.txt,sha256=XGAOq3-mF2lWWpeRJvoaWyMarRcK167mH1g124aGdUs,88
90
+ mainsequence-8.1.20.dev8.dist-info/top_level.txt,sha256=BFeblM_Q9q0cUWBvTxnfWcWQEHtf5XZi9nOS-Gdfwus,28
91
+ mainsequence-8.1.20.dev8.dist-info/RECORD,,