bg ^dZddlmZmZddlZddlmZmZmZm Z m Z dZ d d Z d Z d Zd ZdS)z raven.utils.encoding ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. )absolute_importunicode_literalsN) integer_types text_type binary_type string_typesPY2c ddl}ddl}t|tt dt ||j|j|jfzS)zDetermine if the object instance is of a protected type. Objects of protected types are preserved as-is when passed to force_text(strings_only=True). rN)Decimaldatetime isinstancertypefloatdatetime)objr r s K/opt/cloudlinux/venv/lib64/python3.11/site-packages/raven/utils/encoding.pyis_protected_typersP NNNOOO c=DJJw8=(-,99 : ::utf-8Fstrictcxt|tr|Srt|r|S t|tst |dr|}nst s7t|trt|}nEt|}n5tt|}n|}n]#t$rP}t|tst|j d fd|D}Yd}~nd}~wwxYw|S)z Similar to smart_text, except that lazy instances are resolved to strings, rather than kept as lazy objects. If strings_only is True, don't convert (some) non-string-like objects. __unicode__ c4g|]}t|S) force_text).0argencodingerrors strings_onlys r zforce_text..Cs<*** #%S(L***rN) r rrrhasattrrr bytesdecodeUnicodeDecodeError Exceptionargsjoin)sr r"r!es ``` rrrsp!Y)!,,+!\** +q-(( >MMOO>!!U++)%a6::%aLL!%((Hf==AA 6**A  + + +!Y'' +$af- -******'(***++AAAAAA + HsB-C D7'AD22D7cXddlm}tjdt||S)Nr) transformz5You should switch to raven.utils.serializer.transform)raven.utils.serializerr.warningswarnDeprecationWarning)valuer.s rr.r.HsB000000 M1333 9U  rc  tt|}nn#ttf$rd}YnYt$rM ttt t |}n#t$rd}YnwxYwYnwxYw|S)Nz(Error decoding value))rrUnicodeEncodeErrorr'r(reprrr3s r to_unicoder8Ps-*U++,,  2 3)))( --- -jd5kk):):;;<r?s98888888 : : :) ) ) ) X   11111r