native-dumper 0.3.5.0__cp312-cp312-win_amd64.whl → 0.3.5.2__cp312-cp312-win_amd64.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.
@@ -37,19 +37,24 @@ class HTTPCursor:
37
37
  compression_method: CompressionMethod,
38
38
  logger: Logger,
39
39
  timeout: int,
40
+ user_agent: str | None = None,
40
41
  ) -> None:
41
42
  """Class initialization."""
42
43
 
44
+ if not user_agent:
45
+ user_agent = self.__class__.__name__
46
+
43
47
  self.connector = connector
44
48
  self.compression_method = compression_method
45
49
  self.logger = logger
46
50
  self.timeout = timeout
51
+ self.user_agent = user_agent
47
52
  self.session = HttpSession(timeout=self.timeout)
48
53
  self.is_connected = False
49
54
  self.headers = {
50
55
  "Accept": "*/*",
51
56
  "Connection": "keep-alive",
52
- "User-Agent": f"{self.__class__.__name__}/{__version__}",
57
+ "User-Agent": f"{self.user_agent}/{__version__}",
53
58
  "Accept-Encoding": self.compression_method.method,
54
59
  "Content-Encoding": self.compression_method.method,
55
60
  "X-ClickHouse-User": self.connector.user,
@@ -23,7 +23,7 @@ def chunk_query(query: str | None) -> tuple[list[str]]:
23
23
  first_part.append(part)
24
24
 
25
25
  if (i + 1 < len(parts) and parts[i + 1].lower().startswith(
26
- ('with ', 'select ')
26
+ ("with", "select")
27
27
  )
28
28
  ):
29
29
  second_part = parts[i + 1:]
native_dumper/dumper.py CHANGED
@@ -76,6 +76,7 @@ class NativeDumper:
76
76
  compression_method=self.compression_method,
77
77
  logger=self.logger,
78
78
  timeout=timeout,
79
+ user_agent=self.__class__.__name__,
79
80
  )
80
81
  self.version = self.cursor.send_hello()
81
82
  self._dbmeta: DBMetadata | None = None
native_dumper/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.3.5.0"
1
+ __version__ = "0.3.5.2"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: native-dumper
3
- Version: 0.3.5.0
3
+ Version: 0.3.5.2
4
4
  Summary: Library for read and write Native format between Clickhouse and file.
5
5
  Home-page: https://0xmihalich.github.io/dbhose_airflow/classes/native_dumper/index.html
6
6
  Author: 0xMihalich
@@ -1,22 +1,22 @@
1
1
  native_dumper/__init__.py,sha256=q4rYKVDORN8eztiVFnRYzpLRiN304GPoxvkOpkl3a24,739
2
- native_dumper/dumper.py,sha256=3GaFC8hB71aekw2BF6-ALO-QXDVX_YV59ZTZ7_UBtk4,16073
3
- native_dumper/version.py,sha256=mxcnb3oAd1S1_GoWOK1Sbe0jTMxczZj-kHhq03yfN1A,25
2
+ native_dumper/dumper.py,sha256=XJoqQd_eDkI8dcfYwok_SXjG-NQv3psw9GotIhhmiYY,16126
3
+ native_dumper/version.py,sha256=1BRVpmp2ZnGoQfQPjZkdulmA9kM-H7lwLo20bwVlpUw,25
4
4
  native_dumper/common/__init__.py,sha256=PKUQZ5kJ_OjYlfz-JAK3aBJBqCS_zIHFbdu0WURi_-k,1247
5
5
  native_dumper/common/columns.py,sha256=4cRyhL8bEiR6-WWi6_mtnVOkYoPidpa5GIxLuDDV79g,904
6
6
  native_dumper/common/connector.py,sha256=zC-RG9jhIdR-wZTGB_CapYjDL1iTBUtghLtOymCzSmM,368
7
- native_dumper/common/cursor.py,sha256=D6Ez_5u3uIolMRuyNyX_mt-baUxSCVL18iD0ka9hTj0,5655
7
+ native_dumper/common/cursor.py,sha256=2idvdUL1s1KhY6qwxb-Rt2S1rZVgrKeUNBgrXuIA-Kc,5805
8
8
  native_dumper/common/defines.py,sha256=O6aWWXEXZPHnuZ5P-W1Qk7DgBxgnzgganKbsmIz7CPg,146
9
9
  native_dumper/common/diagram.py,sha256=IkmRtKF6Jt4z0cMWpAYGCZ4LwhNWQ4qkWYEJd8Xvd9I,2583
10
10
  native_dumper/common/errors.py,sha256=v8ZfvJtb0N4UfQTxFNzjbbcSW8UTW5jrIVjCQSUvNlQ,413
11
11
  native_dumper/common/logger.py,sha256=tNsG_n76Z8QYMDsGh-XFzzuBG17Ho5VOei68l9lOZ-E,1745
12
- native_dumper/common/multiquery.py,sha256=0WrjooZvO228xoG4rISDwxIfRhrzAHXktqXShYm5Oyg,803
13
- native_dumper/common/pyo3http.cp312-win_amd64.pyd,sha256=GtEPkkwYlKrwUwSl6qlZKbtlIu3aM0gBikUkH4alYWk,2953728
12
+ native_dumper/common/multiquery.py,sha256=_vngN4cQOetT1l8_p2br83KPk7QLklwxllkoxuupsTY,801
13
+ native_dumper/common/pyo3http.cp312-win_amd64.pyd,sha256=PZXe5q_ASOr1avzxEopcuDG_tkk-QgO7qnAEsb7Gq2k,2953728
14
14
  native_dumper/common/pyo3http.pyi,sha256=iix6S63awOpuuD4KIhokAyavxhQCP4UVZPs1P5zpJvM,6282
15
15
  native_dumper/common/writer.py,sha256=m4GVMxZ8e-B4ViDTPuk10Vxpq8yK87xgm9AOXokNTdc,298
16
16
  native_dumper/common/pyo3http/Cargo.toml,sha256=nWZH83Bbb5zSwADujU8pKrY_nmbOtFZbP9MOLdTxC24,390
17
17
  native_dumper/common/pyo3http/src/lib.rs,sha256=7JxAOMu4uqWd_UtsM88cgNHXILDzs8ZcyFpKEndrMkE,25773
18
- native_dumper-0.3.5.0.dist-info/licenses/LICENSE,sha256=jW7Zeev0dRSYqbEnAk6qGz3e3yok-NhdTxP0ceNPlWM,1088
19
- native_dumper-0.3.5.0.dist-info/METADATA,sha256=ePF-Vxi4VV65iCAAkkfCDBtwD-jlhVqxdw9KzsSQ18c,4522
20
- native_dumper-0.3.5.0.dist-info/WHEEL,sha256=4SIlGrTWEevUMa-6zmQ9aBHcYatnnG9aOHYILIJiCXU,102
21
- native_dumper-0.3.5.0.dist-info/top_level.txt,sha256=mRPA9FLefVYq0__gRJ2LVJeFyIG_EmfYkKXBLdj0u54,14
22
- native_dumper-0.3.5.0.dist-info/RECORD,,
18
+ native_dumper-0.3.5.2.dist-info/licenses/LICENSE,sha256=jW7Zeev0dRSYqbEnAk6qGz3e3yok-NhdTxP0ceNPlWM,1088
19
+ native_dumper-0.3.5.2.dist-info/METADATA,sha256=6zUTmGEnMRt-ELPjiX-BcRzgs874Yb8BCowvAcn3qs8,4522
20
+ native_dumper-0.3.5.2.dist-info/WHEEL,sha256=4SIlGrTWEevUMa-6zmQ9aBHcYatnnG9aOHYILIJiCXU,102
21
+ native_dumper-0.3.5.2.dist-info/top_level.txt,sha256=mRPA9FLefVYq0__gRJ2LVJeFyIG_EmfYkKXBLdj0u54,14
22
+ native_dumper-0.3.5.2.dist-info/RECORD,,