sqlmesh 0.225.1.dev7__py3-none-any.whl → 0.225.1.dev9__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.
- sqlmesh/_version.py +2 -2
- sqlmesh/core/context.py +10 -6
- sqlmesh/utils/windows.py +13 -3
- {sqlmesh-0.225.1.dev7.dist-info → sqlmesh-0.225.1.dev9.dist-info}/METADATA +1 -1
- {sqlmesh-0.225.1.dev7.dist-info → sqlmesh-0.225.1.dev9.dist-info}/RECORD +9 -9
- {sqlmesh-0.225.1.dev7.dist-info → sqlmesh-0.225.1.dev9.dist-info}/WHEEL +0 -0
- {sqlmesh-0.225.1.dev7.dist-info → sqlmesh-0.225.1.dev9.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.225.1.dev7.dist-info → sqlmesh-0.225.1.dev9.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.225.1.dev7.dist-info → sqlmesh-0.225.1.dev9.dist-info}/top_level.txt +0 -0
sqlmesh/_version.py
CHANGED
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.225.1.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 225, 1, '
|
|
31
|
+
__version__ = version = '0.225.1.dev9'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 225, 1, 'dev9')
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
sqlmesh/core/context.py
CHANGED
|
@@ -139,6 +139,7 @@ from sqlmesh.utils.errors import (
|
|
|
139
139
|
)
|
|
140
140
|
from sqlmesh.utils.config import print_config
|
|
141
141
|
from sqlmesh.utils.jinja import JinjaMacroRegistry
|
|
142
|
+
from sqlmesh.utils.windows import IS_WINDOWS, fix_windows_path
|
|
142
143
|
|
|
143
144
|
if t.TYPE_CHECKING:
|
|
144
145
|
import pandas as pd
|
|
@@ -2590,12 +2591,15 @@ class GenericContext(BaseContext, t.Generic[C]):
|
|
|
2590
2591
|
)
|
|
2591
2592
|
|
|
2592
2593
|
def clear_caches(self) -> None:
|
|
2593
|
-
for path in self.configs
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2594
|
+
paths_to_remove = [path / c.CACHE for path in self.configs]
|
|
2595
|
+
paths_to_remove.append(self.cache_dir)
|
|
2596
|
+
|
|
2597
|
+
if IS_WINDOWS:
|
|
2598
|
+
paths_to_remove = [fix_windows_path(path) for path in paths_to_remove]
|
|
2599
|
+
|
|
2600
|
+
for path in paths_to_remove:
|
|
2601
|
+
if path.exists():
|
|
2602
|
+
rmtree(path)
|
|
2599
2603
|
|
|
2600
2604
|
if isinstance(self._state_sync, CachingStateSync):
|
|
2601
2605
|
self._state_sync.clear_cache()
|
sqlmesh/utils/windows.py
CHANGED
|
@@ -3,12 +3,22 @@ from pathlib import Path
|
|
|
3
3
|
|
|
4
4
|
IS_WINDOWS = platform.system() == "Windows"
|
|
5
5
|
|
|
6
|
+
WINDOWS_LONGPATH_PREFIX = "\\\\?\\"
|
|
7
|
+
|
|
6
8
|
|
|
7
9
|
def fix_windows_path(path: Path) -> Path:
|
|
8
10
|
"""
|
|
9
11
|
Windows paths are limited to 260 characters: https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation
|
|
10
12
|
Users can change this by updating a registry entry but we cant rely on that.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
|
|
14
|
+
SQLMesh quite commonly generates cache file paths that exceed 260 characters and thus cause a FileNotFound error.
|
|
15
|
+
If we prefix paths with "\\?\" then we can have paths up to 32,767 characters.
|
|
16
|
+
|
|
17
|
+
Note that this prefix also means that relative paths no longer work. From the above docs:
|
|
18
|
+
> Because you cannot use the "\\?\" prefix with a relative path, relative paths are always limited to a total of MAX_PATH characters.
|
|
19
|
+
|
|
20
|
+
So we also call path.resolve() to resolve the relative sections so that operations like `path.read_text()` continue to work
|
|
13
21
|
"""
|
|
14
|
-
|
|
22
|
+
if path.parts and not path.parts[0].startswith(WINDOWS_LONGPATH_PREFIX):
|
|
23
|
+
path = Path(WINDOWS_LONGPATH_PREFIX + str(path.absolute()))
|
|
24
|
+
return path.resolve()
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
sqlmesh/__init__.py,sha256=v_spqQEhcnGaahp1yPvMqUIa6mhH3cs3Bc1CznxvCEA,7965
|
|
2
|
-
sqlmesh/_version.py,sha256=
|
|
2
|
+
sqlmesh/_version.py,sha256=In7JszPyl-FSxX_rqZzch9tAUyabr_kCKrjd95ovG5Q,721
|
|
3
3
|
sqlmesh/magics.py,sha256=xLh3u4eqpVrKRVN5KF3X84RPRqjygAB9AJP1TXwH8hg,42086
|
|
4
4
|
sqlmesh/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
sqlmesh/cicd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -13,7 +13,7 @@ sqlmesh/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
13
13
|
sqlmesh/core/_typing.py,sha256=PzXxMYnORq18JhblAOUttms3zPJZzZpIbfFA_jgKYPA,498
|
|
14
14
|
sqlmesh/core/console.py,sha256=MYpVlciUY6rUuoqXyKfXTxD6a4-Bw4-ooATUTj_VHGg,172830
|
|
15
15
|
sqlmesh/core/constants.py,sha256=BuQk43vluUm7LfP9nKp5o9qRhqIenWF_LiLXO_t_53c,2699
|
|
16
|
-
sqlmesh/core/context.py,sha256=
|
|
16
|
+
sqlmesh/core/context.py,sha256=dgtgIabNtdhVPsQ-tUY5lwK-SnCQxqDdRNY6f3TVMgY,130941
|
|
17
17
|
sqlmesh/core/context_diff.py,sha256=mxkJu0IthFMOlaQ_kcq5C09mlgkq2RQb-pG2rd-x_nA,21648
|
|
18
18
|
sqlmesh/core/dialect.py,sha256=CnKcPj6BnREfu9Zn1OyS7hZ3ktnaX03ygOg91nADlTU,53029
|
|
19
19
|
sqlmesh/core/environment.py,sha256=Kgs_gUEUI072mh0JJFWNRynrCxp1TzRHZhX_NWJRfXc,13142
|
|
@@ -236,9 +236,9 @@ sqlmesh/utils/pandas.py,sha256=FytTSLcRNtO0-YMvpoDBkkut3yoQJR9mBSKpif8lxug,2497
|
|
|
236
236
|
sqlmesh/utils/process.py,sha256=vpXcpJ1eIbivs7gZdwTKSJI7OS6kKBebnaBzz75ykvs,2428
|
|
237
237
|
sqlmesh/utils/pydantic.py,sha256=o_NsXbIpDqNpUA1Uc5xF0ZzoXQYYB0DfHwdRxBwXPNk,12089
|
|
238
238
|
sqlmesh/utils/rich.py,sha256=cwQ5nJ6sgz64xHtoh6_ec7ReV5YpsOGhMtUJnwoRfEI,3549
|
|
239
|
-
sqlmesh/utils/windows.py,sha256=
|
|
239
|
+
sqlmesh/utils/windows.py,sha256=0F9RdpuuCoG5NiEDXvWlAGCiJ-59OjSAmgFF5wW05aY,1133
|
|
240
240
|
sqlmesh/utils/yaml.py,sha256=KFBd7hsKNRTtRudGR7d410qUYffQv0EWRcDM8hVNNZg,3025
|
|
241
|
-
sqlmesh-0.225.1.
|
|
241
|
+
sqlmesh-0.225.1.dev9.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
|
|
242
242
|
sqlmesh_dbt/__init__.py,sha256=awYS5y5mz-1NUmx6i5h5NSTJ7tidRl9NC0FAnFWSF6U,350
|
|
243
243
|
sqlmesh_dbt/cli.py,sha256=eAeOZtHOikSDEZNI6hnZYJ-pja6ijFldRV4PeSzwYwU,5744
|
|
244
244
|
sqlmesh_dbt/console.py,sha256=RwWLYnEZHzn9Xp-e2gbZvkdKbWbBLN146geI84mJitg,1132
|
|
@@ -363,8 +363,8 @@ web/server/api/endpoints/models.py,sha256=kwj0s7uve3iZSMfmjkoPVMFMeY1sD0peTeyrWf
|
|
|
363
363
|
web/server/api/endpoints/modules.py,sha256=8hqqgonGay_mJmpCw0IdbjsPhWlQH2VLdKAqha-myac,468
|
|
364
364
|
web/server/api/endpoints/plan.py,sha256=bbbY50W_2MsZSTxOHWMKz0tbIm75nsRSlPy8GI2fg9Q,9306
|
|
365
365
|
web/server/api/endpoints/table_diff.py,sha256=8XTwgOh6QBbNy_hTM1JuHgRjbnie-pGPrphiW-FNLjQ,6058
|
|
366
|
-
sqlmesh-0.225.1.
|
|
367
|
-
sqlmesh-0.225.1.
|
|
368
|
-
sqlmesh-0.225.1.
|
|
369
|
-
sqlmesh-0.225.1.
|
|
370
|
-
sqlmesh-0.225.1.
|
|
366
|
+
sqlmesh-0.225.1.dev9.dist-info/METADATA,sha256=b5W8F8BQUXsUvbmXeW8uiBXOAE5wmv8gJ_tDcU25Q_8,26685
|
|
367
|
+
sqlmesh-0.225.1.dev9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
368
|
+
sqlmesh-0.225.1.dev9.dist-info/entry_points.txt,sha256=sHAf6tQczIM8xZoduN4qaUjV7QEPVUUW_LCT8EDUMv4,155
|
|
369
|
+
sqlmesh-0.225.1.dev9.dist-info/top_level.txt,sha256=RQ-33FPe2IgL0rgossAfJkCRtqslz9b7wFARqiWLC5Q,24
|
|
370
|
+
sqlmesh-0.225.1.dev9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|