castor-extractor 0.24.54__py3-none-any.whl → 0.24.55__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 castor-extractor might be problematic. Click here for more details.

CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.24.55 - 2025-09-19
4
+
5
+ * Fix encoding in LocalStorage - force to utf-8
6
+
3
7
  ## 0.24.54 - 2025-09-18
4
8
 
5
9
  * SqlServer: fix typo in the extraction query of schemas
@@ -26,7 +26,7 @@ from .collection import (
26
26
  group_by,
27
27
  mapping_from_rows,
28
28
  )
29
- from .constants import OUTPUT_DIR
29
+ from .constants import ENCODING_UTF8, OUTPUT_DIR
30
30
  from .deprecate import deprecate_python
31
31
  from .env import from_env
32
32
  from .files import explode, search_files
@@ -1 +1,2 @@
1
1
  OUTPUT_DIR = "CASTOR_OUTPUT_DIRECTORY"
2
+ ENCODING_UTF8 = "utf-8"
@@ -4,6 +4,7 @@ from collections.abc import Iterable, Iterator
4
4
  from io import StringIO
5
5
  from typing import Optional
6
6
 
7
+ from .constants import ENCODING_UTF8
7
8
  from .formatter import CsvFormatter, Formatter
8
9
  from .time import current_timestamp
9
10
  from .write import timestamped_filename
@@ -58,11 +59,11 @@ class LocalStorage(AbstractStorage):
58
59
 
59
60
  def put(self, name: str, data: Iterable[dict]) -> str:
60
61
  path = self.path(name)
61
- with open(path, "w") as file:
62
+ with open(path, "w", encoding=ENCODING_UTF8) as file:
62
63
  self._formatter.serialize(file, data)
63
64
  return path
64
65
 
65
66
  def get(self, name: str) -> Iterator[dict]:
66
67
  path = self.path(name)
67
- with open(path, "r") as file:
68
+ with open(path, "r", encoding=ENCODING_UTF8) as file:
68
69
  return self._formatter.deserialize(StringIO(file.read()))
@@ -3,11 +3,11 @@ import logging
3
3
  import os
4
4
  import sys
5
5
  from datetime import datetime
6
+ from importlib.metadata import version
6
7
  from typing import Any
7
8
 
8
- import pkg_resources
9
+ from ..utils import ENCODING_UTF8
9
10
 
10
- ENCODING = "utf8"
11
11
  SUMMARY_FILENAME = "summary.json"
12
12
 
13
13
  logger = logging.getLogger(__name__)
@@ -33,15 +33,14 @@ def write_json(filename: str, data: Any):
33
33
  """
34
34
  write the data to a json file at path filename
35
35
  """
36
- with open(filename, "w", encoding=ENCODING) as f:
36
+ with open(filename, "w", encoding=ENCODING_UTF8) as f:
37
37
  json.dump(data, f)
38
38
  logger.info(f"Wrote output file: {filename} ({f.tell()} bytes)")
39
39
 
40
40
 
41
41
  def _current_version() -> str:
42
42
  """fetch the current version of castor extractor running"""
43
- packages = pkg_resources.require("castor-extractor")
44
- return str(packages[0].version)
43
+ return version("castor-extractor")
45
44
 
46
45
 
47
46
  def write_summary(output_directory: str, ts: int, **kwargs):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: castor-extractor
3
- Version: 0.24.54
3
+ Version: 0.24.55
4
4
  Summary: Extract your metadata assets.
5
5
  Home-page: https://www.castordoc.com/
6
6
  License: EULA
@@ -36,7 +36,7 @@ Requires-Dist: google-api-core (>=2.1.1,<3.0.0)
36
36
  Requires-Dist: google-api-python-client (>=2.121.0,<3.0.0) ; extra == "lookerstudio" or extra == "all"
37
37
  Requires-Dist: google-auth (>=2,<3)
38
38
  Requires-Dist: google-cloud-core (>=2.1.0,<3.0.0)
39
- Requires-Dist: google-cloud-storage (>=2,<3)
39
+ Requires-Dist: google-cloud-storage (>=3.1.0,<4.0.0)
40
40
  Requires-Dist: google-resumable-media (>=2.0.3,<3.0.0)
41
41
  Requires-Dist: googleapis-common-protos (>=1.53.0,<2.0.0)
42
42
  Requires-Dist: looker-sdk (>=25.0.0,<26.0.0) ; extra == "looker" or extra == "all"
@@ -215,6 +215,10 @@ For any questions or bug report, contact us at [support@coalesce.io](mailto:supp
215
215
 
216
216
  # Changelog
217
217
 
218
+ ## 0.24.55 - 2025-09-19
219
+
220
+ * Fix encoding in LocalStorage - force to utf-8
221
+
218
222
  ## 0.24.54 - 2025-09-18
219
223
 
220
224
  * SqlServer: fix typo in the extraction query of schemas
@@ -1,4 +1,4 @@
1
- CHANGELOG.md,sha256=UWQqKdcoyCIOs5Akoc9DqX5p2sBbFpk5mKXX_OBznUQ,20637
1
+ CHANGELOG.md,sha256=y8BAidkUDrMoQLEfu3LJLiqxoEUzI5hJZs4CUN_e1H0,20711
2
2
  Dockerfile,sha256=xQ05-CFfGShT3oUqaiumaldwA288dj9Yb_pxofQpufg,301
3
3
  DockerfileUsage.md,sha256=2hkJQF-5JuuzfPZ7IOxgM6QgIQW7l-9oRMFVwyXC4gE,998
4
4
  LICENCE,sha256=sL-IGa4hweyya1HgzMskrRdybbIa2cktzxb5qmUgDg8,8254
@@ -95,7 +95,7 @@ castor_extractor/uploader/settings.py,sha256=sUZpg9eHemM99DMrBW8bnlMuoTmCmLCKq-D
95
95
  castor_extractor/uploader/upload.py,sha256=b2g9vWWjXWbt8Ms7brTc7OK_I7Z-1VSibNbppGoB2oQ,4764
96
96
  castor_extractor/uploader/upload_test.py,sha256=UgN7TnT9Chn6KVzRcAX0Tuvp7-tps3ugxGitlgb9TSY,462
97
97
  castor_extractor/uploader/utils.py,sha256=otAaySj5aeem6f0CTd0Te6ioJ6uP2J1p348j-SdIwDI,802
98
- castor_extractor/utils/__init__.py,sha256=z_BdKTUyuug3I5AzCuSGrAVskfLax4_olfORIjhZw_M,1691
98
+ castor_extractor/utils/__init__.py,sha256=LhcSQe50m5iv2zlEPfJUa3VY4pDcoMctqLByAWNV7As,1706
99
99
  castor_extractor/utils/argument_parser.py,sha256=S4EcIh3wNDjs3fOrQnttCcPsAmG8m_Txl7xvEh0Q37s,283
100
100
  castor_extractor/utils/argument_parser_test.py,sha256=wnyLFJ74iEiPxxLSbwFtckR7FIHxsFOVU38ljs9gqRA,633
101
101
  castor_extractor/utils/batch.py,sha256=SFlLmJgVjV2nVhIrjVIEp8wJ9du4dKKHq8YVYubnwQQ,448
@@ -119,7 +119,7 @@ castor_extractor/utils/client/uri.py,sha256=jmP9hY-6PRqdc3-vAOdtll_U6q9VCqSqmBAN
119
119
  castor_extractor/utils/client/uri_test.py,sha256=1XKF6qSseCeD4G4ckaNO07JXfGbt7XUVinOZdpEYrDQ,259
120
120
  castor_extractor/utils/collection.py,sha256=g2HmB0ievvYHWaZ8iEzkcPPkrBFsh6R6b_liBqcsMjc,3044
121
121
  castor_extractor/utils/collection_test.py,sha256=mlw33u4VidazQwWxJMvaFeYX3VB5CAj6rqRG-cRsLrw,2884
122
- castor_extractor/utils/constants.py,sha256=qBQprS9U66mS-RIBXiLujdTSV3WvGv40Bc0khP4Abdk,39
122
+ castor_extractor/utils/constants.py,sha256=xEUk-B__cqHPKz5_Ta9kHIsiR-a9qTXzpsTY-SzPRHo,63
123
123
  castor_extractor/utils/deprecate.py,sha256=aBIN2QqZUx5CBNZMFfOUhi8QqtPqRcJtmrN6xqfm-y8,805
124
124
  castor_extractor/utils/env.py,sha256=TqdtB50U8LE0993WhhEhpy89TJrHbjtIKjvg6KQ-5q0,596
125
125
  castor_extractor/utils/files.py,sha256=qKbfu5FRjsQdKnRmaJNd5EdX_F6gf5C5tV8LdoYKxs0,1527
@@ -148,7 +148,7 @@ castor_extractor/utils/salesforce/constants.py,sha256=7yPmUeyn4IHQiHLDutXE0L_OBd
148
148
  castor_extractor/utils/salesforce/credentials.py,sha256=m_11LIaBrYVgH2bLo-QnxaIY5KhEdtfVXz9r2lb_fd0,1123
149
149
  castor_extractor/utils/salesforce/credentials_test.py,sha256=FQRyNk2Jsh6KtYiW20oL43CVnGjXLcAjdFATkE7jK0s,586
150
150
  castor_extractor/utils/salesforce/pagination.py,sha256=wJq0rKLdacFRggyHwB6Fh3K6iXPvL4QWhsDvZdjQjM8,849
151
- castor_extractor/utils/store.py,sha256=hnyrFwCsL48e9QrsBns-n8FospujZrkUy1P2YHAh_C0,2067
151
+ castor_extractor/utils/store.py,sha256=KAg5TzLd8jak1Gh5NK-iPu2buQIYNofx6lpXye7MRDU,2152
152
152
  castor_extractor/utils/string.py,sha256=IQqNum7CJwuSvDGPbTAmz46YwtYDYgJKeXY7iixdjI4,2370
153
153
  castor_extractor/utils/string_test.py,sha256=u3P2tAPhyfCLvD19rH_JcpHhPuWTHUdg0z_N_-Kxwno,2501
154
154
  castor_extractor/utils/time.py,sha256=jmP1QWg4lv21Jp_Oy71lfJ47hjNOSgHiBOFf964RMPU,1732
@@ -158,7 +158,7 @@ castor_extractor/utils/url.py,sha256=0YaKAz3EC5PgTb5A2TNOlxf1DANK40yw6hs7ArEtJaU
158
158
  castor_extractor/utils/url_test.py,sha256=LWzNdOZqjrDeLmvhPBYmP35mzhm7jGAXi021thiro1Y,1425
159
159
  castor_extractor/utils/validation.py,sha256=dRvC9SoFVecVZuLQNN3URq37yX2sBSW3-NxIxkcol5o,1894
160
160
  castor_extractor/utils/validation_test.py,sha256=A7P6VmI0kYX2aGIeEN12y7LsY7Kpm8pE4bdVFhbBAMw,1184
161
- castor_extractor/utils/write.py,sha256=Z_RYm47XeHiUPPUMYMuAjQrVZ18CAkL3daQHQG1XPlM,2148
161
+ castor_extractor/utils/write.py,sha256=KQVWF29N766avzmSb129IUWrId5c_8BtnYhVLmU6YIs,2133
162
162
  castor_extractor/visualization/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
163
163
  castor_extractor/visualization/domo/__init__.py,sha256=1axOCPm4RpdIyUt9LQEvlMvbOPllW8rk63h6EjVgJ0Y,111
164
164
  castor_extractor/visualization/domo/assets.py,sha256=bK1urFR2tnlWkVkkhR32mAKMoKbESNlop-CNGx-65PY,206
@@ -434,8 +434,8 @@ castor_extractor/warehouse/sqlserver/queries/user.sql,sha256=MAlnTis43E3Amu1e1Oz
434
434
  castor_extractor/warehouse/sqlserver/queries/view_ddl.sql,sha256=9rynvx6MWg3iZzrWPB7haZfVKEPkxulzryE2g19x804,315
435
435
  castor_extractor/warehouse/sqlserver/query.py,sha256=c8f7_SEMR17DhbtzuYphWqWDQ0sCRy-nR442RRBZVYw,1773
436
436
  castor_extractor/warehouse/synapse/queries/column.sql,sha256=lNcFoIW3Y0PFOqoOzJEXmPvZvfAsY0AP63Mu2LuPzPo,1351
437
- castor_extractor-0.24.54.dist-info/LICENCE,sha256=sL-IGa4hweyya1HgzMskrRdybbIa2cktzxb5qmUgDg8,8254
438
- castor_extractor-0.24.54.dist-info/METADATA,sha256=jEfKI6ocldlGkpKQsrBrW-1Vn0e1n7IPS7NLzEzSCpg,28090
439
- castor_extractor-0.24.54.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
440
- castor_extractor-0.24.54.dist-info/entry_points.txt,sha256=_F-qeZCybjoMkNb9ErEhnyqXuG6afHIFQhakdBHZsr4,1803
441
- castor_extractor-0.24.54.dist-info/RECORD,,
437
+ castor_extractor-0.24.55.dist-info/LICENCE,sha256=sL-IGa4hweyya1HgzMskrRdybbIa2cktzxb5qmUgDg8,8254
438
+ castor_extractor-0.24.55.dist-info/METADATA,sha256=MhFCdByqa4_T7A4-Mb96-ISq07W6BP7M-RHgjSfI8iY,28172
439
+ castor_extractor-0.24.55.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
440
+ castor_extractor-0.24.55.dist-info/entry_points.txt,sha256=_F-qeZCybjoMkNb9ErEhnyqXuG6afHIFQhakdBHZsr4,1803
441
+ castor_extractor-0.24.55.dist-info/RECORD,,