
     i                         d dl mZ d dlmZmZmZmZ d dlZddlm	Z	m
Z
 ddlmZ ddlmZ ddlmZ 	 	 ddeeef         fdZddeeef         fdZ G d d          Z G d d          Z	 	 ddedeeef         fdZdS )    )Enum)AnyCallableDictTypeN   )Parser
Serializer)Factory)	NameStyle)SchemaTFtype_serializersc                 V     t          j        dt          d            fd}|S )Nthis function is deprecated   
stacklevelc                 &    fd| D             S )Nc                     i | ]I\  }}|                     d           rs-| r|                    d           n|t          |          JS )_N)r   )
startswithrstrip_prepare_value).0kvskip_internal	skip_nonetrim_trailing_underscorer   s      j/root/.openclaw/workspace/.venvs/songid/lib/python3.11/site-packages/dataclass_factory/deprecated_stuff.py
<dictcomp>z.dict_factory.<locals>.impl.<locals>.<dictcomp>   ss     
 
 
1LL%%
 +8
 ?@mS\m 7=QXXc]]]Aqcs@t@t@t>Kmm     )datar   r   r   r   s    r    implzdict_factory.<locals>.impl   s=    
 
 
 
 
 
 

 
 
 	
r"   )warningswarnDeprecationWarning)r   r   r   r   r%   s   ```` r    dict_factoryr)      sW    M/$       
 
 
 
 
 
 
 
 Kr"   c                     |r/t          |           |v r |t          |                    |           S t          | t                    r| j        S | S N)type
isinstancer   value)r.   r   s     r    r   r      sV     4T%[[-===,U,U333% {Lr"   c                   `    e Zd Z	 	 	 	 ddededeeef         deeef         fdZd	ed
efdZ	dS )ParserFactoryTFNr   
debug_pathtype_factoriesname_stylesc                 n   t          j        dt          d           |i }|i }i }t          |          t          |          z  D ]<}t	          |                    |          |                    |                    ||<   =t	          t                   |          }t          |||          | _        d S )Nthis class is deprecatedr   r   )parser
name_styler   default_schemar1   schemas	r&   r'   r(   setr   getr   r   factory)selfr   r1   r2   r3   r;   cr:   s           r    __init__zParserFactory.__init__$   s     	0(!"	$ 	$ 	$ 	$ !NKn%%K(8(88 	 	A%))!,,&??1--  GAJJ
  %=
 
 
 )!
 
 
r"   clsreturnc                 6    | j                             |          S r+   )r?   r6   r@   rC   s     r    
get_parserzParserFactory.get_parserD   s    |""3'''r"   TFNN)
__name__
__module____qualname__boolr   r   r	   r   rB   rG   r#   r"   r    r0   r0   #   s         .2$1515
 
&*
 
 !v.	

 dIo.
 
 
 
@(d (v ( ( ( ( ( (r"   r0   c                   `    e Zd Z	 	 	 	 ddededeeef         deeef         fdZd	ed
e	fdZ
dS )SerializerFactoryTFNr   r1   r   r3   c                 n   t          j        dt          d           |i }|i }i }t          |          t          |          z  D ]<}t	          |                    |          |                    |                    ||<   =t	          t                   |          }t          |||          | _        d S )Nr5   r   r   )
serializerr7   r8   r9   r<   )r@   r   r1   r   r3   r;   rA   r:   s           r    rB   zSerializerFactory.__init__I   s     	0(!"	$ 	$ 	$ 	$ #!K&''#k*:*:: 	 	A+//22&??1--  GAJJ
  %=
 
 
 )!
 
 
r"   rC   rD   c                 6    | j                             |          S r+   )r?   rP   rF   s     r    get_serializerz SerializerFactory.get_serializerh   s    |&&s+++r"   rH   )rI   rJ   rK   rL   r   r   r
   r   rB   r	   rR   r#   r"   r    rN   rN   H   s        26$)<@6:	
 
+/
!
 $(j(8#9
 #4?3	
 
 
 
>,$ ,6 , , , , , ,r"   rN   r   r2   c                     t          j        dt          d            t          |d|                              |          |           S )Nr   r   r   T)r   r1   r2   )r&   r'   r(   r0   rG   )r$   rC   r   r2   s       r    parserT   l   sc     M/$       =!9%   jood	  r"   )TFFNr+   )TN)enumr   typingr   r   r   r   r&   commonr	   r
   r?   r   namingr   schemar   r,   r)   r   r0   rN   rL   rT   r#   r"   r    <module>rZ      s         , , , , , , , , , , , ,  & & & & & & & &                   PU:> #'h#7     Dx,@    "( "( "( "( "( "( "( "(J!, !, !, !, !, !, !, !,N *..2	  #' S(]+	     r"   