tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
M\¬Qc@sSdZddlZddlZddlZddddddgZdd    d
„Zddd „ZeZdd „Z    d e
d ddd„Z e
ddd„Z d„Z defd„ƒYZd„Zd„Zd„Zd„Zdd    d„Zdddd„Zdefd„ƒYZdefd„ƒYZeZy>ddlmZmZmZmZmZeZeZ e!ZWn#e"k
r•gZdZiZ nXeej#ƒesLe$e%gZ&ej' rÜej(j) rÜe&j*e+ƒnxe&D]Z,e dd e,ƒqãWej(j-Z-e-d    krd!Z.ne-r-dZ.ndZ.e e.d e/d"d    ƒn[dS(#s&Python part of the warnings subsystem.iÿÿÿÿNtwarnt showwarningt formatwarningtfilterwarningst resetwarningstcatch_warningsicCs9tjr5|dkrt}nt|||dƒndS(s‡Issue a deprecation warning for Python 3.x related changes.
 
    Warnings are omitted unless Python is started with the -3 option.
    iN(tsyst py3kwarningtNonetDeprecationWarningR(tmessagetcategoryt
stacklevel((sP/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/warnings.pytwarnpy3ks         cCsS|dkrtj}ny#|jt|||||ƒƒWntk
rNnXdS(s7Hook to write a warning to a file; replace if you like.N(RRtstderrtwriteRtIOError(R
R tfilenametlinenotfiletline((sP/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/warnings.pyt _show_warnings   # cCsdd|||j|f}|dkr7tj||ƒn|}|r`|jƒ}|d|7}n|S(s.Function to format a warning the standard way.s%s:%s: %s: %s
s  %s
N(t__name__Rt    linecachetgetlinetstrip(R
R RRRts((sP/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/warnings.pyR$s $ ticCsddl}|dks+td    |fƒ‚t|tƒsFtd
ƒ‚t|ttjfƒsjtd ƒ‚t|tƒs…td ƒ‚t|tƒs td ƒ‚t|t    ƒr»|dksÇtdƒ‚||j
||j ƒ||j
|ƒ|f}|r
t j |ƒnt jd|ƒdS(sÖInsert an entry into the list of warnings filters (at the front).
 
    'action' -- one of "error", "ignore", "always", "default", "module",
                or "once"
    'message' -- a regex that the warning message must match
    'category' -- a class that the warning must be a subclass of
    'module' -- a regex that the module name must match
    'lineno' -- an integer line number, 0 matches all warnings
    'append' -- if true, append to the list of filters
    iÿÿÿÿNterrortignoretalwaystdefaulttmoduletoncesinvalid action: %rsmessage must be a stringscategory must be a classs#category must be a Warning subclasssmodule must be a stringislineno must be an int >= 0(serrorsignoresalwayssdefaultsmodulesonce(tretAssertionErrort
isinstancet
basestringttypettypest    ClassTypet
issubclasstWarningtinttcompiletItfilterstappendtinsert(tactionR
R R RR/R"titem((sP/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/warnings.pyR-s         cCs…|d kstd|fƒ‚t|tƒr:|dksFtd    ƒ‚|d
|d
|f}|rqtj|ƒntjd|ƒd
S( sInsert a simple entry into the list of warnings filters (at the front).
 
    A simple filter matches all modules and messages.
    'action' -- one of "error", "ignore", "always", "default", "module",
                or "once"
    'category' -- a class that the warning must be a subclass of
    'lineno' -- an integer line number, 0 matches all warnings
    'append' -- if true, append to the list of filters
    RRRRR R!sinvalid action: %rislineno must be an int >= 0N(serrorsignoresalwayssdefaultsmodulesonce(R#R$R+RR.R/R0(R1R RR/R2((sP/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/warnings.pyt simplefilterJs
    cCs gt(dS(sAClear the list of warning filters, so that no filters are active.N(R.(((sP/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/warnings.pyR^st _OptionErrorcBseZdZRS(s,Exception used by option processing helpers.(Rt
__module__t__doc__(((sP/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/warnings.pyR4bscCsLxE|D]=}yt|ƒWqtk
rC}tjdI|IJqXqWdS(NsInvalid -W option ignored:(t
_setoptionR4RR(targstargtmsg((sP/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/warnings.pyt_processoptionsgs
 c    Cs[ddl}|jdƒ}t|ƒdkrCtd|fƒ‚nx#t|ƒdkrh|jdƒqFWg|D]}|jƒ^qp\}}}}}t|ƒ}|j|ƒ}t|ƒ}|j|ƒ}|rà|d}n|r;y%t    |ƒ}|dkr
t
‚nWqAt
t fk
r7td|fƒ‚qAXnd}t |||||ƒdS(    Niÿÿÿÿt:istoo many fields (max 5): %rRt$isinvalid lineno %r( R"tsplittlenR4R/Rt
_getactiontescapet _getcategoryR+t
ValueErrort OverflowErrorR(    R9R"tpartsRR1R
R R R((sP/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/warnings.pyR7os. +      cCsU|s
dS|dkrdSx!d    D]}|j|ƒr!|Sq!Wtd|fƒ‚dS(
NRtallRRR R!Rsinvalid action: %r(sdefaultsalwayssignoresmodulesonceserror(t
startswithR4(R1ta((sP/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/warnings.pyR@Šs  cCs/ddl}|stS|jd|ƒrbyt|ƒ}Wqtk
r^td|fƒ‚qXn¤|jdƒ}|| }||d}yt|dd|gƒ}Wn$t    k
rËtd|fƒ‚nXyt
||ƒ}Wn$t k
rtd|fƒ‚nXt |tƒs+td|fƒ‚n|S(Niÿÿÿÿs^[a-zA-Z0-9_]+$sunknown warning category: %rt.isinvalid module name: %rsinvalid warning category: %r( R"R*tmatchtevalt    NameErrorR4trfindt
__import__Rt ImportErrortgetattrtAttributeErrorR)(R R"tcattiR tklasstm((sP/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/warnings.pyRB”s,  
  c
Csgt|tƒr|j}n|d kr0t}nt|tƒsEt‚ytj|ƒ}Wn t    k
rztj
}d}nX|j }|j }d|kr¦|d}nd}|j dƒ}|rì|jƒ}|jd ƒr5|d }q5nI|dkr&ytjd    }Wq&tk
r"d}q&Xn|s5|}n|jd
iƒ}    t||||||    |ƒd S( s:Issue a warning, or maybe ignore it or raise an exception.iRs<string>t__file__s.pycs.pyoiÿÿÿÿt__main__it__warningregistry__N(s.pycs.pyo(R$R*t    __class__Rt UserWarningR)R#Rt    _getframeRCt__dict__t    f_globalstf_linenotgettlowertendswithtargvRQt
setdefaultt warn_explicit(
R
R R tcallertglobalsRR Rtfnltregistry((sP/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/warnings.pyR¯s<           
                  c
Csbt|ƒ}|dkrJ|p!d}|djƒdkrJ|d }qJn|dkr_i}nt|tƒr†t|ƒ}|j}n|}||ƒ}|||f}|j|ƒrºdSxŠtD]|}    |    \}
} } } }| dks÷| j    |ƒrÁt
|| ƒrÁ| dks!| j    |ƒrÁ|dks9||krÁPqÁqÁWt }
|
dkrad||<dSt j ||ƒ|
dkr†|‚n|
dkrÈd||<||f}tj|ƒr»dSdt|<nƒ|
d    kr×nt|
d
krd||<||df}|j|ƒrdSd||<n/|
d kr5d||<ntd |
|    fƒ‚t||||ƒdS( Ns    <unknown>iýÿÿÿs.pyiRiRR!RR Rs1Unrecognized action (%r) in warnings.filters:
 %s(R+RR`R$R*tstrRYR_R.RJR)t defaultactionRtgetlinest onceregistryt RuntimeErrorR(R
R RRR Rhtmodule_globalsttexttkeyR2R1R:RRtmodtlntoncekeytaltkey((sP/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/warnings.pyRd×sb             
      
 
   tWarningMessagecBs,eZdZd    Zd
d
d„Zd„ZRS( s0Holds the result of a single showwarning() call.R
R RRRRc    CsMtƒ}x%|jD]}t||||ƒqW|r@|jnd|_dS(N(tlocalst_WARNING_DETAILStsetattrRRt_category_name(    tselfR
R RRRRt local_valuestattr((sP/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/warnings.pyt__init__ s    cCs&d|j|j|j|j|jfS(NsD{message : %r, category : %r, filename : %r, lineno : %s, line : %r}(R
RyRRR(Rz((sP/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/warnings.pyt__str__'s (smessagescategorysfilenameslinenosfileslineN(RR5R6RwRR}R~(((sP/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/warnings.pyRus  cBs8eZdZedd„Zd„Zd„Zd„ZRS(sA context manager that copies and restores the warnings filter upon
    exiting the context.
 
    The 'record' argument specifies whether warnings should be captured by a
    custom implementation of warnings.showwarning() and be appended to a list
    returned by the context manager. Otherwise None is returned by the context
    manager. The objects appended to the list are arguments whose attributes
    mirror the arguments to showwarning().
 
    The 'module' argument is to specify an alternative module to the module
    named 'warnings' and imported under that name. This argument is only useful
    when testing the warnings module itself.
 
    cCs8||_|dkr"tjdn||_t|_dS(sêSpecify whether to record warnings and if an alternative module
        should be used other than sys.modules['warnings'].
 
        For compatibility with Python 3.0, please consider all arguments to be
        keyword-only.
 
        twarningsN(t_recordRRtmodulest_moduletFalset_entered(RztrecordR ((sP/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/warnings.pyR}>s    "cCsrg}|jr|jdƒn|jtjdk    rL|jd|jƒnt|ƒj}d|dj|ƒfS(Ns record=TrueRs    module=%rs%s(%s)s, (R€R/R‚RRR&Rtjoin(RzR8tname((sP/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/warnings.pyt__repr__Js    cs‰|jrtd|ƒ‚nt|_|jj|_|j|j_|jj|_|jrg‰‡fd†}||j_ˆSdSdS(NsCannot enter %r twicecsˆjt||ŽƒdS(N(R/Ru(R8tkwargs(tlog(sP/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/warnings.pyR\s(
R„RmtTrueR‚R.t_filtersRt _showwarningR€R(RzR((RŠsP/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/warnings.pyt    __enter__Ss             cGs>|jstd|ƒ‚n|j|j_|j|j_dS(Ns%Cannot exit %r without entering first(R„RmRŒR‚R.RR(Rztexc_info((sP/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/warnings.pyt__exit__cs    N(    RR5R6RƒRR}RˆRŽR(((sP/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/warnings.pyR-s
            (R.tdefault_actiont once_registryRRdRRR RR/(0R6RRR't__all__RR RRRR*RR3Rt    ExceptionR4R;R7R@RBRRdtobjectRuRRƒt_warnings_defaultst    _warningsR.R‘R’RjRlR‹ROt warnoptionst ImportWarningtPendingDeprecationWarningtsilenceRtflagstdivision_warningR/R    tclst bytes_warningt bytes_actiont BytesWarning(((sP/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/warnings.pyt<module>s^     
 
                      
   )AE(