/opt/cloudlinux/venv/lib/python3.11/site-packages/raven/__pycache__
NameSizeModeActions
base.cpython-311.opt-1.pyc421820644editdlrm
base.cpython-311.pyc421820644editdlrm
breadcrumbs.cpython-311.opt-1.pyc171790644editdlrm
breadcrumbs.cpython-311.pyc172700644editdlrm
context.cpython-311.opt-1.pyc68180644editdlrm
context.cpython-311.pyc68180644editdlrm
events.cpython-311.opt-1.pyc69920644editdlrm
events.cpython-311.pyc69920644editdlrm
exceptions.cpython-311.opt-1.pyc22100644editdlrm
exceptions.cpython-311.pyc22100644editdlrm
middleware.cpython-311.opt-1.pyc62260644editdlrm
middleware.cpython-311.pyc62260644editdlrm
processors.cpython-311.opt-1.pyc93520644editdlrm
processors.cpython-311.pyc93520644editdlrm
versioning.cpython-311.opt-1.pyc40790644editdlrm
versioning.cpython-311.pyc40790644editdlrm
__init__.cpython-311.opt-1.pyc25320644editdlrm
__init__.cpython-311.pyc25320644editdlrm
Edit: /opt/cloudlinux/venv/lib/python3.11/site-packages/raven/__pycache__/breadcrumbs.cpython-311.pyc (17270B)
݋f3ddlmZddlZddlZ ddlmZn#e$r ddlmZYnwxYwddlmZddl m Z ddl m Z ddl mZddlmZmZmZmZd Zd ZgZiZejd Zd ZGd deZGddeZd"dZdZ d#dZ dZ!d$dZ"dZ#e dZ$d$dZ%dZ&dZ'iZ(dZ)e)ddZ*e)dd Z+d!Z,ddl-Z.dS)%)absolute_importN)Mapping)time) FunctionType)once) to_unicode) iteritemsget_code text_type string_typesravenc|d|dkoG|d|dko5|d|dko#|d|dko|d|dkS)Ntypelevelmessagecategorydata)abs F/opt/cloudlinux/venv/lib/python3.11/site-packages/raven/breadcrumbs.pyevent_payload_considered_equalrso & QvY # gJ!G* $ # iLAiL ( # jMQz] * # fI6 " c4eZdZd dZ d dZdZdZdZdS) BreadcrumbBufferdc0g|_||_||_dSN)bufferlimitmessage_max_length)selfr#r$s r__init__zBreadcrumbBuffer.__init__(s  "4rNc |s|s|std|t}||pdt|||||d|f}|j||jd|j =dS)Nz6You must pass either `message`, `data`, or `processor`default)r timestamprrrr) ValueErrorrformatfloatr"appendr#) r%r)rrrrr processorresults rrecordzBreadcrumbBuffer.record-s /4 /9 /.// /  I++%Iy))         6""" K $* % % %rc|jdd=dSr!)r")r%s rclearzBreadcrumbBuffer.clearCs KNNNrcD|dr"t|dd|jnd|d<|dr"t|ddtnd|d<|dr4t|ddtnd|d<|S)Nrrr)rr$CATEGORY_MAX_LENGTHLEVEL_MAX_LENGTHlower)r%r/s rr+zBreadcrumbBuffer.formatFsW]^gWhrJvi'899:R4;R:RSSnryU[\fUgqZz(:;;Gdkk'2224GG !####%,T? C  $++g.."#>B&&&&, rrceZdZdZdS)BlackholeBreadcrumbBuffercdSr!r)r%argskwargss rr0z BlackholeBreadcrumbBuffer.recordds rN)rBrCrDr0rrrrFrFcs#     rrFTc>|rtStSr!)rrF)enableds r make_bufferrLhs""!!! $ & &&rc$||d<t|i|S)Nr)r0)rrHrIs rrecord_breadcrumbrNnsF6N 4 "6 " ""rc |t}tjD]"}|j|||||||#dS)zRecords a breadcrumb for all active clients. This is what integration code should use rather than invoking the `captureBreadcrumb` method on a specific client. N)rrcontextget_active_contexts breadcrumbsr0)rr)rrrrr.ctxs rr0r0tsh FF }002266 y%(#T9 6 6 6 666rctD]}|rdStj}||rdSfd}t |dS)Nc }}di}}||rStdkr@tdtr%drd}|| t }|r |z}n#t $rYnwxYwdd||jtj  |ddS)Nextrarexc_info)rrrr) popupdatelen isinstancerr r:namelogging getLevelNamer6) r formatted_msg format_argsrV data_valuerHrIrr;msgs rr.z)_record_log_breadcrumb..processors0   7B'' %    +CIINNz$q'7'C'CNQNq'K   k * * * %cNNM 2 #k 1     D   :t$$$ $ )%006688        s B B-,B-)r.)special_logging_handlersspecial_logger_handlersgetr]r0)r;rrcrHrIhandlerr.s````` r_record_log_breadcrumbrhs+ 765#tV 4 4  FF &))&+66Gwwvuc4HH          B Yrc t|ts|j}n|}t|ddrdS|d}d}nd}d|z}t |}t j}|3tj t j j j }i}ttdd|jd z z|jd |||d z|d t j||d |t&}|j|_|jt |jksJ|j|jk|j|jkd|_|S)N__patched_for_raven__F)rrcz level, msg)rcz%d, msga%(offset)sif 1: def factory(original, record_crumb): def %(name)s(self, %(args)s, *args, **kwargs): record_crumb(self, %(fwd)s, *args, **kwargs) return original(self, %(args)s, *args, **kwargs) return %(name)s  z, )offsetr]rHfwdrexecfactoryT)r\rim_funcgetattrr r^_srcfileospathnormpath currentframe__code__ co_filenameevalcompileco_firstlinenorBjoin__dict__rh__doc__rCrj) methrfuncrHrncodelogging_srcfilensnew_funcs r_wrap_logging_methodrs| dL ) )|t,e44 }% D>>D&O'**  ) 5  ( B $-12  $     ")!12 7 7 7r)}T#9::H|H  (4.."? ? ? ? ? 4?** &&%)H" Orc tj}tjtjtjtjtjtjtjtjd}t|D]>\}}tt|||}ttj||?ttjj tj_ dS)N)debuginfowarningwarnerrorr<criticalfatal)r^LoggerDEBUGINFOWARNINGWARNERRORCRITICALFATALr rrrsetattrlog)clsmethods method_namerrs r _patch_loggerrs .C ? ]$  G(0077 U' C % %u.. X6666-GNrc"tdS)zXInstalls the logging hook if it was not installed yet. Otherwise does nothing. N)rrrrinstall_logging_hookr s OOOOOrc2fd}t||dS)z2Ignores a logger during breadcrumb recording. c|krdSdS)NFTr)r;rrcrHrI allow_levels rrgzignore_logger..handlers  " K  5trN)register_special_log_handler)name_or_loggerrrgs ` r ignore_loggerrs4 !99999rcXt|tr|}n|j}|t|<dS)aRegisters a callback for log handling. The callback is invoked with given arguments: `logger`, `level`, `msg`, `args` and `kwargs` which are the values passed to the logging system. If the callback returns true value the default handling is disabled. Only one callback can be registered per one logger name. Logger tree is not traversed so calling this method with `spammy_module` argument will not silence messages from `spammy_module.child`. N)r\r r]re)rcallbackr]s rrrs6.,//#"$,D!!!rc:t|dS)a;Registers a callback for log handling. The callback is invoked with given arguments: `logger`, `level`, `msg`, `args` and `kwargs` which are the values passed to the logging system. If the callback returns true value the default handling is disabled. Registering multiple handlers is allowed. N)rdr-)rs rregister_logging_handlerr.s##H-----rcfd}|S)Nc:t|}|t<|Sr!)rhooked_libraries)fr]s r decoratorzlibraryhook..decorator<s GG!"rr)r]rs` r libraryhookr;s$ rrequestsc ddlm}n#t$rYdSwxYw|jfd}||_t dt jdS)Nr)Sessionc|fd} |g|Ri|}||n#t$r |dwxYw|S)Nc ntddjj|r|jpd|r|jpdddS)Nhttpr)urlmethod status_codereason)rrr)r0rrrr)responserequests r_record_requestz5_hook_requests..send.._record_requestMs[ {!.'@H,@HD"6x>$ ;;      r)r:)r%rrHrIrresp real_sends ` rsendz_hook_requests..sendLs      "9T7.putrequest..processorssH&&'>??  C'3G=v==DL(9UT\?R?C   DL L   ' ' 'Krrr)rrr.)_raven_status_dictrrrr0) r%rrrHrIr.rrrrreal_putrequests `` @@@@r putrequestz$_install_httplib..putrequestms+--&yy(            FZ9EEEEtVSB4BBB6BBBrcv|g|Ri|}t|dd}|d|vr|j|d<|j|d<|S)Nrrr)rrrr)r%rHrIr=rreal_getresponses r getresponsez%_install_httplib..getresponsesb  d 4T 4 4 4V 4 43T::  -v"="=$&IF= !!yF8  r)rrr http.clientrr)rrrrrs @@r_install_httplibrcs/******* ///......../%/O%1CCCCC0!+N!,Ns  c|t}|D]:}t|}|td|z|;dS)NzUnknown library %r for hooking)rkeysrf RuntimeError) librarieslibrs rhook_librariesrsk$))++ ##C(( <?#EFF F  r)TrAr!)/ __future__rrtr^collections.abcrr collectionsrtypesr raven.utilsrraven.utils.encodingrraven.utils.compatr r r r r4r5rdre getLoggerr;robjectrrFrLrNr0rhrrrrrrrrrrr raven.contextrrrrrs&&&&&& $'''''''$$$########$++++++KKKKKKKKKKKK  7 # #:::::v:::z     0   '''' ### ?C+/ 6 6 6 6* * * ZCCCCL.:::: - - - ... Z///> Y*-*-*-Zs  %%