Module Expr Str ImportFrom alias Import alias ImportFrom alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Num FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If UnaryOpNot AttributeLoad NameLoad attr body Return NameLoad Assign NameStore AttributeLoad NameLoad attr If BoolOpAnd Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Return NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults vararg body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Return Call AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list Assign NameStore ListLoad FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list Assign NameStore Num Assign NameStore Num Assign NameStore TupleLoad Str Str Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str ListLoad Str Str ListLoad Str Str ListLoad Str Str ListLoad Str Str ListLoad Str Str ListLoad Str Str ListLoad Str Str ListLoad Str Str ListLoad Str Str Str ListLoad Str Str Str ListLoad Str Str ListLoad Str Str ListLoad Str Str ListLoad Str Str ListLoad Str Str Global identifier identifier identifier identifier identifier Global identifier identifier identifier Global identifier identifier identifier Global identifier identifier identifier Global identifier identifier identifier Global identifier FunctionDef arguments args defaults body Expr Str Global identifier identifier identifier identifier identifier Global identifier identifier identifier Global identifier identifier identifier Global identifier identifier identifier Global identifier identifier identifier identifier Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore ListLoad Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Num Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Num Assign NameStore Call AttributeLoad NameLoad attr Str Num Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Num Assign NameStore Call NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Global identifier Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list FunctionDef arguments args defaults body Expr Str Global identifier identifier identifier Global identifier identifier identifier Global identifier identifier identifier Global identifier identifier identifier identifier Assign NameStore Num Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Assign NameStore Call NameLoad Assign NameStore Num Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Assign NameStore Call NameLoad Assign NameStore ListLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad decorator_list Assign NameStore Call NameLoad Str ListLoad Str Str Str Str Str Str Str Str Str Str Str Str Str ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad Assign NameStore ListLoad Str Str Str Str Str Assign NameStore Num Assign NameStore Num FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Num NameLoad Str NameLoad NameLoad Num NameLoad NameLoad NameLoad NameLoad body Expr Str Return Call NameLoad keyword NameLoad keyword NameLoad keyword BoolOpOr NameLoad ListLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword BoolOpOr NameLoad ListLoad AttributeLoad NameLoad attr keyword BoolOpOr NameLoad AttributeLoad NameLoad attr keyword NameLoad keyword BoolOpOr NameLoad ListLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list Assign NameStore Call NameLoad NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore BinOpAdd SubscriptLoad NameLoad Slice Num NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr Call AttributeLoad NameLoad attr BinOpMod Str Dict Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr If NameLoad body For NameStore NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareIs AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Call AttributeLoad NameLoad attr If BoolOpOr CompareLt Call NameLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr CompareGt Call NameLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr If CompareNotIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Assign NameStore Dict Str Str AttributeLoad AttributeLoad NameLoad attr attr ListLoad AttributeLoad NameLoad attr Assign NameStore Dict Str Str AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str If AttributeLoad AttributeLoad NameLoad attr attr body AugAssignAdd AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr AugAssignAdd AttributeStore NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body For TupleStore NameStore NameStore AttributeLoad NameLoad attr body If BoolOpOr CompareEq NameLoad Str CompareEq NameLoad Str body Assign AttributeStore NameLoad attr NameLoad Break Assign AttributeStore NameLoad attr AttributeLoad Call NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareLt Call NameLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore IfExp CompareGt AttributeLoad AttributeLoad NameLoad attr attr Num Str Str Assign NameStore BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Assign NameStore BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AugAssignAdd NameStore BinOpMod Str TupleLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Raise Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore BinOpMod Str TupleLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Raise Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str TryExcept body Assign TupleStore AttributeStore NameLoad attr AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr BoolOpOr AttributeLoad AttributeLoad NameLoad attr attr ListLoad handlers ExceptHandler type AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Slice AttributeLoad AttributeLoad NameLoad attr attr body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr If BoolOpAnd UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Slice AttributeLoad AttributeLoad NameLoad attr attr body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Return Call NameLoad NameLoad AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call NameLoad NameLoad If BoolOpAnd Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr body If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse For NameStore Call AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr keyword ListLoad Str body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad AttributeLoad NameLoad attr Expr Call NameLoad NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad If CompareGtE Call NameLoad NameLoad Num body Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword BoolOpOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword UnaryOpNot AttributeLoad NameLoad attr If BoolOpAnd UnaryOpNot AttributeLoad NameLoad attr UnaryOpNot AttributeLoad NameLoad attr body Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If NameLoad body Assert UnaryOpNot AttributeLoad NameLoad attr Assign NameStore NameLoad orelse Assign NameStore AttributeLoad NameLoad attr Assign NameStore IfExp AttributeLoad NameLoad attr Str Str Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad NameLoad If BoolOpAnd CompareEq Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr CompareNotEq AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str TryFinally body TryExcept body Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Raise finalbody Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str TryExcept body If Call AttributeLoad NameLoad attr body If AttributeLoad NameLoad attr body If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword ListLoad Str orelse Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr keyword ListLoad Str orelse If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword ListLoad Str orelse Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr keyword ListLoad Str orelse If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Raise ExceptHandler type NameLoad name NameStore body If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Raise decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Slice Num If UnaryOpNot Call NameLoad NameLoad body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body With Call AttributeLoad NameLoad attr NameLoad Str NameLoad NameStore body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num keyword AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr If CompareNotIn NameLoad NameLoad body Raise Call NameLoad BinOpMod Str NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad If BoolOpAnd UnaryOpNot AttributeLoad NameLoad attr UnaryOpNot AttributeLoad NameLoad attr body Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str ImportFrom alias If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad If BoolOpAnd CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr CompareNotEq AttributeLoad NameLoad attr Str body TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Print Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Raise orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr If UnaryOpNot NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad NameLoad orelse Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Raise Call NameLoad BinOpMod Str NameLoad Print Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad If Call AttributeLoad NameLoad attr body Assign NameStore Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr keyword ListLoad Str orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore ListLoad Str orelse Assign NameStore ListLoad Str Assign NameStore Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr keyword NameLoad If Call AttributeLoad NameLoad attr body Raise Call NameLoad Str If Call AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr Return SubscriptLoad Call NameLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad If Call AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr Assign NameStore SubscriptLoad Call NameLoad NameLoad Index Num Return TupleLoad Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad If BoolOpOr UnaryOpNot Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr keyword NameLoad If Call AttributeLoad NameLoad attr body Raise Call NameLoad Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr If NameLoad body For NameStore NameLoad body Expr Call AttributeLoad AttributeLoad SubscriptLoad NameLoad Index NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If BoolOpOr AttributeLoad NameLoad attr NameLoad body If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr If CompareLt NameLoad Num body Raise Call NameLoad BinOpMod Str NameLoad If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr If CompareLt NameLoad Num body Raise Call NameLoad BinOpMod Str NameLoad orelse Assign NameStore Num Assign NameStore Num If BoolOpAnd NameLoad CompareGt NameLoad Num body Raise Call NameLoad Call AttributeLoad Str attr Call AttributeLoad NameLoad attr BinOpMod Str Call NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Global identifier identifier identifier Global identifier identifier identifier Global identifier identifier identifier Global identifier identifier identifier With NameLoad body If Call NameLoad NameLoad NameLoad body AugAssignAdd NameStore Num Assign NameStore NameLoad orelse AugAssignAdd AttributeStore NameLoad attr Num Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad AugAssignAdd AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad Num Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad Num Assign SubscriptStore NameLoad Index NameLoad ListLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd AttributeStore NameLoad attr Num If CompareGt AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str For NameStore Call NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword TupleLoad NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str If NameLoad body Assign NameStore Dict For NameStore NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Num Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore BoolOpAnd CompareEq AttributeLoad NameLoad attr Num CompareEq AttributeLoad NameLoad attr Num Assign NameStore BoolOpAnd NameLoad CompareEq BinOpMult NameLoad NameLoad Num If BoolOpAnd NameLoad UnaryOpNot AttributeLoad NameLoad attr CompareGt NameLoad Num body Expr Call NameLoad keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Assign SubscriptStore NameLoad Index NameLoad NameLoad For NameStore NameLoad body Assign SubscriptStore NameLoad Index TupleLoad NameLoad NameLoad Num Assign NameStore IfExp AttributeLoad NameLoad attr NameLoad Num If CompareGt BinOpMult NameLoad NameLoad Num body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad If NameLoad body For NameStore NameLoad body Assign NameStore BinOpAdd SubscriptLoad NameLoad Index NameLoad Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad If NameLoad body Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot BoolOpAnd CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Num Num CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Num Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd BinOpAdd Str Call AttributeLoad NameLoad attr BinOpMod Str SubscriptLoad AttributeLoad NameLoad attr Index Num Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Num While NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Break ExceptHandler type NameLoad name NameStore body Expr Call NameLoad If NameLoad body Raise orelse TryExcept body Expr Call NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Call AttributeLoad NameLoad attr Continue AugAssignAdd NameStore Num If CompareEq NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareGtE NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Global identifier Assign NameStore CompareEq AttributeLoad NameLoad attr Num If BoolOpAnd UnaryOpNot NameLoad NameLoad body For NameStore TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad NameLoad keyword NameLoad If UnaryOpNot NameLoad body If CompareGt NameLoad Num body Expr Call AttributeLoad NameLoad attr Call NameLoad orelse Expr Call AttributeLoad NameLoad attr Call NameLoad If CompareGt NameLoad Num body TryFinally body If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr If CompareGtE AttributeLoad NameLoad attr AttributeLoad NameLoad attr body With NameLoad body If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad orelse Assign AttributeStore NameLoad attr Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr finalbody If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr If CompareGt NameLoad Num body Assign NameStore SubscriptLoad NameLoad Index AttributeLoad NameLoad attr orelse If AttributeLoad NameLoad attr body Assign NameStore Call NameLoad orelse Assign NameStore Call NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad If NameLoad body Expr Call NameLoad NameLoad AttributeLoad NameLoad attr If CompareGt NameLoad Num body While NameLoad body With NameLoad body If SubscriptLoad NameLoad Index NameLoad body Break orelse If BoolOpAnd NameLoad AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Raise AttributeLoad NameLoad attr If BoolOpAnd AttributeLoad NameLoad attr NameLoad body Raise AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If CompareGt NameLoad Num body For NameStore Call NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign NameStore BoolOpOr NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareGt BinOpMult NameLoad NameLoad Num Str Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Num While NameLoad body While UnaryOpNot Call AttributeLoad NameLoad attr keyword NameLoad body Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr If CompareNotEq AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore Num orelse Expr Call AttributeLoad NameLoad attr If NameLoad body Assign NameStore SubscriptLoad NameLoad Index AttributeLoad NameLoad attr If BoolOpAnd CompareGtE NameLoad Num CompareEq NameLoad NameLoad body If CompareEq NameLoad Num body Return orelse While NameLoad body With NameLoad body If SubscriptLoad NameLoad Index AttributeLoad NameLoad attr body Return Expr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body While NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr If CompareEq NameLoad NameLoad body Break If Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body For NameStore AttributeLoad NameLoad attr body Expr Call NameLoad AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases Call NameLoad Str Str body Expr Str Pass decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Num Assign NameStore NameLoad Assign NameStore NameLoad TryFinally body TryExcept body Assign NameStore Call NameLoad AttributeLoad NameLoad attr While NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Break ExceptHandler type NameLoad name NameStore body Expr Call NameLoad If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad Raise orelse TryExcept body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Continue If Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad body AugAssignAdd NameStore Num Assign NameStore NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad handlers ExceptHandler type NameLoad name NameStore body If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad finalbody Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Num NameLoad body Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr ListLoad For NameStore Call NameLoad NameLoad body Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad Num NameLoad body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr NameLoad If BoolOpAnd NameLoad NameLoad body Assign AttributeStore NameLoad attr Call NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr TryFinally body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad ListLoad NameLoad keyword ListLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call NameLoad If AttributeLoad NameLoad attr body Raise orelse TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Call AttributeLoad NameLoad attr finalbody If AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num Expr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body While NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Dict decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If NameLoad body For NameStore NameLoad body Assign NameStore TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Num Assign NameStore BinOpSub Call NameLoad NameLoad NameLoad NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad BinOpAdd NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore SubscriptLoad NameLoad Index NameLoad If BoolOpAnd CompareEq NameLoad NameLoad CompareGtE NameLoad Num body With NameLoad body Assign SubscriptStore NameLoad Index NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Str For NameStore NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr handlers ExceptHandler body Pass For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Global identifier If Call NameLoad NameLoad NameLoad body AugAssignAdd NameStore Num orelse AugAssignAdd AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args defaults body Global identifier If Call NameLoad NameLoad NameLoad body AugAssignSub NameStore Num orelse AugAssignSub AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args defaults body Expr Str TryExcept body If Call NameLoad NameLoad NameLoad body Return NameLoad orelse Return AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Return Num decorator_list FunctionDef arguments args defaults body Expr Str TryExcept body Global identifier If Call NameLoad NameLoad NameLoad body Assign NameStore Num orelse Assign NameStore Call AttributeLoad NameLoad attr Str Num handlers ExceptHandler type NameLoad body Pass decorator_list
N/A N/A Base class for gsutil commands.

In addition to base class code, this file contains helpers that depend on base
class state (such as GetAndPrintAcl) In general, functions that depend on
class state and that are used by multiple commands belong in this file.
Functions that don't depend on class state belong in util.py, and non-shared
helpers belong in individual subclasses.
 __future__ absolute_import N/A codecs collections namedtuple N/A copy N/A getopt N/A logging N/A multiprocessing N/A os N/A Queue N/A signal N/A sys N/A textwrap N/A threading N/A time N/A traceback N/A boto boto.storage_uri StorageUri N/A gslib gslib.cloud_api AccessDeniedException gslib.cloud_api ArgumentException gslib.cloud_api ServiceException gslib.cloud_api_delegator CloudApiDelegator gslib.cs_api_map ApiSelector gslib.cs_api_map GsutilApiMapFactory gslib.exception CommandException gslib.help_provider HelpProvider gslib.name_expansion NameExpansionIterator gslib.name_expansion NameExpansionResult gslib.parallelism_framework_util AtomicDict gslib.plurality_checkable_iterator PluralityCheckableIterator gslib.sig_handling ChildProcessSignalHandler gslib.sig_handling GetCaughtSignals gslib.sig_handling KillProcess gslib.sig_handling MultithreadedMainSignalHandler gslib.sig_handling RegisterSignalHandler gslib.storage_url StorageUrlFromString gslib.third_party.storage_apitools storage_v1_messages apitools_messages gslib.translation_helper AclTranslation gslib.translation_helper PRIVATE_DEFAULT_OBJ_ACL gslib.util CheckMultiprocessingAvailableAndInit gslib.util GetConfigFilePath gslib.util GsutilStreamHandler gslib.util HaveFileUrls gslib.util HaveProviderUrls gslib.util IS_WINDOWS gslib.util NO_MAX gslib.util UrlsAreForSingleProvider gslib.util UTF8 gslib.wildcard_iterator CreateWildcardIterator N/A OFFER_GSUTIL_M_SUGGESTION_THRESHOLD 5 _DefaultExceptionHandler N/A N/A cls e N/A N/A N/A N/A N/A N/A cls logger exception e N/A CreateGsutilLogger N/A N/A command_name N/A N/A N/A Creates a logger that resembles 'print' output.

  This logger abides by gsutil -d/-D/-DD/-q options.

  By default (if none of the above options is specified) the logger will display
  all messages logged with level INFO or above. Log propagation is disabled.

  Args:
    command_name: Command name to create logger for.

  Returns:
    A logger object.
   N/A log N/A N/A logging getLogger command_name N/A N/A log propagate False N/A N/A N/A log setLevel N/A N/A logging root level N/A log_handler N/A GsutilStreamHandler N/A N/A N/A log_handler setFormatter N/A N/A logging Formatter %(message)s N/A N/A N/A log handlers N/A N/A N/A N/A log addHandler log_handler N/A log N/A _UrlArgChecker N/A N/A command_instance url N/A N/A N/A N/A N/A command_instance exclude_symlinks N/A N/A True N/A exp_src_url N/A url expanded_storage_url N/A N/A N/A N/A exp_src_url IsFileUrl N/A N/A N/A os path islink N/A exp_src_url object_name N/A N/A N/A N/A N/A command_instance logger info Skipping symbolic link %s... exp_src_url N/A False N/A True N/A DummyArgChecker N/A N/A N/A unused_args N/A N/A True N/A SetAclFuncWrapper N/A N/A cls name_expansion_result thread_state N/A None N/A N/A N/A N/A cls SetAclFunc name_expansion_result thread_state thread_state N/A SetAclExceptionHandler N/A N/A cls e N/A N/A N/A Exception handler that maintains state about post-completion status. N/A N/A N/A N/A cls logger error N/A str e N/A N/A cls everything_set_okay False N/A N/A queues N/A _NewMultiprocessingQueue N/A N/A N/A N/A N/A queue N/A N/A multiprocessing Queue MAX_QUEUE_SIZE N/A N/A N/A queues append queue N/A queue N/A _NewThreadsafeQueue N/A N/A N/A N/A N/A queue N/A N/A Queue Queue MAX_QUEUE_SIZE N/A N/A N/A queues append queue N/A queue N/A N/A MAX_QUEUE_SIZE 32500 N/A MAX_RECURSIVE_DEPTH 5 N/A ZERO_TASKS_TO_DO_ARGUMENT N/A There were no tasks to do N/A OLD_ALIAS_MAP N/A chacl getacl setacl getcors setcors chdefacl getdefacl setdefacl disablelogging enablelogging getlogging getversioning setversioning getwebcfg setwebcfg N/A acl ch N/A acl get N/A acl set N/A cors get N/A cors set N/A defacl ch N/A defacl get N/A defacl set N/A logging set off N/A logging set on N/A logging get N/A versioning get N/A versioning set N/A web get N/A web set N/A manager consumer_pools task_queues caller_id_lock caller_id_counter N/A total_tasks call_completed_map global_return_values_map N/A need_pool_or_done_cond caller_id_finished_count new_pool_needed N/A current_max_recursive_level shared_vars_map shared_vars_list_map N/A class_map worker_checking_level_lock failure_count N/A glob_status_queue InitializeMultiprocessingVariables N/A N/A N/A N/A N/A Initializes module-level variables that will be inherited by subprocesses.

  On Windows, a multiprocessing.Manager object should only
  be created within an "if __name__ == '__main__':" block. This function
  must be called, otherwise every command that calls Command.Apply will fail.
   N/A manager consumer_pools task_queues caller_id_lock caller_id_counter N/A total_tasks call_completed_map global_return_values_map N/A need_pool_or_done_cond caller_id_finished_count new_pool_needed N/A current_max_recursive_level shared_vars_map shared_vars_list_map N/A class_map worker_checking_level_lock failure_count glob_status_queue N/A manager N/A N/A multiprocessing Manager N/A consumer_pools N/A N/A task_queues N/A N/A caller_id_lock N/A N/A manager Lock N/A caller_id_counter N/A N/A multiprocessing Value i 0 N/A total_tasks N/A AtomicDict manager manager N/A call_completed_map N/A AtomicDict manager manager N/A global_return_values_map N/A AtomicDict manager manager N/A need_pool_or_done_cond N/A N/A manager Condition N/A worker_checking_level_lock N/A N/A manager Lock N/A caller_id_finished_count N/A AtomicDict manager manager N/A new_pool_needed N/A N/A multiprocessing Value i 0 N/A current_max_recursive_level N/A N/A multiprocessing Value i 0 N/A shared_vars_map N/A AtomicDict manager manager N/A shared_vars_list_map N/A AtomicDict manager manager N/A class_map N/A N/A manager dict N/A failure_count N/A N/A multiprocessing Value i 0 N/A glob_status_queue N/A _NewMultiprocessingQueue N/A TeardownMultiprocessingProcesses N/A N/A N/A N/A N/A Should be called by signal handlers prior to shut down. N/A N/A ShutDownGsutil N/A manager N/A N/A N/A manager shutdown N/A N/A N/A N/A N/A gslib util manager shutdown N/A InitializeThreadingVariables N/A N/A N/A N/A N/A Initializes module-level variables used when running multi-threaded.

  When multiprocessing is not available (or on Windows where only 1 process
  is used), thread-safe analogs to the multiprocessing global variables
  must be initialized. This function is the thread-safe analog to
  InitializeMultiprocessingVariables.
   N/A global_return_values_map shared_vars_map failure_count N/A caller_id_finished_count shared_vars_list_map total_tasks N/A need_pool_or_done_cond call_completed_map class_map N/A task_queues caller_id_lock caller_id_counter glob_status_queue N/A caller_id_counter 0 N/A caller_id_finished_count N/A AtomicDict N/A caller_id_lock N/A N/A threading Lock N/A call_completed_map N/A AtomicDict N/A class_map N/A AtomicDict N/A failure_count 0 N/A global_return_values_map N/A AtomicDict N/A need_pool_or_done_cond N/A N/A threading Condition N/A shared_vars_list_map N/A AtomicDict N/A shared_vars_map N/A AtomicDict N/A task_queues N/A N/A total_tasks N/A AtomicDict N/A glob_status_queue N/A _NewThreadsafeQueue N/A N/A CommandSpec N/A namedtuple CommandSpec N/A command_name usage_synopsis command_name_aliases min_args max_args supported_sub_args file_url_ok provider_url_ok urls_start_arg gs_api_support gs_default_api supported_private_args argparse_arguments Command N/A HelpProvider N/A N/A Base class for all gsutil commands. N/A command_spec None N/A _commands_with_subcommands_and_subopts N/A acl defacl logging web notification N/A recursive_apply_level 0 N/A sequential_caller_id -1 CreateCommandSpec N/A N/A command_name usage_synopsis command_name_aliases min_args max_args supported_sub_args file_url_ok provider_url_ok urls_start_arg gs_api_support gs_default_api supported_private_args argparse_arguments N/A None None 0 NO_MAX False False 0 None None None None N/A N/A Creates an instance of CommandSpec, with defaults. N/A N/A CommandSpec command_name command_name usage_synopsis usage_synopsis command_name_aliases N/A command_name_aliases N/A min_args min_args max_args max_args supported_sub_args supported_sub_args file_url_ok file_url_ok provider_url_ok provider_url_ok urls_start_arg urls_start_arg gs_api_support N/A gs_api_support N/A N/A ApiSelector XML gs_default_api N/A gs_default_api N/A ApiSelector XML supported_private_args supported_private_args argparse_arguments N/A argparse_arguments N/A N/A staticmethod _GetDefaultCommandName N/A N/A self N/A N/A N/A N/A N/A self command_spec command_name N/A N/A command_name N/A property _GetDefaultCommandName _CalculateUrlsStartArg N/A N/A self N/A N/A N/A Calculate the index in args of the first URL arg.

    Returns:
      Index of the first URL arg (according to the command spec).
     N/A N/A N/A self command_spec urls_start_arg N/A _TranslateDeprecatedAliases N/A N/A self args N/A N/A N/A Map deprecated aliases to the corresponding new command, and warn. N/A new_command_args N/A N/A OLD_ALIAS_MAP get N/A self command_alias_used None N/A new_command_args N/A N/A args N/A N/A new_command_args N/A 1 args N/A N/A N/A N/A self logger warn N/A N/A join N/A N/A textwrap wrap N/A You are using a deprecated alias, "%(used_alias)s", for the "%(command_name)s" command. This will stop working on 9/9/2014. Please use "%(command_name)s" with the appropriate sub-command in the future. See "gsutil help %(command_name)s" for details. N/A used_alias command_name N/A self command_alias_used N/A self command_name N/A args N/A __init__ N/A N/A self command_runner args headers debug trace_token parallel_operations bucket_storage_uri_class gsutil_api_class_map_factory logging_filters command_alias_used perf_trace_token N/A None None None N/A N/A Instantiates a Command.

    Args:
      command_runner: CommandRunner (for commands built atop other commands).
      args: Command-line args (arg0 = actual arg, not command name ala bash).
      headers: Dictionary containing optional HTTP headers to pass to boto.
      debug: Debug level to pass in to boto connection (range 0..3).
      trace_token: Trace token to pass to the API implementation.
      parallel_operations: Should command operations be executed in parallel?
      bucket_storage_uri_class: Class to instantiate for cloud StorageUris.
                                Settable for testing/mocking.
      gsutil_api_class_map_factory: Creates map of cloud storage interfaces.
                                    Settable for testing/mocking.
      logging_filters: Optional list of logging. Filters to apply to this
                       command's logger.
      command_alias_used: The alias that was actually used when running this
                          command (as opposed to the "official" command name,
                          which will always correspond to the file name).
      perf_trace_token: Performance measurement trace token to use when making
          API calls.

    Implementation note: subclasses shouldn't need to define an __init__
    method, and instead depend on the shared initialization that happens
    here. If you do define an __init__ method in a subclass you'll need to
    explicitly call super().__init__(). But you're encouraged not to do this,
    because it will make changing the __init__ interface more painful.
     N/A N/A self command_runner command_runner N/A N/A self unparsed_args args N/A N/A self headers headers N/A N/A self debug debug N/A N/A self trace_token trace_token N/A N/A self perf_trace_token perf_trace_token N/A N/A self parallel_operations parallel_operations N/A N/A self bucket_storage_uri_class bucket_storage_uri_class N/A N/A self gsutil_api_class_map_factory gsutil_api_class_map_factory N/A N/A self exclude_symlinks False N/A N/A self recursion_requested False N/A N/A self all_versions False N/A N/A self command_alias_used command_alias_used N/A N/A self logger N/A CreateGsutilLogger N/A self command_name N/A logging_filters N/A N/A log_filter logging_filters N/A N/A N/A N/A N/A self logger addFilter log_filter N/A N/A N/A self command_spec None N/A N/A N/A CommandException N/A "%s" command implementation is missing a command_spec definition. N/A self command_name N/A N/A self args N/A N/A self _TranslateDeprecatedAliases args N/A N/A N/A self ParseSubOpts N/A N/A self command_spec N/A N/A N/A self command_spec _replace urls_start_arg N/A N/A self _CalculateUrlsStartArg N/A N/A N/A N/A len N/A self args N/A N/A self command_spec min_args N/A N/A len N/A self args N/A N/A self command_spec max_args N/A N/A N/A N/A self RaiseWrongNumberOfArgumentsException N/A N/A N/A self command_name N/A self _commands_with_subcommands_and_subopts N/A N/A N/A N/A self CheckArguments N/A support_map N/A gs s3 N/A N/A self command_spec gs_api_support N/A N/A ApiSelector XML N/A default_map N/A gs s3 N/A N/A self command_spec gs_default_api N/A ApiSelector XML N/A N/A self gsutil_api_map N/A N/A GsutilApiMapFactory GetApiMap N/A self gsutil_api_class_map_factory support_map default_map N/A N/A self project_id None N/A N/A self gsutil_api N/A CloudApiDelegator bucket_storage_uri_class N/A self gsutil_api_map N/A self logger debug N/A self debug trace_token N/A self trace_token perf_trace_token N/A self perf_trace_token status_queue N/A _MainThreadUIQueue N/A self logger N/A N/A self gsutil_cmd N/A N/A N/A gslib util IS_WINDOWS N/A N/A N/A self gsutil_cmd python  N/A N/A self gsutil_path N/A gslib GSUTIL_PATH N/A N/A self gsutil_cmd N/A self gsutil_path N/A N/A self sub_opts N/A N/A N/A o unused_a N/A self sub_opts N/A N/A N/A N/A o -r N/A o -R N/A N/A N/A self recursion_requested True N/A N/A N/A self multiprocessing_is_available N/A N/A CheckMultiprocessingAvailableAndInit is_available N/A RaiseWrongNumberOfArgumentsException N/A N/A self N/A N/A N/A Raises exception for wrong number of arguments supplied to command. N/A N/A N/A len N/A self args N/A N/A self command_spec min_args N/A N/A tail_str N/A N/A N/A N/A self command_spec min_args 1 s N/A message N/A The %s command requires at least %d argument%s. N/A N/A self command_name N/A N/A self command_spec min_args tail_str N/A N/A message N/A The %s command accepts at most %d arguments. N/A N/A self command_name N/A N/A self command_spec max_args N/A message N/A  Usage:
%s
For additional help run:
  gsutil help %s N/A N/A N/A self command_spec usage_synopsis N/A self command_name N/A N/A CommandException message N/A RaiseInvalidArgumentException N/A N/A self N/A N/A N/A Raises exception for specifying an invalid argument to command. N/A message N/A Incorrect option(s) specified. Usage:
%s
For additional help run:
  gsutil help %s N/A N/A N/A self command_spec usage_synopsis N/A self command_name N/A N/A CommandException message N/A ParseSubOpts N/A N/A self check_args N/A False N/A N/A Parses sub-opt args.

    Args:
      check_args: True to have CheckArguments() called after parsing.

    Populates:
      (self.sub_opts, self.args) from parsing.

    Raises: RaiseInvalidArgumentException if invalid args specified.
     N/A N/A N/A N/A N/A self sub_opts N/A self args N/A N/A getopt getopt N/A self args N/A N/A self command_spec supported_sub_args N/A N/A N/A self command_spec supported_private_args N/A N/A N/A N/A N/A getopt GetoptError N/A N/A N/A N/A self RaiseInvalidArgumentException N/A check_args N/A N/A N/A N/A self CheckArguments N/A CheckArguments N/A N/A self N/A N/A N/A Checks that command line arguments match the command_spec.

    Any commands in self._commands_with_subcommands_and_subopts are responsible
    for calling this method after handling initial parsing of their arguments.
    This prevents commands with sub-commands as well as options from breaking
    the parsing of getopt.

    TODO: Provide a function to parse commands and sub-commands more
    intelligently once we stop allowing the deprecated command versions.

    Raises:
      CommandException if the arguments don't match.
     N/A N/A N/A N/A N/A self command_spec file_url_ok N/A HaveFileUrls N/A N/A self args N/A N/A N/A self command_spec urls_start_arg N/A N/A N/A CommandException N/A "%s" command does not support "file://" URLs. Did you mean to use a gs:// URL? N/A self command_name N/A N/A N/A N/A N/A self command_spec provider_url_ok N/A HaveProviderUrls N/A N/A self args N/A N/A N/A self command_spec urls_start_arg N/A N/A N/A CommandException N/A "%s" command does not support provider-only URLs. N/A self command_name N/A WildcardIterator N/A N/A self url_string all_versions N/A False N/A N/A Helper to instantiate gslib.WildcardIterator.

    Args are same as gslib.WildcardIterator interface, but this method fills in
    most of the values from instance state.

    Args:
      url_string: URL string naming wildcard objects to iterate.
      all_versions: If true, the iterator yields all versions of objects
                    matching the wildcard.  If false, yields just the live
                    object version.

    Returns:
      WildcardIterator for use by caller.
     N/A N/A CreateWildcardIterator url_string N/A self gsutil_api all_versions all_versions debug N/A self debug project_id N/A self project_id N/A RunCommand N/A N/A self N/A N/A N/A Abstract function in base class. Subclasses must implement this.

    The return value of this function will be used as the exit status of the
    process, so subclass commands should return an integer exit code (0 for
    success, a value in [1,255] for failure).
     N/A N/A CommandException N/A Command %s is missing its RunCommand() implementation N/A self command_name N/A ApplyAclFunc N/A N/A self acl_func acl_excep_handler url_strs N/A N/A N/A Sets the standard or default object ACL depending on self.command_name.

    Args:
      acl_func: ACL function to be passed to Apply.
      acl_excep_handler: ACL exception handler to be passed to Apply.
      url_strs: URL strings on which to set ACL.

    Raises:
      CommandException if an ACL could not be set.
     N/A multi_threaded_url_args N/A N/A url_str url_strs N/A N/A url N/A StorageUrlFromString url_str N/A N/A N/A N/A url IsCloudUrl N/A N/A url IsBucket N/A N/A N/A self recursion_requested N/A N/A N/A url object_name * N/A N/A N/A multi_threaded_url_args append N/A url url_string N/A N/A blr N/A N/A N/A N/A self WildcardIterator N/A url url_string IterBuckets bucket_fields N/A id N/A N/A name_expansion_for_url N/A NameExpansionResult url False False N/A blr storage_url N/A N/A acl_func self name_expansion_for_url N/A N/A N/A N/A multi_threaded_url_args append url_str N/A N/A N/A len multi_threaded_url_args 1 N/A N/A name_expansion_iterator N/A NameExpansionIterator N/A self command_name N/A self debug N/A self logger N/A self gsutil_api multi_threaded_url_args N/A self recursion_requested all_versions N/A self all_versions continue_on_error N/A N/A self continue_on_error N/A self parallel_operations N/A N/A N/A self Apply acl_func name_expansion_iterator acl_excep_handler fail_on_error N/A N/A self continue_on_error N/A N/A N/A N/A self everything_set_okay N/A N/A self continue_on_error N/A N/A N/A CommandException ACLs for some objects could not be set. N/A SetAclFunc N/A N/A self name_expansion_result thread_state N/A None N/A N/A Sets the object ACL for the name_expansion_result provided.

    Args:
      name_expansion_result: NameExpansionResult describing the target object.
      thread_state: If present, use this gsutil Cloud API instance for the set.
     N/A thread_state N/A N/A N/A N/A self def_acl N/A gsutil_api thread_state N/A N/A gsutil_api N/A self gsutil_api N/A op_string N/A N/A self def_acl default object ACL ACL N/A url N/A name_expansion_result expanded_storage_url N/A N/A N/A N/A self logger info Setting %s on %s... op_string url N/A N/A N/A N/A N/A gsutil_api GetApiSelector N/A url scheme N/A ApiSelector XML N/A N/A url scheme gs N/A N/A N/A N/A self _SetAclXmlPassthrough url gsutil_api N/A N/A N/A N/A self _SetAclGsutilApi url gsutil_api N/A _SetAclXmlPassthrough N/A N/A self url gsutil_api N/A N/A N/A Sets the ACL for the URL provided using the XML passthrough functions.

    This function assumes that self.def_acl, self.canned,
    and self.continue_on_error are initialized, and that self.acl_arg is
    either an XML string or a canned ACL string.

    Args:
      url: CloudURL to set the ACL on.
      gsutil_api: gsutil Cloud API to use for the ACL set. Must support XML
          passthrough functions.
     N/A N/A N/A N/A N/A orig_prefer_api N/A gsutil_api prefer_api N/A N/A gsutil_api prefer_api N/A ApiSelector XML N/A N/A N/A gsutil_api XmlPassThroughSetAcl N/A self acl_arg url canned N/A self canned def_obj_acl N/A self def_acl provider N/A url scheme N/A N/A N/A ServiceException N/A e N/A N/A N/A self continue_on_error N/A N/A N/A self everything_set_okay False N/A N/A N/A N/A self logger error e N/A N/A N/A N/A N/A gsutil_api prefer_api orig_prefer_api N/A _SetAclGsutilApi N/A N/A self url gsutil_api N/A N/A N/A Sets the ACL for the URL provided using the gsutil Cloud API.

    This function assumes that self.def_acl, self.canned,
    and self.continue_on_error are initialized, and that self.acl_arg is
    either a JSON string or a canned ACL string.

    Args:
      url: CloudURL to set the ACL on.
      gsutil_api: gsutil Cloud API to use for the ACL set.
     N/A N/A N/A N/A N/A url IsBucket N/A N/A N/A self def_acl N/A N/A N/A self canned N/A N/A N/A N/A gsutil_api PatchBucket N/A url bucket_name N/A N/A apitools_messages Bucket canned_def_acl N/A self acl_arg provider N/A url scheme fields N/A id N/A N/A def_obj_acl N/A N/A AclTranslation JsonToMessage N/A self acl_arg N/A apitools_messages ObjectAccessControl N/A N/A def_obj_acl N/A N/A N/A N/A def_obj_acl append PRIVATE_DEFAULT_OBJ_ACL N/A bucket_metadata N/A N/A apitools_messages Bucket defaultObjectAcl def_obj_acl N/A N/A N/A gsutil_api PatchBucket N/A url bucket_name bucket_metadata provider N/A url scheme fields N/A id N/A N/A N/A self canned N/A N/A N/A N/A gsutil_api PatchBucket N/A url bucket_name N/A N/A apitools_messages Bucket canned_acl N/A self acl_arg provider N/A url scheme fields N/A id N/A N/A bucket_acl N/A N/A AclTranslation JsonToMessage N/A self acl_arg N/A apitools_messages BucketAccessControl N/A bucket_metadata N/A N/A apitools_messages Bucket acl bucket_acl N/A N/A N/A gsutil_api PatchBucket N/A url bucket_name bucket_metadata provider N/A url scheme fields N/A id N/A N/A N/A self canned N/A N/A N/A N/A gsutil_api PatchObjectMetadata N/A url bucket_name N/A url object_name N/A N/A apitools_messages Object provider N/A url scheme generation N/A url generation canned_acl N/A self acl_arg N/A N/A object_acl N/A N/A AclTranslation JsonToMessage N/A self acl_arg N/A apitools_messages ObjectAccessControl N/A object_metadata N/A N/A apitools_messages Object acl object_acl N/A N/A N/A gsutil_api PatchObjectMetadata N/A url bucket_name N/A url object_name object_metadata provider N/A url scheme generation N/A url generation N/A N/A N/A ArgumentException N/A e N/A N/A N/A N/A ServiceException N/A e N/A N/A N/A self continue_on_error N/A N/A N/A self everything_set_okay False N/A N/A N/A N/A self logger error e N/A N/A N/A SetAclCommandHelper N/A N/A self acl_func acl_excep_handler N/A N/A N/A Sets ACLs on the self.args using the passed-in acl function.

    Args:
      acl_func: ACL function to be passed to Apply.
      acl_excep_handler: ACL exception handler to be passed to Apply.
     N/A acl_arg N/A N/A self args N/A 0 N/A url_args N/A N/A self args N/A 1 N/A N/A N/A UrlsAreForSingleProvider url_args N/A N/A N/A CommandException N/A "%s" command spanning providers not allowed. N/A self command_name N/A N/A N/A N/A os path isfile acl_arg N/A N/A N/A N/A codecs open acl_arg r UTF8 f N/A N/A acl_arg N/A N/A f read N/A N/A self canned False N/A N/A storage_uri N/A N/A boto storage_uri N/A url_args N/A 0 debug N/A self debug validate False bucket_storage_uri_class N/A self bucket_storage_uri_class N/A canned_acls N/A N/A storage_uri canned_acls N/A N/A acl_arg canned_acls N/A N/A N/A CommandException N/A Invalid canned ACL "%s". acl_arg N/A N/A self canned True N/A N/A self everything_set_okay True N/A N/A self acl_arg acl_arg N/A N/A N/A self ApplyAclFunc acl_func acl_excep_handler url_args N/A N/A N/A N/A self everything_set_okay N/A N/A self continue_on_error N/A N/A N/A CommandException ACLs for some objects could not be set. N/A _WarnServiceAccounts N/A N/A self N/A N/A N/A Warns service account users who have received an AccessDenied error.

    When one of the metadata-related commands fails due to AccessDenied, user
    must ensure that they are listed as an Owner in the API console.
     gcs_oauth2_boto_plugin.oauth2_plugin IS_SERVICE_ACCOUNT N/A IS_SERVICE_ACCOUNT N/A N/A N/A N/A N/A self logger warning N/A N/A join N/A N/A textwrap wrap It appears that your service account has been denied access while attempting to perform a metadata operation. If you believe that you should have access to this metadata (i.e., if it is associated with your account), please make sure that your service accounts email address is listed as an Owner in the Permissions tab of the API console. See "gsutil help creds" for further information.
 N/A GetAndPrintAcl N/A N/A self url_str N/A N/A N/A Prints the standard or default object ACL depending on self.command_name.

    Args:
      url_str: URL string to get ACL for.
     N/A blr N/A N/A self GetAclCommandBucketListingReference url_str N/A url N/A StorageUrlFromString url_str N/A N/A N/A N/A N/A N/A self gsutil_api GetApiSelector N/A url scheme N/A ApiSelector XML N/A N/A url scheme gs N/A N/A N/A N/A acl N/A N/A N/A self gsutil_api XmlPassThroughGetAcl url def_obj_acl N/A self def_acl provider N/A url scheme N/A N/A N/A acl to_xml N/A N/A N/A AccessDeniedException N/A _ N/A N/A N/A N/A self _WarnServiceAccounts N/A N/A N/A N/A N/A self command_name defacl N/A N/A acl N/A N/A blr root_object defaultObjectAcl N/A N/A acl N/A N/A N/A N/A N/A self logger warn No default object ACL present for %s. This could occur if the default object ACL is private, in which case objects created in this bucket will be readable only by their creators. It could also mean you do not have OWNER permission on %s and therefore do not have permission to read the default object ACL. url_str url_str N/A N/A acl N/A N/A blr root_object acl N/A N/A acl N/A N/A N/A N/A self _WarnServiceAccounts N/A N/A AccessDeniedException N/A Access denied. Please ensure you have OWNER permission on %s. url_str N/A N/A N/A AclTranslation JsonFromMessage acl N/A GetAclCommandBucketListingReference N/A N/A self url_str N/A N/A N/A Gets a single bucket listing reference for an acl get command.

    Args:
      url_str: URL string to get the bucket listing reference for.

    Returns:
      BucketListingReference for the URL string.

    Raises:
      CommandException if string did not result in exactly one reference.
     N/A wildcard_url N/A StorageUrlFromString url_str N/A N/A N/A wildcard_url IsObject N/A N/A plurality_iter N/A PluralityCheckableIterator N/A N/A N/A N/A self WildcardIterator url_str IterObjects bucket_listing_fields N/A acl N/A N/A N/A N/A self command_name defacl N/A N/A bucket_fields N/A defaultObjectAcl N/A N/A bucket_fields N/A acl N/A plurality_iter N/A PluralityCheckableIterator N/A N/A N/A N/A self WildcardIterator url_str IterBuckets bucket_fields bucket_fields N/A N/A N/A plurality_iter IsEmpty N/A N/A N/A CommandException No URLs matched N/A N/A N/A plurality_iter HasPlurality N/A N/A N/A CommandException N/A %s matched more than one URL, which is not allowed by the %s command N/A url_str N/A self command_name N/A N/A N/A list plurality_iter N/A 0 N/A GetSingleBucketUrlFromArg N/A N/A self arg bucket_fields N/A None N/A N/A Gets a single bucket URL based on the command arguments.

    Args:
      arg: String argument to get bucket URL for.
      bucket_fields: Fields to populate for the bucket.

    Returns:
      (StorageUrl referring to a single bucket, Bucket metadata).

    Raises:
      CommandException if args did not match exactly one bucket.
     N/A plurality_checkable_iterator N/A N/A self GetBucketUrlIterFromArg arg bucket_fields bucket_fields N/A N/A N/A plurality_checkable_iterator HasPlurality N/A N/A N/A CommandException N/A %s matched more than one URL, which is not
allowed by the %s command N/A arg N/A self command_name N/A blr N/A N/A list plurality_checkable_iterator N/A 0 N/A N/A N/A StorageUrlFromString N/A blr url_string N/A blr root_object N/A GetBucketUrlIterFromArg N/A N/A self arg bucket_fields N/A None N/A N/A Gets a single bucket URL based on the command arguments.

    Args:
      arg: String argument to iterate over.
      bucket_fields: Fields to populate for the bucket.

    Returns:
      PluralityCheckableIterator over buckets.

    Raises:
      CommandException if iterator matched no buckets.
     N/A arg_url N/A StorageUrlFromString arg N/A N/A N/A N/A N/A arg_url IsCloudUrl N/A N/A arg_url IsObject N/A N/A N/A CommandException N/A "%s" command must specify a bucket N/A self command_name N/A plurality_checkable_iterator N/A PluralityCheckableIterator N/A N/A N/A N/A self WildcardIterator arg IterBuckets bucket_fields bucket_fields N/A N/A N/A plurality_checkable_iterator IsEmpty N/A N/A N/A CommandException No URLs matched N/A plurality_checkable_iterator N/A _ResetConnectionPool N/A N/A self N/A N/A N/A connection_pool N/A StorageUri provider_pool N/A connection_pool N/A N/A i connection_pool N/A N/A N/A N/A N/A N/A connection_pool N/A i connection close N/A _GetProcessAndThreadCount N/A N/A self process_count thread_count parallel_operations_override N/A N/A N/A Determines the values of process_count and thread_count.

    These values are used for parallel operations.
    If we're not performing operations in parallel, then ignore
    existing values and use process_count = thread_count = 1.

    Args:
      process_count: A positive integer or None. In the latter case, we read
                     the value from the .boto config file.
      thread_count: A positive integer or None. In the latter case, we read
                    the value from the .boto config file.
      parallel_operations_override: Used to override self.parallel_operations.
                                    This allows the caller to safely override
                                    the top-level flag for a single call.

    Returns:
      (process_count, thread_count): The number of processes and threads to use,
                                     respectively.
     N/A N/A N/A self parallel_operations parallel_operations_override N/A N/A N/A process_count N/A N/A process_count N/A N/A N/A boto config getint GSUtil parallel_process_count N/A N/A N/A gslib commands config DEFAULT_PARALLEL_PROCESS_COUNT N/A N/A process_count 1 N/A N/A N/A CommandException N/A Invalid parallel_process_count "%d". process_count N/A N/A thread_count N/A N/A thread_count N/A N/A N/A boto config getint GSUtil parallel_thread_count N/A N/A N/A gslib commands config DEFAULT_PARALLEL_THREAD_COUNT N/A N/A thread_count 1 N/A N/A N/A CommandException N/A Invalid parallel_thread_count "%d". thread_count N/A N/A process_count 1 N/A thread_count 1 N/A N/A IS_WINDOWS N/A process_count 1 N/A N/A N/A CommandException N/A N/A join N/A N/A textwrap wrap N/A It is not possible to set process_count > 1 on Windows. Please update your config file (located at %s) and set "parallel_process_count = 1". N/A GetConfigFilePath N/A N/A N/A N/A self logger debug process count: %d process_count N/A N/A N/A N/A self logger debug thread count: %d thread_count N/A N/A process_count thread_count N/A _SetUpPerCallerState N/A N/A self N/A N/A N/A Set up the state for a caller id, corresponding to one Apply call. N/A global_return_values_map shared_vars_map failure_count N/A caller_id_finished_count shared_vars_list_map total_tasks N/A need_pool_or_done_cond call_completed_map class_map N/A task_queues caller_id_lock caller_id_counter N/A caller_id_lock N/A N/A N/A isinstance caller_id_counter int N/A N/A caller_id_counter 1 N/A caller_id caller_id_counter N/A N/A N/A caller_id_counter value 1 N/A caller_id N/A caller_id_counter value N/A cls N/A N/A copy copy self N/A N/A cls recursive_apply_level 1 N/A N/A cls logger None N/A N/A cls gsutil_api None N/A N/A class_map N/A caller_id cls N/A N/A total_tasks N/A caller_id -1 N/A N/A call_completed_map N/A caller_id False N/A N/A caller_id_finished_count N/A caller_id 0 N/A N/A global_return_values_map N/A caller_id N/A N/A caller_id N/A _CreateNewConsumerPool N/A N/A self num_processes num_threads status_queue N/A N/A N/A Create a new pool of processes that call _ApplyThreads. N/A processes N/A N/A task_queue N/A _NewMultiprocessingQueue N/A N/A N/A task_queues append task_queue N/A N/A current_max_recursive_level value 1 N/A N/A N/A current_max_recursive_level value MAX_RECURSIVE_DEPTH N/A N/A N/A CommandException Recursion depth of Apply calls is too great. N/A _ N/A range num_processes N/A N/A recursive_apply_level N/A len consumer_pools N/A p N/A N/A multiprocessing Process target N/A self _ApplyThreads args N/A num_threads num_processes recursive_apply_level status_queue N/A N/A p daemon True N/A N/A N/A processes append p N/A N/A N/A p start N/A consumer_pool N/A _ConsumerPool processes task_queue N/A N/A N/A consumer_pools append consumer_pool N/A Apply N/A N/A self func args_iterator exception_handler shared_attrs arg_checker parallel_operations_override process_count thread_count should_return_results fail_on_error N/A None _UrlArgChecker False None None False False N/A N/A Calls _Parallel/SequentialApply based on multiprocessing availability.

    Args:
      func: Function to call to process each argument.
      args_iterator: Iterable collection of arguments to be put into the
                     work queue.
      exception_handler: Exception handler for WorkerThread class.
      shared_attrs: List of attributes to manage across sub-processes.
      arg_checker: Used to determine whether we should process the current
                   argument or simply skip it. Also handles any logging that
                   is specific to a particular type of argument.
      parallel_operations_override: Used to override self.parallel_operations.
                                    This allows the caller to safely override
                                    the top-level flag for a single call.
      process_count: The number of processes to use. If not specified, then
                     the configured default will be used.
      thread_count: The number of threads per process. If not speficied, then
                    the configured default will be used..
      should_return_results: If true, then return the results of all successful
                             calls to func in a list.
      fail_on_error: If true, then raise any exceptions encountered when
                     executing func. This is only applicable in the case of
                     process_count == thread_count == 1.

    Returns:
      Results from spawned threads.
     N/A shared_attrs N/A N/A original_shared_vars_values N/A N/A name shared_attrs N/A N/A N/A original_shared_vars_values N/A name N/A getattr self name N/A N/A setattr self name 0 N/A N/A process_count thread_count N/A N/A self _GetProcessAndThreadCount process_count thread_count parallel_operations_override N/A is_main_thread N/A N/A N/A self recursive_apply_level 0 N/A N/A self sequential_caller_id -1 N/A fail_on_error N/A fail_on_error N/A N/A process_count thread_count 1 N/A N/A is_main_thread N/A N/A self multiprocessing_is_available N/A process_count 1 N/A N/A N/A CheckMultiprocessingAvailableAndInit logger N/A self logger N/A caller_id N/A N/A self _SetUpPerCallerState N/A shared_attrs N/A N/A N/A shared_vars_list_map N/A caller_id shared_attrs N/A name shared_attrs N/A N/A N/A shared_vars_map N/A N/A caller_id name 0 N/A usable_processes_count N/A N/A self multiprocessing_is_available process_count 1 N/A N/A N/A thread_count usable_processes_count 1 N/A N/A N/A N/A self _ParallelApply func args_iterator exception_handler caller_id arg_checker usable_processes_count thread_count should_return_results fail_on_error N/A N/A N/A N/A self _SequentialApply func args_iterator exception_handler caller_id arg_checker should_return_results fail_on_error N/A shared_attrs N/A N/A name shared_attrs N/A N/A final_value N/A N/A original_shared_vars_values N/A name N/A N/A shared_vars_map get N/A caller_id name N/A N/A setattr self name final_value N/A should_return_results N/A N/A N/A N/A global_return_values_map get caller_id N/A _MaybeSuggestGsutilDashM N/A N/A self N/A N/A N/A Outputs a sugestion to the user to use gsutil -m. N/A N/A N/A N/A N/A N/A N/A boto config getint GSUtil parallel_process_count 0 1 N/A N/A N/A N/A boto config getint GSUtil parallel_thread_count 0 1 N/A N/A N/A N/A N/A self logger info N/A N/A N/A N/A textwrap fill N/A ==> NOTE: You are performing a sequence of gsutil operations that may run significantly faster if you instead use gsutil -m %s ...
Please see the -m section under "gsutil help options" for further information about when gsutil -m can be advantageous. N/A N/A sys argv N/A 1 N/A _SequentialApply N/A N/A self func args_iterator exception_handler caller_id arg_checker should_return_results fail_on_error N/A N/A N/A Performs all function calls sequentially in the current thread.

    No other threads or processes will be spawned. This degraded functionality
    is used when the multiprocessing module is not available or the user
    requests only one thread and one process.
     N/A worker_thread N/A WorkerThread None False N/A args_iterator N/A iter args_iterator N/A sequential_call_count 0 N/A True N/A N/A N/A N/A args N/A N/A args_iterator next N/A N/A N/A StopIteration N/A e N/A N/A N/A N/A Exception N/A e N/A N/A N/A _IncrementFailureCount N/A fail_on_error N/A N/A N/A N/A N/A N/A N/A exception_handler self e N/A N/A N/A Exception N/A _ N/A N/A N/A N/A N/A self logger debug Caught exception while handling exception for %s:
%s func N/A N/A traceback format_exc N/A N/A sequential_call_count 1 N/A N/A sequential_call_count OFFER_GSUTIL_M_SUGGESTION_THRESHOLD N/A N/A N/A N/A self _MaybeSuggestGsutilDashM N/A N/A arg_checker self args N/A N/A task N/A Task func args caller_id exception_handler should_return_results arg_checker fail_on_error N/A N/A N/A worker_thread PerformTask task self N/A N/A sequential_call_count N/A N/A N/A gslib util GetTermLines N/A N/A N/A N/A self _MaybeSuggestGsutilDashM N/A N/A N/A N/A worker_thread shared_vars_updater Update caller_id self N/A _ParallelApply N/A N/A self func args_iterator exception_handler caller_id arg_checker process_count thread_count should_return_results fail_on_error N/A N/A N/A Dispatches input arguments across a thread/process pool.

    Pools are composed of parallel OS processes and/or Python threads,
    based on options (-m or not) and settings in the user's config file.

    If only one OS process is requested/available, dispatch requests across
    threads in the current OS process.

    In the multi-process case, we will create one pool of worker processes for
    each level of the tree of recursive calls to Apply. E.g., if A calls
    Apply(B), and B ultimately calls Apply(C) followed by Apply(D), then we
    will only create two sets of worker processes - B will execute in the first,
    and C and D will execute in the second. If C is then changed to call
    Apply(E) and D is changed to call Apply(F), then we will automatically
    create a third set of processes (lazily, when needed) that will be used to
    execute calls to E and F. This might look something like:

    Pool1 Executes:                B
                                  / \
    Pool2 Executes:              C   D
                                /     \
    Pool3 Executes:            E       F

    Apply's parallelism is generally broken up into 4 cases:
    - If process_count == thread_count == 1, then all tasks will be executed
      by _SequentialApply.
    - If process_count > 1 and thread_count == 1, then the main thread will
      create a new pool of processes (if they don't already exist) and each of
      those processes will execute the tasks in a single thread.
    - If process_count == 1 and thread_count > 1, then this process will create
      a new pool of threads to execute the tasks.
    - If process_count > 1 and thread_count > 1, then the main thread will
      create a new pool of processes (if they don't already exist) and each of
      those processes will, upon creation, create a pool of threads to
      execute the tasks.

    Args:
      caller_id: The caller ID unique to this call to command.Apply.
      See command.Apply for description of other arguments.
     N/A glob_status_queue N/A is_main_thread N/A N/A self recursive_apply_level 0 N/A N/A N/A IS_WINDOWS is_main_thread N/A N/A signal_num N/A N/A signal SIGINT N/A signal SIGTERM N/A N/A N/A RegisterSignalHandler signal_num MultithreadedMainSignalHandler is_final_handler True N/A N/A task_queues N/A N/A N/A process_count 1 N/A N/A N/A N/A task_queues append N/A _NewMultiprocessingQueue N/A N/A N/A N/A task_queues append N/A _NewThreadsafeQueue N/A N/A process_count 1 N/A N/A N/A N/A N/A is_main_thread N/A N/A N/A N/A worker_checking_level_lock acquire N/A N/A N/A self recursive_apply_level N/A current_max_recursive_level value N/A N/A need_pool_or_done_cond N/A N/A is_main_thread N/A N/A N/A N/A self _CreateNewConsumerPool process_count thread_count glob_status_queue N/A N/A N/A new_pool_needed value 1 N/A N/A N/A need_pool_or_done_cond notify_all N/A N/A N/A need_pool_or_done_cond wait N/A N/A N/A is_main_thread N/A N/A N/A N/A worker_checking_level_lock release N/A N/A process_count 1 N/A N/A task_queue N/A task_queues N/A N/A self recursive_apply_level N/A N/A N/A self multiprocessing_is_available N/A N/A task_queue N/A _NewMultiprocessingQueue N/A N/A task_queue N/A _NewThreadsafeQueue N/A producer_thread N/A ProducerThread N/A N/A copy copy self args_iterator caller_id func task_queue should_return_results exception_handler arg_checker fail_on_error N/A is_main_thread N/A N/A N/A _UIThread glob_status_queue N/A self logger N/A N/A process_count 1 N/A N/A True N/A N/A need_pool_or_done_cond N/A N/A N/A call_completed_map N/A caller_id N/A N/A N/A N/A N/A is_main_thread N/A new_pool_needed value N/A N/A N/A new_pool_needed value 0 N/A N/A N/A self _CreateNewConsumerPool process_count thread_count glob_status_queue N/A N/A N/A need_pool_or_done_cond notify_all N/A N/A N/A need_pool_or_done_cond wait N/A N/A N/A N/A self _ApplyThreads thread_count process_count N/A self recursive_apply_level glob_status_queue is_blocking_call True task_queue task_queue N/A is_main_thread N/A N/A N/A N/A glob_status_queue put ZERO_TASKS_TO_DO_ARGUMENT N/A N/A producer_thread unknown_exception N/A N/A N/A producer_thread unknown_exception N/A N/A N/A producer_thread iterator_exception fail_on_error N/A N/A N/A producer_thread iterator_exception N/A _ApplyThreads N/A N/A self thread_count process_count recursive_apply_level status_queue is_blocking_call task_queue N/A False None N/A N/A Assigns the work from the multi-process global task queue.

    Work is assigned to an individual process for later consumption either by
    the WorkerThreads or (if thread_count == 1) this thread.

    Args:
      thread_count: The number of threads used to perform the work. If 1, then
                    perform all work in this thread.
      process_count: The number of processes used to perform the work.
      recursive_apply_level: The depth in the tree of recursive calls to Apply
                             of this thread.
      status_queue: Multiprocessing/threading queue for progress reporting and
          performance aggregation.
      is_blocking_call: True iff the call to Apply is blocked on this call
                        (which is true iff process_count == 1), implying that
                        _ApplyThreads must behave as a blocking call.
     N/A N/A process_count 1 N/A N/A catch_signal N/A GetCaughtSignals N/A N/A N/A N/A signal signal catch_signal ChildProcessSignalHandler N/A N/A N/A self _ResetConnectionPool N/A N/A self recursive_apply_level recursive_apply_level N/A task_queue N/A task_queue N/A task_queues N/A recursive_apply_level N/A worker_semaphore N/A N/A threading BoundedSemaphore thread_count N/A N/A N/A thread_count process_count 1 Invalid state, calling command._ApplyThreads with only one thread and process. N/A worker_pool N/A WorkerPool thread_count N/A self logger worker_semaphore bucket_storage_uri_class N/A self bucket_storage_uri_class gsutil_api_map N/A self gsutil_api_map debug N/A self debug status_queue status_queue N/A num_enqueued 0 N/A True N/A N/A N/A N/A N/A worker_semaphore acquire blocking False N/A N/A N/A N/A time sleep 0.01 N/A task N/A N/A task_queue get N/A N/A N/A task args ZERO_TASKS_TO_DO_ARGUMENT N/A N/A N/A N/A worker_pool AddTask task N/A num_enqueued 1 N/A N/A N/A N/A worker_semaphore release N/A is_blocking_call N/A N/A num_to_do N/A total_tasks N/A N/A task caller_id N/A N/A N/A num_to_do 0 N/A num_enqueued num_to_do N/A N/A N/A thread_count 1 N/A N/A N/A N/A True N/A N/A need_pool_or_done_cond N/A N/A N/A call_completed_map N/A N/A task caller_id N/A N/A N/A N/A N/A need_pool_or_done_cond wait N/A N/A _MainThreadUIQueue N/A object N/A N/A Handles status display and processing in the main thread / master process.

  This class emulates a queue to cover main-thread activity before or after
  Apply, as well as for the single-threaded, single-process case, i.e.,
  _SequentialApply. When multiple threads or processes are used, during calls
  to Apply the main thread is waiting for work to complete, and this queue
  should remain unused until Apply returns.

  Presently, this class just prints strings that it receives verbatim; in the
  future, typed status messages can be defined for processing.
   __init__ N/A N/A self logger N/A N/A N/A N/A self logger logger N/A put N/A N/A self status_item N/A N/A N/A N/A N/A N/A self logger isEnabledFor N/A logging INFO N/A N/A N/A N/A N/A sys stderr write N/A str status_item N/A N/A _UIThread N/A N/A threading Thread N/A N/A Responsible for centralized printing across multiple processes/threads.

  This class pulls status messages that are posted to the centralized status
  queue and coordinates displaying status and progress to the user. It is
  used only during calls to _ParallelApply, which in turn is called only when
  multiple threads and/or processes are used.

  Presently, this thread just prints strings that it receives verbatim; in the
  future, typed status messages can be defined for processing.
   __init__ N/A N/A self status_queue logger N/A N/A N/A N/A N/A N/A super _UIThread self __init__ N/A N/A self status_queue status_queue N/A N/A self logger logger N/A N/A N/A self start N/A run N/A N/A self N/A N/A N/A True N/A N/A status_item N/A N/A N/A self status_queue get N/A N/A status_item ZERO_TASKS_TO_DO_ARGUMENT N/A N/A N/A N/A N/A N/A self logger isEnabledFor N/A logging INFO N/A N/A N/A N/A N/A sys stderr write N/A str status_item N/A N/A _ConsumerPool N/A object N/A __init__ N/A N/A self processes task_queue N/A N/A N/A N/A self processes processes N/A N/A self task_queue task_queue N/A ShutDown N/A N/A self N/A N/A N/A process N/A self processes N/A N/A N/A KillProcess N/A process pid N/A N/A Task N/A N/A namedtuple Task func args caller_id exception_handler should_return_results arg_checker fail_on_error N/A N/A Task class representing work to be completed.

  Args:
    func: The function to be executed.
    args: The arguments to func.
    caller_id: The globally-unique caller ID corresponding to the Apply call.
    exception_handler: The exception handler to use if the call to func fails.
    should_return_results: True iff the results of this function should be
                           returned from the Apply call.
    arg_checker: Used to determine whether we should process the current
                 argument or simply skip it. Also handles any logging that
                 is specific to a particular type of argument.
    fail_on_error: If true, then raise any exceptions encountered when
                   executing func. This is only applicable in the case of
                   process_count == thread_count == 1.
   N/A N/A ProducerThread N/A N/A threading Thread N/A N/A Thread used to enqueue work for other processes and threads. __init__ N/A N/A self cls args_iterator caller_id func task_queue should_return_results exception_handler arg_checker fail_on_error N/A N/A N/A Initializes the producer thread.

    Args:
      cls: Instance of Command for which this ProducerThread was created.
      args_iterator: Iterable collection of arguments to be put into the
                     work queue.
      caller_id: Globally-unique caller ID corresponding to this call to Apply.
      func: The function to be called on each element of args_iterator.
      task_queue: The queue into which tasks will be put, to later be consumed
                  by Command._ApplyThreads.
      should_return_results: True iff the results for this call to command.Apply
                             were requested.
      exception_handler: The exception handler to use when errors are
                         encountered during calls to func.
      arg_checker: Used to determine whether we should process the current
                   argument or simply skip it. Also handles any logging that
                   is specific to a particular type of argument.
      fail_on_error: If true, then raise any exceptions encountered when
                     executing func. This is only applicable in the case of
                     process_count == thread_count == 1.
     N/A N/A N/A N/A super ProducerThread self __init__ N/A N/A self func func N/A N/A self cls cls N/A N/A self args_iterator args_iterator N/A N/A self caller_id caller_id N/A N/A self task_queue task_queue N/A N/A self arg_checker arg_checker N/A N/A self exception_handler exception_handler N/A N/A self should_return_results should_return_results N/A N/A self fail_on_error fail_on_error N/A N/A self shared_variables_updater N/A _SharedVariablesUpdater N/A N/A self daemon True N/A N/A self unknown_exception None N/A N/A self iterator_exception None N/A N/A N/A self start N/A run N/A N/A self N/A N/A N/A num_tasks 0 N/A cur_task None N/A last_task None N/A N/A N/A N/A N/A args_iterator N/A iter N/A self args_iterator N/A True N/A N/A N/A N/A args N/A N/A args_iterator next N/A N/A N/A StopIteration N/A e N/A N/A N/A N/A Exception N/A e N/A N/A N/A _IncrementFailureCount N/A N/A self fail_on_error N/A N/A N/A self iterator_exception e N/A N/A N/A N/A N/A N/A N/A self exception_handler N/A self cls e N/A N/A N/A Exception N/A _ N/A N/A N/A N/A N/A N/A self cls logger debug Caught exception while handling exception for %s:
%s N/A self func N/A N/A traceback format_exc N/A N/A N/A N/A self shared_variables_updater Update N/A self caller_id N/A self cls N/A N/A N/A N/A self arg_checker N/A self cls args N/A N/A num_tasks 1 N/A last_task cur_task N/A cur_task N/A Task N/A self func args N/A self caller_id N/A self exception_handler N/A self should_return_results N/A self arg_checker N/A self fail_on_error N/A last_task N/A N/A N/A N/A N/A self task_queue put last_task N/A N/A N/A Exception N/A e N/A N/A N/A N/A self iterator_exception N/A N/A N/A self unknown_exception e N/A N/A N/A total_tasks N/A N/A self caller_id num_tasks N/A N/A cur_task N/A N/A cur_task N/A Task None ZERO_TASKS_TO_DO_ARGUMENT N/A self caller_id None None None None N/A N/A N/A N/A self task_queue put cur_task N/A N/A _NotifyIfDone N/A self caller_id N/A N/A caller_id_finished_count get N/A self caller_id N/A N/A WorkerPool N/A object N/A N/A Pool of worker threads to which tasks can be added. __init__ N/A N/A self thread_count logger worker_semaphore bucket_storage_uri_class gsutil_api_map debug status_queue N/A None None 0 None N/A N/A N/A self task_queue N/A _NewThreadsafeQueue N/A N/A self threads N/A N/A _ N/A range thread_count N/A N/A worker_thread N/A WorkerThread N/A self task_queue logger worker_semaphore worker_semaphore bucket_storage_uri_class bucket_storage_uri_class gsutil_api_map gsutil_api_map debug debug status_queue status_queue N/A N/A N/A N/A self threads append worker_thread N/A N/A N/A worker_thread start N/A AddTask N/A N/A self task N/A N/A N/A N/A N/A N/A self task_queue put task N/A N/A WorkerThread N/A N/A threading Thread N/A N/A Thread where all the work will be performed.

  This makes the function calls for Apply and takes care of all error handling,
  return value propagation, and shared_vars.

  Note that this thread is NOT started upon instantiation because the function-
  calling logic is also used in the single-threaded case.
   __init__ N/A N/A self task_queue logger worker_semaphore bucket_storage_uri_class gsutil_api_map debug status_queue N/A None None None 0 None N/A N/A Initializes the worker thread.

    Args:
      task_queue: The thread-safe queue from which this thread should obtain
                  its work.
      logger: Logger to use for this thread.
      worker_semaphore: threading.BoundedSemaphore to be released each time a
          task is completed, or None for single-threaded execution.
      bucket_storage_uri_class: Class to instantiate for cloud StorageUris.
                                Settable for testing/mocking.
      gsutil_api_map: Map of providers and API selector tuples to api classes
                      which can be used to communicate with those providers.
                      Used for the instantiating CloudApiDelegator class.
      debug: debug level for the CloudApiDelegator class.
      status_queue: Queue for reporting status updates.
     N/A N/A N/A N/A super WorkerThread self __init__ N/A N/A self task_queue task_queue N/A N/A self worker_semaphore worker_semaphore N/A N/A self daemon True N/A N/A self cached_classes N/A N/A N/A self shared_vars_updater N/A _SharedVariablesUpdater N/A N/A self thread_gsutil_api None N/A N/A bucket_storage_uri_class gsutil_api_map N/A N/A N/A self thread_gsutil_api N/A CloudApiDelegator bucket_storage_uri_class gsutil_api_map logger status_queue debug debug N/A PerformTask N/A N/A self task cls N/A N/A N/A Makes the function call for a task.

    Args:
      task: The Task to perform.
      cls: The instance of a class which gives context to the functions called
           by the Task's function. E.g., see SetAclFuncWrapper.
     N/A caller_id N/A task caller_id N/A N/A N/A N/A N/A results N/A N/A task func cls N/A task args thread_state N/A self thread_gsutil_api N/A N/A task should_return_results N/A N/A N/A N/A global_return_values_map Increment caller_id N/A results default_value N/A N/A N/A N/A Exception N/A e N/A N/A N/A _IncrementFailureCount N/A N/A task fail_on_error N/A N/A N/A N/A N/A N/A N/A N/A task exception_handler cls e N/A N/A N/A Exception N/A _ N/A N/A N/A N/A N/A cls logger debug Caught exception while handling exception for %s:
%s task N/A N/A traceback format_exc N/A N/A N/A self worker_semaphore N/A N/A N/A N/A N/A self worker_semaphore release N/A N/A N/A N/A self shared_vars_updater Update caller_id cls N/A num_done N/A N/A caller_id_finished_count Increment caller_id 1 N/A N/A _NotifyIfDone caller_id num_done N/A run N/A N/A self N/A N/A N/A True N/A N/A task N/A N/A N/A self task_queue get N/A caller_id N/A task caller_id N/A cls N/A N/A N/A self cached_classes get caller_id None N/A N/A cls N/A N/A cls N/A N/A copy copy N/A class_map N/A caller_id N/A N/A cls logger N/A CreateGsutilLogger N/A cls command_name N/A N/A N/A self cached_classes N/A caller_id cls N/A N/A N/A self PerformTask task cls N/A N/A _SharedVariablesUpdater N/A object N/A N/A Used to update shared variable for a class in the global map.

     Note that each thread will have its own instance of the calling class for
     context, and it will also have its own instance of a
     _SharedVariablesUpdater.  This is used in the following way:

     1. Before any tasks are performed, each thread will get a copy of the
        calling class, and the globally-consistent value of this shared variable
        will be initialized to whatever it was before the call to Apply began.

     2. After each time a thread performs a task, it will look at the current
        values of the shared variables in its instance of the calling class.

        2.A. For each such variable, it computes the delta of this variable
             between the last known value for this class (which is stored in
             a dict local to this class) and the current value of the variable
             in the class.

        2.B. Using this delta, we update the last known value locally as well
             as the globally-consistent value shared across all classes (the
             globally consistent value is simply increased by the computed
             delta).
   __init__ N/A N/A self N/A N/A N/A N/A self last_shared_var_values N/A N/A Update N/A N/A self caller_id cls N/A N/A N/A Update any shared variables with their deltas. N/A shared_vars N/A N/A shared_vars_list_map get caller_id None N/A shared_vars N/A N/A name shared_vars N/A N/A key N/A caller_id name N/A last_value N/A N/A N/A self last_shared_var_values get key 0 N/A delta N/A N/A getattr cls name last_value N/A N/A N/A self last_shared_var_values N/A key N/A delta last_value N/A N/A N/A shared_vars_map Increment key delta N/A N/A _NotifyIfDone N/A N/A caller_id num_done N/A N/A N/A Notify any threads waiting for results that something has finished.

  Each waiting thread will then need to check the call_completed_map to see if
  its work is done.

  Note that num_done could be calculated here, but it is passed in as an
  optimization so that we have one less call to a globally-locked data
  structure.

  Args:
    caller_id: The caller_id of the function whose progress we're checking.
    num_done: The number of tasks currently completed for that caller_id.
   N/A num_to_do N/A total_tasks N/A caller_id N/A N/A N/A num_to_do num_done N/A num_to_do 0 N/A N/A need_pool_or_done_cond N/A N/A N/A call_completed_map N/A caller_id True N/A N/A N/A need_pool_or_done_cond notify_all N/A ShutDownGsutil N/A N/A N/A N/A N/A Shut down all processes in consumer pools in preparation for exiting. N/A q queues N/A N/A N/A N/A N/A N/A q cancel_join_thread N/A N/A N/A N/A N/A consumer_pool consumer_pools N/A N/A N/A N/A consumer_pool ShutDown N/A _IncrementFailureCount N/A N/A N/A N/A N/A failure_count N/A N/A isinstance failure_count int N/A N/A failure_count 1 N/A N/A N/A failure_count value 1 N/A DecrementFailureCount N/A N/A N/A N/A N/A failure_count N/A N/A isinstance failure_count int N/A N/A failure_count 1 N/A N/A N/A failure_count value 1 N/A GetFailureCount N/A N/A N/A N/A N/A Returns the number of failures processed during calls to Apply(). N/A N/A N/A N/A isinstance failure_count int N/A N/A failure_count N/A N/A N/A failure_count value N/A N/A N/A NameError N/A N/A 0 N/A ResetFailureCount N/A N/A N/A N/A N/A Resets the failure_count variable to 0 - useful if error is expected. N/A N/A N/A failure_count N/A N/A isinstance failure_count int N/A N/A failure_count 0 N/A N/A failure_count N/A N/A multiprocessing Value i 0 N/A N/A N/A NameError N/A N/A N/A