
    ɯei+              	           U d Z ddlZddlmZmZ ddlZddlZ ej                  e	      Z
dZdZeed<   dZeedef      ed<   da ej"                         adZdadadadZi Zdddd	d
edededdfdZd ZddZy)zContext module for Snowpark.    N)CallableOptionalTF._is_execution_environment_sandboxed_for_client._should_continue_registration)enable_eager_schema_validationenable_dataframe_trace_on_error$enable_trace_sql_errors_to_dataframer   r   r	   returnc                    t         j                  d       | a|s|r/	 t               }|t         j                  d       y|a|ad|_        ydaday# t        $ r,}t         j                  dt        |       d       Y d}~yd}~ww xY w)a  
    Configure development features for the session.

    Args:
        enable_eager_schema_validation: If True, dataframe schemas are eagerly validated by querying
            for column metadata after every dataframe operation. This adds additional query overhead.
        enable_dataframe_trace_on_error: If True, upon failure, we will add most recent dataframe
            operations to the error trace. This enables the AST collection in the session.
        enable_trace_sql_errors_to_dataframe: If True, we will enable tracing sql compilation errors
            to the associated dataframe operations. This enables the AST collection in the session.
    Note:
        This feature is experimental since 1.33.0. Do not use it in production.
    z[configure_development_features() is experimental since 1.33.0. Do not use it in production.Nz~No active session found. Please create a session first and call `configure_development_features()` after creating the session.Tz3Cannot enable AST collection in the session due to z5. Some development features may not work as expected.F)	_loggerwarning_debug_eager_schema_validationget_active_session _enable_dataframe_trace_on_error%_enable_trace_sql_errors_to_dataframeast_enabled	Exceptionstr)r   r   r	   sessiones        \/var/www/html/glpi_dashboard/venv/lib/python3.12/site-packages/snowflake/snowpark/context.pyconfigure_development_featuresr   4   s    & OOe &D"&*N	(*GU /N,4X1"&G ,1(05-  	OOEc!fX  NC  D 	s   !A A 	B"B  Bc                  F    t         5  t        cd d d        S # 1 sw Y   y xY w)N)#_use_structured_type_semantics_lock_use_structured_type_semantics     r   %_should_use_structured_type_semanticsr   d   s     
- .-. . .s    c                  R    t         j                  j                  j                         S )zReturns the current active Snowpark session.

    Raises: SnowparkSessionException: If there is more than one active session or no active sessions.

    Returns:
        A :class:`Session` object for the current session.
    )	snowflakesnowparkr   _get_active_sessionr   r   r   r   r   k   s     %%99;;r   )r
   zsnowflake.snowpark.Session)__doc__loggingtypingr   r   snowflake.snowparkr    	threading	getLogger__name__r   _use_scoped_temp_objectsr   bool__annotations__r   r   RLockr   $_is_snowpark_connect_compatible_moder   r   r   _enable_fix_2360274 _integral_type_default_precisionr   r   r   r   r   r   <module>r1      s    #  %  
'

H
%  8= . < @D xd(;< C "' &5ioo&7 # (- $ $)  !&  ). %  
 $&  
 ,1,116	-6$(-6 &*-6 +/	-6
 
-6`.<r   