griptape-nodes 0.35.0__py3-none-any.whl → 0.35.1__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.
@@ -15,6 +15,7 @@ from dataclasses import dataclass, field, fields, is_dataclass
15
15
  from datetime import UTC, datetime
16
16
  from enum import StrEnum
17
17
  from importlib import resources
18
+ from inspect import getmodule, isclass
18
19
  from pathlib import Path
19
20
  from typing import TYPE_CHECKING, Any, ClassVar, Literal, NamedTuple, TypeVar, cast
20
21
  from urllib.parse import urljoin
@@ -1132,6 +1133,9 @@ class WorkflowManager:
1132
1133
 
1133
1134
  import_recorder.add_import("pickle")
1134
1135
 
1136
+ # Get the list of manually-curated, globally available modules
1137
+ global_modules_set = {"builtins", "__main__"}
1138
+
1135
1139
  # Serialize the unique values as pickled strings.
1136
1140
  unique_parameter_dict = {}
1137
1141
  for uuid, unique_parameter_value in unique_parameter_uuid_to_values.items():
@@ -1140,6 +1144,13 @@ class WorkflowManager:
1140
1144
  unique_parameter_byte_str = unique_parameter_bytes.decode("latin1")
1141
1145
  unique_parameter_dict[uuid] = unique_parameter_byte_str
1142
1146
 
1147
+ # Add import for the unique parameter value's class/module. But not globals.
1148
+ value_type = type(unique_parameter_value)
1149
+ if isclass(value_type):
1150
+ module = getmodule(value_type)
1151
+ if module and module.__name__ not in global_modules_set:
1152
+ import_recorder.add_from_import(module.__name__, value_type.__name__)
1153
+
1143
1154
  # Generate a comment explaining what we're doing:
1144
1155
  comment_text = (
1145
1156
  "\n"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: griptape-nodes
3
- Version: 0.35.0
3
+ Version: 0.35.1
4
4
  Summary: Add your description here
5
5
  License-File: LICENSE
6
6
  Requires-Python: ~=3.12
@@ -67,7 +67,7 @@ griptape_nodes/retained_mode/managers/os_manager.py,sha256=zOYcuuTMjlFQm-Hxri0Ta
67
67
  griptape_nodes/retained_mode/managers/secrets_manager.py,sha256=wx69EhWs4EiYSPDhYOhOpU0KE_aMMSf4FWt6AT3cLKg,5829
68
68
  griptape_nodes/retained_mode/managers/settings.py,sha256=NGRonV8do52zNglK0sD75bglBF6rGgn244wtaQwwyls,4379
69
69
  griptape_nodes/retained_mode/managers/static_files_manager.py,sha256=4KcOE5WRNKiLBxeFN_tDmdgmnrNq_wcgpmOdr-b6Fe0,6722
70
- griptape_nodes/retained_mode/managers/workflow_manager.py,sha256=GJTD2HAZbrl6ZToBQTREhecxaG2p7irvmV9yKIFrxK0,102386
70
+ griptape_nodes/retained_mode/managers/workflow_manager.py,sha256=SXRFJmXnLjEOwPxLUrA8fH1YbGt7c6mLwbQO_-HN1xQ,102941
71
71
  griptape_nodes/traits/__init__.py,sha256=bTLXTiZTJz2z15RRLoPI4nvLnNW9FiLcKL_2pT4E10g,32
72
72
  griptape_nodes/traits/add_param_button.py,sha256=Xtc39SfvYY6JDjhxu2wmdeaHW2X4LkpNAQufSTCP3hY,655
73
73
  griptape_nodes/traits/button.py,sha256=rpQQ77ASKH3YJabc5WWw9DpEHQiMg1jx0i0sdkwH-SA,611
@@ -84,8 +84,8 @@ griptape_nodes/updater/__main__.py,sha256=lhMMctbBeni57ximitvkwqJ1TQzk79Jg9w0rkK
84
84
  griptape_nodes/utils/__init__.py,sha256=5-NvqVvxiwuRx2UgyzenuLFXyodvfDqJ_dzcrgZpPOk,33
85
85
  griptape_nodes/utils/dict_utils.py,sha256=kyli5MOfzSor0a8lmXfYBVS_NXGf6UK1SM6k_Qn5bs8,6889
86
86
  griptape_nodes/utils/metaclasses.py,sha256=RSKyAvZppH_hbMugmUmIr8QqOg1sYY4uRNfQybD4O8Q,287
87
- griptape_nodes-0.35.0.dist-info/METADATA,sha256=AEHDD5lbZAOp6_U0_HDurrni4Cp7XljAouXlU3T9Vik,3925
88
- griptape_nodes-0.35.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
89
- griptape_nodes-0.35.0.dist-info/entry_points.txt,sha256=Q8V3Ydy7PNfJgTjNEVkPui25AwZ4HJ3kZCU3oh4mq-c,81
90
- griptape_nodes-0.35.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
91
- griptape_nodes-0.35.0.dist-info/RECORD,,
87
+ griptape_nodes-0.35.1.dist-info/METADATA,sha256=_ZMgtpHkpUBz91eWirZ-Irr9nm3hZgxlHfcnn-uD1ew,3925
88
+ griptape_nodes-0.35.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
89
+ griptape_nodes-0.35.1.dist-info/entry_points.txt,sha256=Q8V3Ydy7PNfJgTjNEVkPui25AwZ4HJ3kZCU3oh4mq-c,81
90
+ griptape_nodes-0.35.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
91
+ griptape_nodes-0.35.1.dist-info/RECORD,,