1515from typing import Optional
1616import warnings
1717
18+ import bigframes
1819import bigframes .exceptions as bfe
1920
2021
@@ -26,10 +27,6 @@ class ExperimentOptions:
2627 def __init__ (self ):
2728 self ._semantic_operators : bool = False
2829 self ._ai_operators : bool = False
29- self ._blob : bool = False
30- self ._blob_display : bool = True
31- self ._blob_display_width : Optional [int ] = None
32- self ._blob_display_height : Optional [int ] = None
3330
3431 @property
3532 def semantic_operators (self ) -> bool :
@@ -60,41 +57,72 @@ def ai_operators(self, value: bool):
6057
6158 @property
6259 def blob (self ) -> bool :
63- return self ._blob
60+ msg = bfe .format_message (
61+ "BigFrames Blob is in preview now. This flag is no longer needed."
62+ )
63+ warnings .warn (msg , category = bfe .ApiDeprecationWarning )
64+ return True
6465
6566 @blob .setter
6667 def blob (self , value : bool ):
67- if value is True :
68- msg = bfe .format_message (
69- "BigFrames Blob is still under experiments. It may not work and "
70- "subject to change in the future."
71- )
72- warnings .warn (msg , category = bfe .PreviewWarning )
73- self ._blob = value
68+ msg = bfe .format_message (
69+ "BigFrames Blob is in preview now. This flag is no longer needed."
70+ )
71+ warnings .warn (msg , category = bfe .ApiDeprecationWarning )
7472
7573 @property
7674 def blob_display (self ) -> bool :
7775 """Whether to display the blob content in notebook DataFrame preview. Default True."""
78- return self ._blob_display
76+ msg = bfe .format_message (
77+ "BigFrames Blob is in preview now. The option has been moved to bigframes.options.display.blob_display."
78+ )
79+ warnings .warn (msg , category = bfe .ApiDeprecationWarning )
80+
81+ return bigframes .options .display .blob_display
7982
8083 @blob_display .setter
8184 def blob_display (self , value : bool ):
82- self ._blob_display = value
85+ msg = bfe .format_message (
86+ "BigFrames Blob is in preview now. The option has been moved to bigframes.options.display.blob_display."
87+ )
88+ warnings .warn (msg , category = bfe .ApiDeprecationWarning )
89+
90+ bigframes .options .display .blob_display = value
8391
8492 @property
8593 def blob_display_width (self ) -> Optional [int ]:
8694 """Width in pixels that the blob constrained to."""
87- return self ._blob_display_width
95+ msg = bfe .format_message (
96+ "BigFrames Blob is in preview now. The option has been moved to bigframes.options.display.blob_display_width."
97+ )
98+ warnings .warn (msg , category = bfe .ApiDeprecationWarning )
99+
100+ return bigframes .options .display .blob_display_width
88101
89102 @blob_display_width .setter
90103 def blob_display_width (self , value : Optional [int ]):
91- self ._blob_display_width = value
104+ msg = bfe .format_message (
105+ "BigFrames Blob is in preview now. The option has been moved to bigframes.options.display.blob_display_width."
106+ )
107+ warnings .warn (msg , category = bfe .ApiDeprecationWarning )
108+
109+ bigframes .options .display .blob_display_width = value
92110
93111 @property
94112 def blob_display_height (self ) -> Optional [int ]:
95113 """Height in pixels that the blob constrained to."""
96- return self ._blob_display_height
114+ msg = bfe .format_message (
115+ "BigFrames Blob is in preview now. The option has been moved to bigframes.options.display.blob_display_height."
116+ )
117+ warnings .warn (msg , category = bfe .ApiDeprecationWarning )
118+
119+ return bigframes .options .display .blob_display_height
97120
98121 @blob_display_height .setter
99122 def blob_display_height (self , value : Optional [int ]):
100- self ._blob_display_height = value
123+ msg = bfe .format_message (
124+ "BigFrames Blob is in preview now. The option has been moved to bigframes.options.display.blob_display_height."
125+ )
126+ warnings .warn (msg , category = bfe .ApiDeprecationWarning )
127+
128+ bigframes .options .display .blob_display_height = value
0 commit comments