diff --git a/.gitattributes b/.gitattributes index b5c7d1199d8b51d722f4dea42725a76fa8b5a629..398da729bce4c7292b76723a0e9f2d86d96c5420 100644 --- a/.gitattributes +++ b/.gitattributes @@ -571,3 +571,37 @@ py311/lib/python3.11/site-packages/matplotlib/mpl-data/fonts/ttf/STIXGeneralBol. .venv/lib/python3.13/site-packages/fontTools/feaLib/lexer.cpython-313-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text .venv/lib/python3.13/site-packages/botocore/__pycache__/utils.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text .venv/lib/python3.13/site-packages/botocore/__pycache__/credentials.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jaxlib/cpu/_sparse.so filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jaxlib/triton/__pycache__/_triton_ops_gen.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jaxlib/cpu/_lapack.so filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jaxlib/mlir/dialects/__pycache__/_gpu_ops_gen.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jaxlib/mlir/dialects/__pycache__/_chlo_ops_gen.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jaxlib/mlir/dialects/__pycache__/_mhlo_ops_gen.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jaxlib/mlir/dialects/__pycache__/_sparse_tensor_ops_gen.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jaxlib/mlir/dialects/__pycache__/_memref_ops_gen.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jaxlib/mlir/dialects/__pycache__/_nvgpu_ops_gen.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jaxlib/mlir/dialects/__pycache__/_math_ops_gen.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jaxlib/mlir/dialects/__pycache__/_llvm_ops_gen.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jaxlib/mlir/dialects/__pycache__/_vector_ops_gen.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jaxlib/mlir/dialects/__pycache__/_arith_ops_gen.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jaxlib/mlir/dialects/__pycache__/_nvvm_ops_gen.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jaxlib/mlir/dialects/__pycache__/_stablehlo_ops_gen.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jaxlib/mosaic/python/__pycache__/_tpu_gen.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jaxlib/mosaic/dialect/gpu/__pycache__/_mosaic_gpu_gen_ops.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jax/_src/__pycache__/random.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jax/_src/__pycache__/pjit.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jax/_src/__pycache__/shard_map.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jax/_src/__pycache__/core.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jax/_src/__pycache__/custom_derivatives.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jax/_src/__pycache__/test_util.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jax/_src/__pycache__/api.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jax/_src/interpreters/__pycache__/partial_eval.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jax/_src/interpreters/__pycache__/ad.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jax/_src/interpreters/__pycache__/mlir.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jax/_src/numpy/__pycache__/ufuncs.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jax/_src/interpreters/__pycache__/pxla.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jax/_src/numpy/__pycache__/lax_numpy.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jax/_src/numpy/__pycache__/reductions.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jax/_src/lax/__pycache__/lax.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jax/_src/lax/__pycache__/parallel.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text +.venv/lib/python3.13/site-packages/jax/_src/lax/__pycache__/slicing.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text diff --git a/.venv/lib/python3.13/site-packages/aiohappyeyeballs/__pycache__/__init__.cpython-313.pyc b/.venv/lib/python3.13/site-packages/aiohappyeyeballs/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f3214bbe668b8aa7e1f328a7d5e5bd8dcaa472db Binary files /dev/null and b/.venv/lib/python3.13/site-packages/aiohappyeyeballs/__pycache__/__init__.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/aiohappyeyeballs/__pycache__/_staggered.cpython-313.pyc b/.venv/lib/python3.13/site-packages/aiohappyeyeballs/__pycache__/_staggered.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..75f38049dc4e3518a29efe01da5f65ec1fd340cf Binary files /dev/null and b/.venv/lib/python3.13/site-packages/aiohappyeyeballs/__pycache__/_staggered.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/aiohappyeyeballs/__pycache__/impl.cpython-313.pyc b/.venv/lib/python3.13/site-packages/aiohappyeyeballs/__pycache__/impl.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..11da03c3efc841b3680ef74a34bc5a5064e50fec Binary files /dev/null and b/.venv/lib/python3.13/site-packages/aiohappyeyeballs/__pycache__/impl.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/aiohappyeyeballs/__pycache__/types.cpython-313.pyc b/.venv/lib/python3.13/site-packages/aiohappyeyeballs/__pycache__/types.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..11f69cad102b6ae2524fb8bdac1e451eb88ce063 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/aiohappyeyeballs/__pycache__/types.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/aiohappyeyeballs/__pycache__/utils.cpython-313.pyc b/.venv/lib/python3.13/site-packages/aiohappyeyeballs/__pycache__/utils.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cc6af6617cd3658390cd22f390279a8fac05aa49 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/aiohappyeyeballs/__pycache__/utils.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/__pycache__/BufferedTokenStream.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/BufferedTokenStream.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d043886b28af435a2e7d0f21591cf63efa050f5e Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/BufferedTokenStream.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/__pycache__/CommonTokenFactory.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/CommonTokenFactory.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..535f88932ca3d05d12a1cdef7e85977d49ae7f55 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/CommonTokenFactory.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/__pycache__/CommonTokenStream.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/CommonTokenStream.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e654641fe9b1ceaa690d89f324d236879343b0f3 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/CommonTokenStream.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/__pycache__/FileStream.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/FileStream.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6c8419aa49f0f2f2fa3a5535c841f1237ebf7fb6 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/FileStream.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/__pycache__/InputStream.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/InputStream.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1aaa2ae2d9ff270f2d4f5d2e4db782762b56576b Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/InputStream.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/__pycache__/IntervalSet.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/IntervalSet.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fa880590b5287ceeb58d70eb0465d0e7240922de Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/IntervalSet.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/__pycache__/Lexer.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/Lexer.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..612458d0f56be7f83042de010b26d41ef3ae9677 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/Lexer.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/__pycache__/ListTokenSource.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/ListTokenSource.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..52b23b8ccf3cd4dfa58be13b5bff569f181d6264 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/ListTokenSource.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/__pycache__/Parser.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/Parser.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b2fc8f4d470331ced1e6763fe3bceb0df2c654cb Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/Parser.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/__pycache__/ParserRuleContext.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/ParserRuleContext.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a0e3d340c38420a2a80eb9433413a7f84e9f9ff8 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/ParserRuleContext.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/__pycache__/PredictionContext.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/PredictionContext.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e4bf771ee69ff5edebfa9211dc7edc79f9e5c0ac Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/PredictionContext.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/__pycache__/Recognizer.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/Recognizer.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fe05559ee5aeb55ecef94df0cc9405482df872b1 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/Recognizer.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/__pycache__/RuleContext.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/RuleContext.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c0373e2079daff0ac3f7e397b1e81ea2affbb50f Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/RuleContext.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/__pycache__/StdinStream.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/StdinStream.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7a9ca0c26ea56bf0d5a0d275397cef96d1258789 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/StdinStream.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/__pycache__/Token.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/Token.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1e29df707b55bd8da6db4199d5cacbf25b355532 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/Token.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/__pycache__/Utils.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/Utils.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8541d9a9929d5f2bf574440cc18cf6e3b5f574d9 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/Utils.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/__pycache__/__init__.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..040c9d3bf8d6ea4e8cdd755cb461b2d4ee2ae21d Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/__pycache__/__init__.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/ATN.py b/.venv/lib/python3.13/site-packages/antlr4/atn/ATN.py new file mode 100644 index 0000000000000000000000000000000000000000..3f1abe0a4a7faacde5140d5631dfe48a79325cd4 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/atn/ATN.py @@ -0,0 +1,132 @@ +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +#/ +from antlr4.IntervalSet import IntervalSet + +from antlr4.RuleContext import RuleContext + +from antlr4.Token import Token +from antlr4.atn.ATNType import ATNType +from antlr4.atn.ATNState import ATNState, DecisionState + + +class ATN(object): + __slots__ = ( + 'grammarType', 'maxTokenType', 'states', 'decisionToState', + 'ruleToStartState', 'ruleToStopState', 'modeNameToStartState', + 'ruleToTokenType', 'lexerActions', 'modeToStartState' + ) + + INVALID_ALT_NUMBER = 0 + + # Used for runtime deserialization of ATNs from strings#/ + def __init__(self, grammarType:ATNType , maxTokenType:int ): + # The type of the ATN. + self.grammarType = grammarType + # The maximum value for any symbol recognized by a transition in the ATN. + self.maxTokenType = maxTokenType + self.states = [] + # Each subrule/rule is a decision point and we must track them so we + # can go back later and build DFA predictors for them. This includes + # all the rules, subrules, optional blocks, ()+, ()* etc... + self.decisionToState = [] + # Maps from rule index to starting state number. + self.ruleToStartState = [] + # Maps from rule index to stop state number. + self.ruleToStopState = None + self.modeNameToStartState = dict() + # For lexer ATNs, this maps the rule index to the resulting token type. + # For parser ATNs, this maps the rule index to the generated bypass token + # type if the + # {@link ATNDeserializationOptions#isGenerateRuleBypassTransitions} + # deserialization option was specified; otherwise, this is {@code null}. + self.ruleToTokenType = None + # For lexer ATNs, this is an array of {@link LexerAction} objects which may + # be referenced by action transitions in the ATN. + self.lexerActions = None + self.modeToStartState = [] + + # Compute the set of valid tokens that can occur starting in state {@code s}. + # If {@code ctx} is null, the set of tokens will not include what can follow + # the rule surrounding {@code s}. In other words, the set will be + # restricted to tokens reachable staying within {@code s}'s rule. + def nextTokensInContext(self, s:ATNState, ctx:RuleContext): + from antlr4.LL1Analyzer import LL1Analyzer + anal = LL1Analyzer(self) + return anal.LOOK(s, ctx=ctx) + + # Compute the set of valid tokens that can occur starting in {@code s} and + # staying in same rule. {@link Token#EPSILON} is in set if we reach end of + # rule. + def nextTokensNoContext(self, s:ATNState): + if s.nextTokenWithinRule is not None: + return s.nextTokenWithinRule + s.nextTokenWithinRule = self.nextTokensInContext(s, None) + s.nextTokenWithinRule.readonly = True + return s.nextTokenWithinRule + + def nextTokens(self, s:ATNState, ctx:RuleContext = None): + if ctx==None: + return self.nextTokensNoContext(s) + else: + return self.nextTokensInContext(s, ctx) + + def addState(self, state:ATNState): + if state is not None: + state.atn = self + state.stateNumber = len(self.states) + self.states.append(state) + + def removeState(self, state:ATNState): + self.states[state.stateNumber] = None # just free mem, don't shift states in list + + def defineDecisionState(self, s:DecisionState): + self.decisionToState.append(s) + s.decision = len(self.decisionToState)-1 + return s.decision + + def getDecisionState(self, decision:int): + if len(self.decisionToState)==0: + return None + else: + return self.decisionToState[decision] + + # Computes the set of input symbols which could follow ATN state number + # {@code stateNumber} in the specified full {@code context}. This method + # considers the complete parser context, but does not evaluate semantic + # predicates (i.e. all predicates encountered during the calculation are + # assumed true). If a path in the ATN exists from the starting state to the + # {@link RuleStopState} of the outermost context without matching any + # symbols, {@link Token#EOF} is added to the returned set. + # + #

If {@code context} is {@code null}, it is treated as + # {@link ParserRuleContext#EMPTY}.

+ # + # @param stateNumber the ATN state number + # @param context the full parse context + # @return The set of potentially valid input symbols which could follow the + # specified state in the specified context. + # @throws IllegalArgumentException if the ATN does not contain a state with + # number {@code stateNumber} + #/ + def getExpectedTokens(self, stateNumber:int, ctx:RuleContext ): + if stateNumber < 0 or stateNumber >= len(self.states): + raise Exception("Invalid state number.") + s = self.states[stateNumber] + following = self.nextTokens(s) + if Token.EPSILON not in following: + return following + expected = IntervalSet() + expected.addSet(following) + expected.removeOne(Token.EPSILON) + while (ctx != None and ctx.invokingState >= 0 and Token.EPSILON in following): + invokingState = self.states[ctx.invokingState] + rt = invokingState.transitions[0] + following = self.nextTokens(rt.followState) + expected.addSet(following) + expected.removeOne(Token.EPSILON) + ctx = ctx.parentCtx + if Token.EPSILON in following: + expected.addOne(Token.EOF) + return expected diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/ATNConfig.py b/.venv/lib/python3.13/site-packages/antlr4/atn/ATNConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..e008fb2efac45a24b6d9566170bbd227cee252b6 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/atn/ATNConfig.py @@ -0,0 +1,159 @@ +# +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +#/ + +# A tuple: (ATN state, predicted alt, syntactic, semantic context). +# The syntactic context is a graph-structured stack node whose +# path(s) to the root is the rule invocation(s) +# chain used to arrive at the state. The semantic context is +# the tree of semantic predicates encountered before reaching +# an ATN state. +#/ +from io import StringIO +from antlr4.PredictionContext import PredictionContext +from antlr4.atn.ATNState import ATNState, DecisionState +from antlr4.atn.LexerActionExecutor import LexerActionExecutor +from antlr4.atn.SemanticContext import SemanticContext + +# need a forward declaration +ATNConfig = None + +class ATNConfig(object): + __slots__ = ( + 'state', 'alt', 'context', 'semanticContext', 'reachesIntoOuterContext', + 'precedenceFilterSuppressed' + ) + + def __init__(self, state:ATNState=None, alt:int=None, context:PredictionContext=None, semantic:SemanticContext=None, config:ATNConfig=None): + if config is not None: + if state is None: + state = config.state + if alt is None: + alt = config.alt + if context is None: + context = config.context + if semantic is None: + semantic = config.semanticContext + if semantic is None: + semantic = SemanticContext.NONE + # The ATN state associated with this configuration#/ + self.state = state + # What alt (or lexer rule) is predicted by this configuration#/ + self.alt = alt + # The stack of invoking states leading to the rule/states associated + # with this config. We track only those contexts pushed during + # execution of the ATN simulator. + self.context = context + self.semanticContext = semantic + # We cannot execute predicates dependent upon local context unless + # we know for sure we are in the correct context. Because there is + # no way to do this efficiently, we simply cannot evaluate + # dependent predicates unless we are in the rule that initially + # invokes the ATN simulator. + # + # closure() tracks the depth of how far we dip into the + # outer context: depth > 0. Note that it may not be totally + # accurate depth since I don't ever decrement. TODO: make it a boolean then + self.reachesIntoOuterContext = 0 if config is None else config.reachesIntoOuterContext + self.precedenceFilterSuppressed = False if config is None else config.precedenceFilterSuppressed + + # An ATN configuration is equal to another if both have + # the same state, they predict the same alternative, and + # syntactic/semantic contexts are the same. + #/ + def __eq__(self, other): + if self is other: + return True + elif not isinstance(other, ATNConfig): + return False + else: + return self.state.stateNumber==other.state.stateNumber \ + and self.alt==other.alt \ + and ((self.context is other.context) or (self.context==other.context)) \ + and self.semanticContext==other.semanticContext \ + and self.precedenceFilterSuppressed==other.precedenceFilterSuppressed + + def __hash__(self): + return hash((self.state.stateNumber, self.alt, self.context, self.semanticContext)) + + def hashCodeForConfigSet(self): + return hash((self.state.stateNumber, self.alt, hash(self.semanticContext))) + + def equalsForConfigSet(self, other): + if self is other: + return True + elif not isinstance(other, ATNConfig): + return False + else: + return self.state.stateNumber==other.state.stateNumber \ + and self.alt==other.alt \ + and self.semanticContext==other.semanticContext + + def __str__(self): + with StringIO() as buf: + buf.write('(') + buf.write(str(self.state)) + buf.write(",") + buf.write(str(self.alt)) + if self.context is not None: + buf.write(",[") + buf.write(str(self.context)) + buf.write("]") + if self.semanticContext is not None and self.semanticContext is not SemanticContext.NONE: + buf.write(",") + buf.write(str(self.semanticContext)) + if self.reachesIntoOuterContext>0: + buf.write(",up=") + buf.write(str(self.reachesIntoOuterContext)) + buf.write(')') + return buf.getvalue() + +# need a forward declaration +LexerATNConfig = None + +class LexerATNConfig(ATNConfig): + __slots__ = ('lexerActionExecutor', 'passedThroughNonGreedyDecision') + + def __init__(self, state:ATNState, alt:int=None, context:PredictionContext=None, semantic:SemanticContext=SemanticContext.NONE, + lexerActionExecutor:LexerActionExecutor=None, config:LexerATNConfig=None): + super().__init__(state=state, alt=alt, context=context, semantic=semantic, config=config) + if config is not None: + if lexerActionExecutor is None: + lexerActionExecutor = config.lexerActionExecutor + # This is the backing field for {@link #getLexerActionExecutor}. + self.lexerActionExecutor = lexerActionExecutor + self.passedThroughNonGreedyDecision = False if config is None else self.checkNonGreedyDecision(config, state) + + def __hash__(self): + return hash((self.state.stateNumber, self.alt, self.context, + self.semanticContext, self.passedThroughNonGreedyDecision, + self.lexerActionExecutor)) + + def __eq__(self, other): + if self is other: + return True + elif not isinstance(other, LexerATNConfig): + return False + if self.passedThroughNonGreedyDecision != other.passedThroughNonGreedyDecision: + return False + if not(self.lexerActionExecutor == other.lexerActionExecutor): + return False + return super().__eq__(other) + + + + def hashCodeForConfigSet(self): + return hash(self) + + + + def equalsForConfigSet(self, other): + return self==other + + + + def checkNonGreedyDecision(self, source:LexerATNConfig, target:ATNState): + return source.passedThroughNonGreedyDecision \ + or isinstance(target, DecisionState) and target.nonGreedy diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/ATNConfigSet.py b/.venv/lib/python3.13/site-packages/antlr4/atn/ATNConfigSet.py new file mode 100644 index 0000000000000000000000000000000000000000..9e9a512a682431e46a3f5b848420a762af3c7914 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/atn/ATNConfigSet.py @@ -0,0 +1,212 @@ +# +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. + +# +# Specialized {@link Set}{@code <}{@link ATNConfig}{@code >} that can track +# info about the set, with support for combining similar configurations using a +# graph-structured stack. +#/ +from io import StringIO +from functools import reduce +from antlr4.PredictionContext import PredictionContext, merge +from antlr4.Utils import str_list +from antlr4.atn.ATN import ATN +from antlr4.atn.ATNConfig import ATNConfig +from antlr4.atn.SemanticContext import SemanticContext +from antlr4.error.Errors import UnsupportedOperationException, IllegalStateException + +ATNSimulator = None + +class ATNConfigSet(object): + __slots__ = ( + 'configLookup', 'fullCtx', 'readonly', 'configs', 'uniqueAlt', + 'conflictingAlts', 'hasSemanticContext', 'dipsIntoOuterContext', + 'cachedHashCode' + ) + + # + # The reason that we need this is because we don't want the hash map to use + # the standard hash code and equals. We need all configurations with the same + # {@code (s,i,_,semctx)} to be equal. Unfortunately, this key effectively doubles + # the number of objects associated with ATNConfigs. The other solution is to + # use a hash table that lets us specify the equals/hashcode operation. + + def __init__(self, fullCtx:bool=True): + # All configs but hashed by (s, i, _, pi) not including context. Wiped out + # when we go readonly as this set becomes a DFA state. + self.configLookup = dict() + # Indicates that this configuration set is part of a full context + # LL prediction. It will be used to determine how to merge $. With SLL + # it's a wildcard whereas it is not for LL context merge. + self.fullCtx = fullCtx + # Indicates that the set of configurations is read-only. Do not + # allow any code to manipulate the set; DFA states will point at + # the sets and they must not change. This does not protect the other + # fields; in particular, conflictingAlts is set after + # we've made this readonly. + self.readonly = False + # Track the elements as they are added to the set; supports get(i)#/ + self.configs = [] + + # TODO: these fields make me pretty uncomfortable but nice to pack up info together, saves recomputation + # TODO: can we track conflicts as they are added to save scanning configs later? + self.uniqueAlt = 0 + self.conflictingAlts = None + + # Used in parser and lexer. In lexer, it indicates we hit a pred + # while computing a closure operation. Don't make a DFA state from this. + self.hasSemanticContext = False + self.dipsIntoOuterContext = False + + self.cachedHashCode = -1 + + def __iter__(self): + return self.configs.__iter__() + + # Adding a new config means merging contexts with existing configs for + # {@code (s, i, pi, _)}, where {@code s} is the + # {@link ATNConfig#state}, {@code i} is the {@link ATNConfig#alt}, and + # {@code pi} is the {@link ATNConfig#semanticContext}. We use + # {@code (s,i,pi)} as key. + # + #

This method updates {@link #dipsIntoOuterContext} and + # {@link #hasSemanticContext} when necessary.

+ #/ + def add(self, config:ATNConfig, mergeCache=None): + if self.readonly: + raise Exception("This set is readonly") + if config.semanticContext is not SemanticContext.NONE: + self.hasSemanticContext = True + if config.reachesIntoOuterContext > 0: + self.dipsIntoOuterContext = True + existing = self.getOrAdd(config) + if existing is config: + self.cachedHashCode = -1 + self.configs.append(config) # track order here + return True + # a previous (s,i,pi,_), merge with it and save result + rootIsWildcard = not self.fullCtx + merged = merge(existing.context, config.context, rootIsWildcard, mergeCache) + # no need to check for existing.context, config.context in cache + # since only way to create new graphs is "call rule" and here. + # We cache at both places. + existing.reachesIntoOuterContext = max(existing.reachesIntoOuterContext, config.reachesIntoOuterContext) + # make sure to preserve the precedence filter suppression during the merge + if config.precedenceFilterSuppressed: + existing.precedenceFilterSuppressed = True + existing.context = merged # replace context; no need to alt mapping + return True + + def getOrAdd(self, config:ATNConfig): + h = config.hashCodeForConfigSet() + l = self.configLookup.get(h, None) + if l is not None: + r = next((cfg for cfg in l if config.equalsForConfigSet(cfg)), None) + if r is not None: + return r + if l is None: + l = [config] + self.configLookup[h] = l + else: + l.append(config) + return config + + def getStates(self): + return set(c.state for c in self.configs) + + def getPredicates(self): + return list(cfg.semanticContext for cfg in self.configs if cfg.semanticContext!=SemanticContext.NONE) + + def get(self, i:int): + return self.configs[i] + + def optimizeConfigs(self, interpreter:ATNSimulator): + if self.readonly: + raise IllegalStateException("This set is readonly") + if len(self.configs)==0: + return + for config in self.configs: + config.context = interpreter.getCachedContext(config.context) + + def addAll(self, coll:list): + for c in coll: + self.add(c) + return False + + def __eq__(self, other): + if self is other: + return True + elif not isinstance(other, ATNConfigSet): + return False + + same = self.configs is not None and \ + self.configs==other.configs and \ + self.fullCtx == other.fullCtx and \ + self.uniqueAlt == other.uniqueAlt and \ + self.conflictingAlts == other.conflictingAlts and \ + self.hasSemanticContext == other.hasSemanticContext and \ + self.dipsIntoOuterContext == other.dipsIntoOuterContext + + return same + + def __hash__(self): + if self.readonly: + if self.cachedHashCode == -1: + self.cachedHashCode = self.hashConfigs() + return self.cachedHashCode + return self.hashConfigs() + + def hashConfigs(self): + return reduce(lambda h, cfg: hash((h, cfg)), self.configs, 0) + + def __len__(self): + return len(self.configs) + + def isEmpty(self): + return len(self.configs)==0 + + def __contains__(self, config): + if self.configLookup is None: + raise UnsupportedOperationException("This method is not implemented for readonly sets.") + h = config.hashCodeForConfigSet() + l = self.configLookup.get(h, None) + if l is not None: + for c in l: + if config.equalsForConfigSet(c): + return True + return False + + def clear(self): + if self.readonly: + raise IllegalStateException("This set is readonly") + self.configs.clear() + self.cachedHashCode = -1 + self.configLookup.clear() + + def setReadonly(self, readonly:bool): + self.readonly = readonly + self.configLookup = None # can't mod, no need for lookup cache + + def __str__(self): + with StringIO() as buf: + buf.write(str_list(self.configs)) + if self.hasSemanticContext: + buf.write(",hasSemanticContext=") + buf.write(str(self.hasSemanticContext)) + if self.uniqueAlt!=ATN.INVALID_ALT_NUMBER: + buf.write(",uniqueAlt=") + buf.write(str(self.uniqueAlt)) + if self.conflictingAlts is not None: + buf.write(",conflictingAlts=") + buf.write(str(self.conflictingAlts)) + if self.dipsIntoOuterContext: + buf.write(",dipsIntoOuterContext") + return buf.getvalue() + + +class OrderedATNConfigSet(ATNConfigSet): + + def __init__(self): + super().__init__() diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/ATNDeserializationOptions.py b/.venv/lib/python3.13/site-packages/antlr4/atn/ATNDeserializationOptions.py new file mode 100644 index 0000000000000000000000000000000000000000..69d5437f35437874a60bcc76118f018edbf65fed --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/atn/ATNDeserializationOptions.py @@ -0,0 +1,24 @@ +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. + +# need a forward declaration +ATNDeserializationOptions = None + +class ATNDeserializationOptions(object): + __slots__ = ('readonly', 'verifyATN', 'generateRuleBypassTransitions') + + defaultOptions = None + + def __init__(self, copyFrom:ATNDeserializationOptions = None): + self.readonly = False + self.verifyATN = True if copyFrom is None else copyFrom.verifyATN + self.generateRuleBypassTransitions = False if copyFrom is None else copyFrom.generateRuleBypassTransitions + + def __setattr__(self, key, value): + if key!="readonly" and self.readonly: + raise Exception("The object is read only.") + super(type(self), self).__setattr__(key,value) + +ATNDeserializationOptions.defaultOptions = ATNDeserializationOptions() +ATNDeserializationOptions.defaultOptions.readonly = True diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/ATNDeserializer.py b/.venv/lib/python3.13/site-packages/antlr4/atn/ATNDeserializer.py new file mode 100644 index 0000000000000000000000000000000000000000..cc100d05a43e10b91390dd47a7b05f2eff6fe23f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/atn/ATNDeserializer.py @@ -0,0 +1,529 @@ +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +#/ +from uuid import UUID +from io import StringIO +from typing import Callable +from antlr4.Token import Token +from antlr4.atn.ATN import ATN +from antlr4.atn.ATNType import ATNType +from antlr4.atn.ATNState import * +from antlr4.atn.Transition import * +from antlr4.atn.LexerAction import * +from antlr4.atn.ATNDeserializationOptions import ATNDeserializationOptions + +# This is the earliest supported serialized UUID. +BASE_SERIALIZED_UUID = UUID("AADB8D7E-AEEF-4415-AD2B-8204D6CF042E") + +# This UUID indicates the serialized ATN contains two sets of +# IntervalSets, where the second set's values are encoded as +# 32-bit integers to support the full Unicode SMP range up to U+10FFFF. +ADDED_UNICODE_SMP = UUID("59627784-3BE5-417A-B9EB-8131A7286089") + +# This list contains all of the currently supported UUIDs, ordered by when +# the feature first appeared in this branch. +SUPPORTED_UUIDS = [ BASE_SERIALIZED_UUID, ADDED_UNICODE_SMP ] + +SERIALIZED_VERSION = 3 + +# This is the current serialized UUID. +SERIALIZED_UUID = ADDED_UNICODE_SMP + +class ATNDeserializer (object): + __slots__ = ('deserializationOptions', 'data', 'pos', 'uuid') + + def __init__(self, options : ATNDeserializationOptions = None): + if options is None: + options = ATNDeserializationOptions.defaultOptions + self.deserializationOptions = options + + # Determines if a particular serialized representation of an ATN supports + # a particular feature, identified by the {@link UUID} used for serializing + # the ATN at the time the feature was first introduced. + # + # @param feature The {@link UUID} marking the first time the feature was + # supported in the serialized ATN. + # @param actualUuid The {@link UUID} of the actual serialized ATN which is + # currently being deserialized. + # @return {@code true} if the {@code actualUuid} value represents a + # serialized ATN at or after the feature identified by {@code feature} was + # introduced; otherwise, {@code false}. + + def isFeatureSupported(self, feature : UUID , actualUuid : UUID ): + idx1 = SUPPORTED_UUIDS.index(feature) + if idx1<0: + return False + idx2 = SUPPORTED_UUIDS.index(actualUuid) + return idx2 >= idx1 + + def deserialize(self, data : str): + self.reset(data) + self.checkVersion() + self.checkUUID() + atn = self.readATN() + self.readStates(atn) + self.readRules(atn) + self.readModes(atn) + sets = [] + # First, read all sets with 16-bit Unicode code points <= U+FFFF. + self.readSets(atn, sets, self.readInt) + # Next, if the ATN was serialized with the Unicode SMP feature, + # deserialize sets with 32-bit arguments <= U+10FFFF. + if self.isFeatureSupported(ADDED_UNICODE_SMP, self.uuid): + self.readSets(atn, sets, self.readInt32) + self.readEdges(atn, sets) + self.readDecisions(atn) + self.readLexerActions(atn) + self.markPrecedenceDecisions(atn) + self.verifyATN(atn) + if self.deserializationOptions.generateRuleBypassTransitions \ + and atn.grammarType == ATNType.PARSER: + self.generateRuleBypassTransitions(atn) + # re-verify after modification + self.verifyATN(atn) + return atn + + def reset(self, data:str): + def adjust(c): + v = ord(c) + return v-2 if v>1 else v + 65533 + temp = [ adjust(c) for c in data ] + # don't adjust the first value since that's the version number + temp[0] = ord(data[0]) + self.data = temp + self.pos = 0 + + def checkVersion(self): + version = self.readInt() + if version != SERIALIZED_VERSION: + raise Exception("Could not deserialize ATN with version " + str(version) + " (expected " + str(SERIALIZED_VERSION) + ").") + + def checkUUID(self): + uuid = self.readUUID() + if not uuid in SUPPORTED_UUIDS: + raise Exception("Could not deserialize ATN with UUID: " + str(uuid) + \ + " (expected " + str(SERIALIZED_UUID) + " or a legacy UUID).", uuid, SERIALIZED_UUID) + self.uuid = uuid + + def readATN(self): + idx = self.readInt() + grammarType = ATNType.fromOrdinal(idx) + maxTokenType = self.readInt() + return ATN(grammarType, maxTokenType) + + def readStates(self, atn:ATN): + loopBackStateNumbers = [] + endStateNumbers = [] + nstates = self.readInt() + for i in range(0, nstates): + stype = self.readInt() + # ignore bad type of states + if stype==ATNState.INVALID_TYPE: + atn.addState(None) + continue + ruleIndex = self.readInt() + if ruleIndex == 0xFFFF: + ruleIndex = -1 + + s = self.stateFactory(stype, ruleIndex) + if stype == ATNState.LOOP_END: # special case + loopBackStateNumber = self.readInt() + loopBackStateNumbers.append((s, loopBackStateNumber)) + elif isinstance(s, BlockStartState): + endStateNumber = self.readInt() + endStateNumbers.append((s, endStateNumber)) + + atn.addState(s) + + # delay the assignment of loop back and end states until we know all the state instances have been initialized + for pair in loopBackStateNumbers: + pair[0].loopBackState = atn.states[pair[1]] + + for pair in endStateNumbers: + pair[0].endState = atn.states[pair[1]] + + numNonGreedyStates = self.readInt() + for i in range(0, numNonGreedyStates): + stateNumber = self.readInt() + atn.states[stateNumber].nonGreedy = True + + numPrecedenceStates = self.readInt() + for i in range(0, numPrecedenceStates): + stateNumber = self.readInt() + atn.states[stateNumber].isPrecedenceRule = True + + def readRules(self, atn:ATN): + nrules = self.readInt() + if atn.grammarType == ATNType.LEXER: + atn.ruleToTokenType = [0] * nrules + + atn.ruleToStartState = [0] * nrules + for i in range(0, nrules): + s = self.readInt() + startState = atn.states[s] + atn.ruleToStartState[i] = startState + if atn.grammarType == ATNType.LEXER: + tokenType = self.readInt() + if tokenType == 0xFFFF: + tokenType = Token.EOF + + atn.ruleToTokenType[i] = tokenType + + atn.ruleToStopState = [0] * nrules + for state in atn.states: + if not isinstance(state, RuleStopState): + continue + atn.ruleToStopState[state.ruleIndex] = state + atn.ruleToStartState[state.ruleIndex].stopState = state + + def readModes(self, atn:ATN): + nmodes = self.readInt() + for i in range(0, nmodes): + s = self.readInt() + atn.modeToStartState.append(atn.states[s]) + + def readSets(self, atn:ATN, sets:list, readUnicode:Callable[[], int]): + m = self.readInt() + for i in range(0, m): + iset = IntervalSet() + sets.append(iset) + n = self.readInt() + containsEof = self.readInt() + if containsEof!=0: + iset.addOne(-1) + for j in range(0, n): + i1 = readUnicode() + i2 = readUnicode() + iset.addRange(range(i1, i2 + 1)) # range upper limit is exclusive + + def readEdges(self, atn:ATN, sets:list): + nedges = self.readInt() + for i in range(0, nedges): + src = self.readInt() + trg = self.readInt() + ttype = self.readInt() + arg1 = self.readInt() + arg2 = self.readInt() + arg3 = self.readInt() + trans = self.edgeFactory(atn, ttype, src, trg, arg1, arg2, arg3, sets) + srcState = atn.states[src] + srcState.addTransition(trans) + + # edges for rule stop states can be derived, so they aren't serialized + for state in atn.states: + for i in range(0, len(state.transitions)): + t = state.transitions[i] + if not isinstance(t, RuleTransition): + continue + outermostPrecedenceReturn = -1 + if atn.ruleToStartState[t.target.ruleIndex].isPrecedenceRule: + if t.precedence == 0: + outermostPrecedenceReturn = t.target.ruleIndex + trans = EpsilonTransition(t.followState, outermostPrecedenceReturn) + atn.ruleToStopState[t.target.ruleIndex].addTransition(trans) + + for state in atn.states: + if isinstance(state, BlockStartState): + # we need to know the end state to set its start state + if state.endState is None: + raise Exception("IllegalState") + # block end states can only be associated to a single block start state + if state.endState.startState is not None: + raise Exception("IllegalState") + state.endState.startState = state + + if isinstance(state, PlusLoopbackState): + for i in range(0, len(state.transitions)): + target = state.transitions[i].target + if isinstance(target, PlusBlockStartState): + target.loopBackState = state + elif isinstance(state, StarLoopbackState): + for i in range(0, len(state.transitions)): + target = state.transitions[i].target + if isinstance(target, StarLoopEntryState): + target.loopBackState = state + + def readDecisions(self, atn:ATN): + ndecisions = self.readInt() + for i in range(0, ndecisions): + s = self.readInt() + decState = atn.states[s] + atn.decisionToState.append(decState) + decState.decision = i + + def readLexerActions(self, atn:ATN): + if atn.grammarType == ATNType.LEXER: + count = self.readInt() + atn.lexerActions = [ None ] * count + for i in range(0, count): + actionType = self.readInt() + data1 = self.readInt() + if data1 == 0xFFFF: + data1 = -1 + data2 = self.readInt() + if data2 == 0xFFFF: + data2 = -1 + lexerAction = self.lexerActionFactory(actionType, data1, data2) + atn.lexerActions[i] = lexerAction + + def generateRuleBypassTransitions(self, atn:ATN): + + count = len(atn.ruleToStartState) + atn.ruleToTokenType = [ 0 ] * count + for i in range(0, count): + atn.ruleToTokenType[i] = atn.maxTokenType + i + 1 + + for i in range(0, count): + self.generateRuleBypassTransition(atn, i) + + def generateRuleBypassTransition(self, atn:ATN, idx:int): + + bypassStart = BasicBlockStartState() + bypassStart.ruleIndex = idx + atn.addState(bypassStart) + + bypassStop = BlockEndState() + bypassStop.ruleIndex = idx + atn.addState(bypassStop) + + bypassStart.endState = bypassStop + atn.defineDecisionState(bypassStart) + + bypassStop.startState = bypassStart + + excludeTransition = None + + if atn.ruleToStartState[idx].isPrecedenceRule: + # wrap from the beginning of the rule to the StarLoopEntryState + endState = None + for state in atn.states: + if self.stateIsEndStateFor(state, idx): + endState = state + excludeTransition = state.loopBackState.transitions[0] + break + + if excludeTransition is None: + raise Exception("Couldn't identify final state of the precedence rule prefix section.") + + else: + + endState = atn.ruleToStopState[idx] + + # all non-excluded transitions that currently target end state need to target blockEnd instead + for state in atn.states: + for transition in state.transitions: + if transition == excludeTransition: + continue + if transition.target == endState: + transition.target = bypassStop + + # all transitions leaving the rule start state need to leave blockStart instead + ruleToStartState = atn.ruleToStartState[idx] + count = len(ruleToStartState.transitions) + while count > 0: + bypassStart.addTransition(ruleToStartState.transitions[count-1]) + del ruleToStartState.transitions[-1] + + # link the new states + atn.ruleToStartState[idx].addTransition(EpsilonTransition(bypassStart)) + bypassStop.addTransition(EpsilonTransition(endState)) + + matchState = BasicState() + atn.addState(matchState) + matchState.addTransition(AtomTransition(bypassStop, atn.ruleToTokenType[idx])) + bypassStart.addTransition(EpsilonTransition(matchState)) + + + def stateIsEndStateFor(self, state:ATNState, idx:int): + if state.ruleIndex != idx: + return None + if not isinstance(state, StarLoopEntryState): + return None + + maybeLoopEndState = state.transitions[len(state.transitions) - 1].target + if not isinstance(maybeLoopEndState, LoopEndState): + return None + + if maybeLoopEndState.epsilonOnlyTransitions and \ + isinstance(maybeLoopEndState.transitions[0].target, RuleStopState): + return state + else: + return None + + + # + # Analyze the {@link StarLoopEntryState} states in the specified ATN to set + # the {@link StarLoopEntryState#isPrecedenceDecision} field to the + # correct value. + # + # @param atn The ATN. + # + def markPrecedenceDecisions(self, atn:ATN): + for state in atn.states: + if not isinstance(state, StarLoopEntryState): + continue + + # We analyze the ATN to determine if this ATN decision state is the + # decision for the closure block that determines whether a + # precedence rule should continue or complete. + # + if atn.ruleToStartState[state.ruleIndex].isPrecedenceRule: + maybeLoopEndState = state.transitions[len(state.transitions) - 1].target + if isinstance(maybeLoopEndState, LoopEndState): + if maybeLoopEndState.epsilonOnlyTransitions and \ + isinstance(maybeLoopEndState.transitions[0].target, RuleStopState): + state.isPrecedenceDecision = True + + def verifyATN(self, atn:ATN): + if not self.deserializationOptions.verifyATN: + return + # verify assumptions + for state in atn.states: + if state is None: + continue + + self.checkCondition(state.epsilonOnlyTransitions or len(state.transitions) <= 1) + + if isinstance(state, PlusBlockStartState): + self.checkCondition(state.loopBackState is not None) + + if isinstance(state, StarLoopEntryState): + self.checkCondition(state.loopBackState is not None) + self.checkCondition(len(state.transitions) == 2) + + if isinstance(state.transitions[0].target, StarBlockStartState): + self.checkCondition(isinstance(state.transitions[1].target, LoopEndState)) + self.checkCondition(not state.nonGreedy) + elif isinstance(state.transitions[0].target, LoopEndState): + self.checkCondition(isinstance(state.transitions[1].target, StarBlockStartState)) + self.checkCondition(state.nonGreedy) + else: + raise Exception("IllegalState") + + if isinstance(state, StarLoopbackState): + self.checkCondition(len(state.transitions) == 1) + self.checkCondition(isinstance(state.transitions[0].target, StarLoopEntryState)) + + if isinstance(state, LoopEndState): + self.checkCondition(state.loopBackState is not None) + + if isinstance(state, RuleStartState): + self.checkCondition(state.stopState is not None) + + if isinstance(state, BlockStartState): + self.checkCondition(state.endState is not None) + + if isinstance(state, BlockEndState): + self.checkCondition(state.startState is not None) + + if isinstance(state, DecisionState): + self.checkCondition(len(state.transitions) <= 1 or state.decision >= 0) + else: + self.checkCondition(len(state.transitions) <= 1 or isinstance(state, RuleStopState)) + + def checkCondition(self, condition:bool, message=None): + if not condition: + if message is None: + message = "IllegalState" + raise Exception(message) + + def readInt(self): + i = self.data[self.pos] + self.pos += 1 + return i + + def readInt32(self): + low = self.readInt() + high = self.readInt() + return low | (high << 16) + + def readLong(self): + low = self.readInt32() + high = self.readInt32() + return (low & 0x00000000FFFFFFFF) | (high << 32) + + def readUUID(self): + low = self.readLong() + high = self.readLong() + allBits = (low & 0xFFFFFFFFFFFFFFFF) | (high << 64) + return UUID(int=allBits) + + edgeFactories = [ lambda args : None, + lambda atn, src, trg, arg1, arg2, arg3, sets, target : EpsilonTransition(target), + lambda atn, src, trg, arg1, arg2, arg3, sets, target : \ + RangeTransition(target, Token.EOF, arg2) if arg3 != 0 else RangeTransition(target, arg1, arg2), + lambda atn, src, trg, arg1, arg2, arg3, sets, target : \ + RuleTransition(atn.states[arg1], arg2, arg3, target), + lambda atn, src, trg, arg1, arg2, arg3, sets, target : \ + PredicateTransition(target, arg1, arg2, arg3 != 0), + lambda atn, src, trg, arg1, arg2, arg3, sets, target : \ + AtomTransition(target, Token.EOF) if arg3 != 0 else AtomTransition(target, arg1), + lambda atn, src, trg, arg1, arg2, arg3, sets, target : \ + ActionTransition(target, arg1, arg2, arg3 != 0), + lambda atn, src, trg, arg1, arg2, arg3, sets, target : \ + SetTransition(target, sets[arg1]), + lambda atn, src, trg, arg1, arg2, arg3, sets, target : \ + NotSetTransition(target, sets[arg1]), + lambda atn, src, trg, arg1, arg2, arg3, sets, target : \ + WildcardTransition(target), + lambda atn, src, trg, arg1, arg2, arg3, sets, target : \ + PrecedencePredicateTransition(target, arg1) + ] + + def edgeFactory(self, atn:ATN, type:int, src:int, trg:int, arg1:int, arg2:int, arg3:int, sets:list): + target = atn.states[trg] + if type > len(self.edgeFactories) or self.edgeFactories[type] is None: + raise Exception("The specified transition type: " + str(type) + " is not valid.") + else: + return self.edgeFactories[type](atn, src, trg, arg1, arg2, arg3, sets, target) + + stateFactories = [ lambda : None, + lambda : BasicState(), + lambda : RuleStartState(), + lambda : BasicBlockStartState(), + lambda : PlusBlockStartState(), + lambda : StarBlockStartState(), + lambda : TokensStartState(), + lambda : RuleStopState(), + lambda : BlockEndState(), + lambda : StarLoopbackState(), + lambda : StarLoopEntryState(), + lambda : PlusLoopbackState(), + lambda : LoopEndState() + ] + + def stateFactory(self, type:int, ruleIndex:int): + if type> len(self.stateFactories) or self.stateFactories[type] is None: + raise Exception("The specified state type " + str(type) + " is not valid.") + else: + s = self.stateFactories[type]() + if s is not None: + s.ruleIndex = ruleIndex + return s + + CHANNEL = 0 #The type of a {@link LexerChannelAction} action. + CUSTOM = 1 #The type of a {@link LexerCustomAction} action. + MODE = 2 #The type of a {@link LexerModeAction} action. + MORE = 3 #The type of a {@link LexerMoreAction} action. + POP_MODE = 4 #The type of a {@link LexerPopModeAction} action. + PUSH_MODE = 5 #The type of a {@link LexerPushModeAction} action. + SKIP = 6 #The type of a {@link LexerSkipAction} action. + TYPE = 7 #The type of a {@link LexerTypeAction} action. + + actionFactories = [ lambda data1, data2: LexerChannelAction(data1), + lambda data1, data2: LexerCustomAction(data1, data2), + lambda data1, data2: LexerModeAction(data1), + lambda data1, data2: LexerMoreAction.INSTANCE, + lambda data1, data2: LexerPopModeAction.INSTANCE, + lambda data1, data2: LexerPushModeAction(data1), + lambda data1, data2: LexerSkipAction.INSTANCE, + lambda data1, data2: LexerTypeAction(data1) + ] + + def lexerActionFactory(self, type:int, data1:int, data2:int): + + if type > len(self.actionFactories) or self.actionFactories[type] is None: + raise Exception("The specified lexer action type " + str(type) + " is not valid.") + else: + return self.actionFactories[type](data1, data2) diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/ATNSimulator.py b/.venv/lib/python3.13/site-packages/antlr4/atn/ATNSimulator.py new file mode 100644 index 0000000000000000000000000000000000000000..4f6f53f488fa2b731fb39ceecf350b0cb43d1c39 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/atn/ATNSimulator.py @@ -0,0 +1,47 @@ +# +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +#/ +from antlr4.PredictionContext import PredictionContextCache, PredictionContext, getCachedPredictionContext +from antlr4.atn.ATN import ATN +from antlr4.atn.ATNConfigSet import ATNConfigSet +from antlr4.dfa.DFAState import DFAState + + +class ATNSimulator(object): + __slots__ = ('atn', 'sharedContextCache', '__dict__') + + # Must distinguish between missing edge and edge we know leads nowhere#/ + ERROR = DFAState(configs=ATNConfigSet()) + ERROR.stateNumber = 0x7FFFFFFF + + # The context cache maps all PredictionContext objects that are == + # to a single cached copy. This cache is shared across all contexts + # in all ATNConfigs in all DFA states. We rebuild each ATNConfigSet + # to use only cached nodes/graphs in addDFAState(). We don't want to + # fill this during closure() since there are lots of contexts that + # pop up but are not used ever again. It also greatly slows down closure(). + # + #

This cache makes a huge difference in memory and a little bit in speed. + # For the Java grammar on java.*, it dropped the memory requirements + # at the end from 25M to 16M. We don't store any of the full context + # graphs in the DFA because they are limited to local context only, + # but apparently there's a lot of repetition there as well. We optimize + # the config contexts before storing the config set in the DFA states + # by literally rebuilding them with cached subgraphs only.

+ # + #

I tried a cache for use during closure operations, that was + # whacked after each adaptivePredict(). It cost a little bit + # more time I think and doesn't save on the overall footprint + # so it's not worth the complexity.

+ #/ + def __init__(self, atn:ATN, sharedContextCache:PredictionContextCache): + self.atn = atn + self.sharedContextCache = sharedContextCache + + def getCachedContext(self, context:PredictionContext): + if self.sharedContextCache is None: + return context + visited = dict() + return getCachedPredictionContext(context, self.sharedContextCache, visited) diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/ATNState.py b/.venv/lib/python3.13/site-packages/antlr4/atn/ATNState.py new file mode 100644 index 0000000000000000000000000000000000000000..fbf6a7b9442905c992bb1a88ce343a8a9d63f5b7 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/atn/ATNState.py @@ -0,0 +1,264 @@ +# +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +# + +# The following images show the relation of states and +# {@link ATNState#transitions} for various grammar constructs. +# +# +# +#

Basic Blocks

+# +#

Rule

+# +# +# +#

Block of 1 or more alternatives

+# +# +# +#

Greedy Loops

+# +#

Greedy Closure: {@code (...)*}

+# +# +# +#

Greedy Positive Closure: {@code (...)+}

+# +# +# +#

Greedy Optional: {@code (...)?}

+# +# +# +#

Non-Greedy Loops

+# +#

Non-Greedy Closure: {@code (...)*?}

+# +# +# +#

Non-Greedy Positive Closure: {@code (...)+?}

+# +# +# +#

Non-Greedy Optional: {@code (...)??}

+# +# +# + +from antlr4.atn.Transition import Transition + +INITIAL_NUM_TRANSITIONS = 4 + +class ATNState(object): + __slots__ = ( + 'atn', 'stateNumber', 'stateType', 'ruleIndex', 'epsilonOnlyTransitions', + 'transitions', 'nextTokenWithinRule', + ) + + # constants for serialization + INVALID_TYPE = 0 + BASIC = 1 + RULE_START = 2 + BLOCK_START = 3 + PLUS_BLOCK_START = 4 + STAR_BLOCK_START = 5 + TOKEN_START = 6 + RULE_STOP = 7 + BLOCK_END = 8 + STAR_LOOP_BACK = 9 + STAR_LOOP_ENTRY = 10 + PLUS_LOOP_BACK = 11 + LOOP_END = 12 + + serializationNames = [ + "INVALID", + "BASIC", + "RULE_START", + "BLOCK_START", + "PLUS_BLOCK_START", + "STAR_BLOCK_START", + "TOKEN_START", + "RULE_STOP", + "BLOCK_END", + "STAR_LOOP_BACK", + "STAR_LOOP_ENTRY", + "PLUS_LOOP_BACK", + "LOOP_END" ] + + INVALID_STATE_NUMBER = -1 + + def __init__(self): + # Which ATN are we in? + self.atn = None + self.stateNumber = ATNState.INVALID_STATE_NUMBER + self.stateType = None + self.ruleIndex = 0 # at runtime, we don't have Rule objects + self.epsilonOnlyTransitions = False + # Track the transitions emanating from this ATN state. + self.transitions = [] + # Used to cache lookahead during parsing, not used during construction + self.nextTokenWithinRule = None + + def __hash__(self): + return self.stateNumber + + def __eq__(self, other): + return isinstance(other, ATNState) and self.stateNumber==other.stateNumber + + def onlyHasEpsilonTransitions(self): + return self.epsilonOnlyTransitions + + def isNonGreedyExitState(self): + return False + + def __str__(self): + return str(self.stateNumber) + + def addTransition(self, trans:Transition, index:int=-1): + if len(self.transitions)==0: + self.epsilonOnlyTransitions = trans.isEpsilon + elif self.epsilonOnlyTransitions != trans.isEpsilon: + self.epsilonOnlyTransitions = False + # TODO System.err.format(Locale.getDefault(), "ATN state %d has both epsilon and non-epsilon transitions.\n", stateNumber); + if index==-1: + self.transitions.append(trans) + else: + self.transitions.insert(index, trans) + +class BasicState(ATNState): + + def __init__(self): + super().__init__() + self.stateType = self.BASIC + + +class DecisionState(ATNState): + __slots__ = ('decision', 'nonGreedy') + def __init__(self): + super().__init__() + self.decision = -1 + self.nonGreedy = False + +# The start of a regular {@code (...)} block. +class BlockStartState(DecisionState): + __slots__ = 'endState' + + def __init__(self): + super().__init__() + self.endState = None + +class BasicBlockStartState(BlockStartState): + + def __init__(self): + super().__init__() + self.stateType = self.BLOCK_START + +# Terminal node of a simple {@code (a|b|c)} block. +class BlockEndState(ATNState): + __slots__ = 'startState' + + def __init__(self): + super().__init__() + self.stateType = self.BLOCK_END + self.startState = None + +# The last node in the ATN for a rule, unless that rule is the start symbol. +# In that case, there is one transition to EOF. Later, we might encode +# references to all calls to this rule to compute FOLLOW sets for +# error handling. +# +class RuleStopState(ATNState): + + def __init__(self): + super().__init__() + self.stateType = self.RULE_STOP + +class RuleStartState(ATNState): + __slots__ = ('stopState', 'isPrecedenceRule') + + def __init__(self): + super().__init__() + self.stateType = self.RULE_START + self.stopState = None + self.isPrecedenceRule = False + +# Decision state for {@code A+} and {@code (A|B)+}. It has two transitions: +# one to the loop back to start of the block and one to exit. +# +class PlusLoopbackState(DecisionState): + + def __init__(self): + super().__init__() + self.stateType = self.PLUS_LOOP_BACK + +# Start of {@code (A|B|...)+} loop. Technically a decision state, but +# we don't use for code generation; somebody might need it, so I'm defining +# it for completeness. In reality, the {@link PlusLoopbackState} node is the +# real decision-making note for {@code A+}. +# +class PlusBlockStartState(BlockStartState): + __slots__ = 'loopBackState' + + def __init__(self): + super().__init__() + self.stateType = self.PLUS_BLOCK_START + self.loopBackState = None + +# The block that begins a closure loop. +class StarBlockStartState(BlockStartState): + + def __init__(self): + super().__init__() + self.stateType = self.STAR_BLOCK_START + +class StarLoopbackState(ATNState): + + def __init__(self): + super().__init__() + self.stateType = self.STAR_LOOP_BACK + + +class StarLoopEntryState(DecisionState): + __slots__ = ('loopBackState', 'isPrecedenceDecision') + + def __init__(self): + super().__init__() + self.stateType = self.STAR_LOOP_ENTRY + self.loopBackState = None + # Indicates whether this state can benefit from a precedence DFA during SLL decision making. + self.isPrecedenceDecision = None + +# Mark the end of a * or + loop. +class LoopEndState(ATNState): + __slots__ = 'loopBackState' + + def __init__(self): + super().__init__() + self.stateType = self.LOOP_END + self.loopBackState = None + +# The Tokens rule start state linking to each lexer rule start state */ +class TokensStartState(DecisionState): + + def __init__(self): + super().__init__() + self.stateType = self.TOKEN_START diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/ATNType.py b/.venv/lib/python3.13/site-packages/antlr4/atn/ATNType.py new file mode 100644 index 0000000000000000000000000000000000000000..cc0d4d925c6babee1caeee08f5e32fe4a1d6d0d4 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/atn/ATNType.py @@ -0,0 +1,17 @@ +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +#/ + +from enum import IntEnum + +# Represents the type of recognizer an ATN applies to. + +class ATNType(IntEnum): + + LEXER = 0 + PARSER = 1 + + @classmethod + def fromOrdinal(cls, i:int): + return cls._value2member_map_[i] diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/LexerATNSimulator.py b/.venv/lib/python3.13/site-packages/antlr4/atn/LexerATNSimulator.py new file mode 100644 index 0000000000000000000000000000000000000000..71201ff5f989820d340aac8672ab31db8579b55c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/atn/LexerATNSimulator.py @@ -0,0 +1,570 @@ +# +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +#/ + +# When we hit an accept state in either the DFA or the ATN, we +# have to notify the character stream to start buffering characters +# via {@link IntStream#mark} and record the current state. The current sim state +# includes the current index into the input, the current line, +# and current character position in that line. Note that the Lexer is +# tracking the starting line and characterization of the token. These +# variables track the "state" of the simulator when it hits an accept state. +# +#

We track these variables separately for the DFA and ATN simulation +# because the DFA simulation often has to fail over to the ATN +# simulation. If the ATN simulation fails, we need the DFA to fall +# back to its previously accepted state, if any. If the ATN succeeds, +# then the ATN does the accept and the DFA simulator that invoked it +# can simply return the predicted token type.

+#/ + +from antlr4.PredictionContext import PredictionContextCache, SingletonPredictionContext, PredictionContext +from antlr4.InputStream import InputStream +from antlr4.Token import Token +from antlr4.atn.ATN import ATN +from antlr4.atn.ATNConfig import LexerATNConfig +from antlr4.atn.ATNSimulator import ATNSimulator +from antlr4.atn.ATNConfigSet import ATNConfigSet, OrderedATNConfigSet +from antlr4.atn.ATNState import RuleStopState, ATNState +from antlr4.atn.LexerActionExecutor import LexerActionExecutor +from antlr4.atn.Transition import Transition +from antlr4.dfa.DFAState import DFAState +from antlr4.error.Errors import LexerNoViableAltException, UnsupportedOperationException + +class SimState(object): + __slots__ = ('index', 'line', 'column', 'dfaState') + + def __init__(self): + self.reset() + + def reset(self): + self.index = -1 + self.line = 0 + self.column = -1 + self.dfaState = None + +# need forward declaration +Lexer = None +LexerATNSimulator = None + +class LexerATNSimulator(ATNSimulator): + __slots__ = ( + 'decisionToDFA', 'recog', 'startIndex', 'line', 'column', 'mode', + 'DEFAULT_MODE', 'MAX_CHAR_VALUE', 'prevAccept' + ) + + debug = False + dfa_debug = False + + MIN_DFA_EDGE = 0 + MAX_DFA_EDGE = 127 # forces unicode to stay in ATN + + ERROR = None + + def __init__(self, recog:Lexer, atn:ATN, decisionToDFA:list, sharedContextCache:PredictionContextCache): + super().__init__(atn, sharedContextCache) + self.decisionToDFA = decisionToDFA + self.recog = recog + # The current token's starting index into the character stream. + # Shared across DFA to ATN simulation in case the ATN fails and the + # DFA did not have a previous accept state. In this case, we use the + # ATN-generated exception object. + self.startIndex = -1 + # line number 1..n within the input#/ + self.line = 1 + # The index of the character relative to the beginning of the line 0..n-1#/ + self.column = 0 + from antlr4.Lexer import Lexer + self.mode = Lexer.DEFAULT_MODE + # Cache Lexer properties to avoid further imports + self.DEFAULT_MODE = Lexer.DEFAULT_MODE + self.MAX_CHAR_VALUE = Lexer.MAX_CHAR_VALUE + # Used during DFA/ATN exec to record the most recent accept configuration info + self.prevAccept = SimState() + + + def copyState(self, simulator:LexerATNSimulator ): + self.column = simulator.column + self.line = simulator.line + self.mode = simulator.mode + self.startIndex = simulator.startIndex + + def match(self, input:InputStream , mode:int): + self.mode = mode + mark = input.mark() + try: + self.startIndex = input.index + self.prevAccept.reset() + dfa = self.decisionToDFA[mode] + if dfa.s0 is None: + return self.matchATN(input) + else: + return self.execATN(input, dfa.s0) + finally: + input.release(mark) + + def reset(self): + self.prevAccept.reset() + self.startIndex = -1 + self.line = 1 + self.column = 0 + self.mode = self.DEFAULT_MODE + + def matchATN(self, input:InputStream): + startState = self.atn.modeToStartState[self.mode] + + if LexerATNSimulator.debug: + print("matchATN mode " + str(self.mode) + " start: " + str(startState)) + + old_mode = self.mode + s0_closure = self.computeStartState(input, startState) + suppressEdge = s0_closure.hasSemanticContext + s0_closure.hasSemanticContext = False + + next = self.addDFAState(s0_closure) + if not suppressEdge: + self.decisionToDFA[self.mode].s0 = next + + predict = self.execATN(input, next) + + if LexerATNSimulator.debug: + print("DFA after matchATN: " + str(self.decisionToDFA[old_mode].toLexerString())) + + return predict + + def execATN(self, input:InputStream, ds0:DFAState): + if LexerATNSimulator.debug: + print("start state closure=" + str(ds0.configs)) + + if ds0.isAcceptState: + # allow zero-length tokens + self.captureSimState(self.prevAccept, input, ds0) + + t = input.LA(1) + s = ds0 # s is current/from DFA state + + while True: # while more work + if LexerATNSimulator.debug: + print("execATN loop starting closure:", str(s.configs)) + + # As we move src->trg, src->trg, we keep track of the previous trg to + # avoid looking up the DFA state again, which is expensive. + # If the previous target was already part of the DFA, we might + # be able to avoid doing a reach operation upon t. If s!=null, + # it means that semantic predicates didn't prevent us from + # creating a DFA state. Once we know s!=null, we check to see if + # the DFA state has an edge already for t. If so, we can just reuse + # it's configuration set; there's no point in re-computing it. + # This is kind of like doing DFA simulation within the ATN + # simulation because DFA simulation is really just a way to avoid + # computing reach/closure sets. Technically, once we know that + # we have a previously added DFA state, we could jump over to + # the DFA simulator. But, that would mean popping back and forth + # a lot and making things more complicated algorithmically. + # This optimization makes a lot of sense for loops within DFA. + # A character will take us back to an existing DFA state + # that already has lots of edges out of it. e.g., .* in comments. + # print("Target for:" + str(s) + " and:" + str(t)) + target = self.getExistingTargetState(s, t) + # print("Existing:" + str(target)) + if target is None: + target = self.computeTargetState(input, s, t) + # print("Computed:" + str(target)) + + if target == self.ERROR: + break + + # If this is a consumable input element, make sure to consume before + # capturing the accept state so the input index, line, and char + # position accurately reflect the state of the interpreter at the + # end of the token. + if t != Token.EOF: + self.consume(input) + + if target.isAcceptState: + self.captureSimState(self.prevAccept, input, target) + if t == Token.EOF: + break + + t = input.LA(1) + + s = target # flip; current DFA target becomes new src/from state + + return self.failOrAccept(self.prevAccept, input, s.configs, t) + + # Get an existing target state for an edge in the DFA. If the target state + # for the edge has not yet been computed or is otherwise not available, + # this method returns {@code null}. + # + # @param s The current DFA state + # @param t The next input symbol + # @return The existing target DFA state for the given input symbol + # {@code t}, or {@code null} if the target state for this edge is not + # already cached + def getExistingTargetState(self, s:DFAState, t:int): + if s.edges is None or t < self.MIN_DFA_EDGE or t > self.MAX_DFA_EDGE: + return None + + target = s.edges[t - self.MIN_DFA_EDGE] + if LexerATNSimulator.debug and target is not None: + print("reuse state", str(s.stateNumber), "edge to", str(target.stateNumber)) + + return target + + # Compute a target state for an edge in the DFA, and attempt to add the + # computed state and corresponding edge to the DFA. + # + # @param input The input stream + # @param s The current DFA state + # @param t The next input symbol + # + # @return The computed target DFA state for the given input symbol + # {@code t}. If {@code t} does not lead to a valid DFA state, this method + # returns {@link #ERROR}. + def computeTargetState(self, input:InputStream, s:DFAState, t:int): + reach = OrderedATNConfigSet() + + # if we don't find an existing DFA state + # Fill reach starting from closure, following t transitions + self.getReachableConfigSet(input, s.configs, reach, t) + + if len(reach)==0: # we got nowhere on t from s + if not reach.hasSemanticContext: + # we got nowhere on t, don't throw out this knowledge; it'd + # cause a failover from DFA later. + self. addDFAEdge(s, t, self.ERROR) + + # stop when we can't match any more char + return self.ERROR + + # Add an edge from s to target DFA found/created for reach + return self.addDFAEdge(s, t, cfgs=reach) + + def failOrAccept(self, prevAccept:SimState , input:InputStream, reach:ATNConfigSet, t:int): + if self.prevAccept.dfaState is not None: + lexerActionExecutor = prevAccept.dfaState.lexerActionExecutor + self.accept(input, lexerActionExecutor, self.startIndex, prevAccept.index, prevAccept.line, prevAccept.column) + return prevAccept.dfaState.prediction + else: + # if no accept and EOF is first char, return EOF + if t==Token.EOF and input.index==self.startIndex: + return Token.EOF + raise LexerNoViableAltException(self.recog, input, self.startIndex, reach) + + # Given a starting configuration set, figure out all ATN configurations + # we can reach upon input {@code t}. Parameter {@code reach} is a return + # parameter. + def getReachableConfigSet(self, input:InputStream, closure:ATNConfigSet, reach:ATNConfigSet, t:int): + # this is used to skip processing for configs which have a lower priority + # than a config that already reached an accept state for the same rule + skipAlt = ATN.INVALID_ALT_NUMBER + for cfg in closure: + currentAltReachedAcceptState = ( cfg.alt == skipAlt ) + if currentAltReachedAcceptState and cfg.passedThroughNonGreedyDecision: + continue + + if LexerATNSimulator.debug: + print("testing", self.getTokenName(t), "at", str(cfg)) + + for trans in cfg.state.transitions: # for each transition + target = self.getReachableTarget(trans, t) + if target is not None: + lexerActionExecutor = cfg.lexerActionExecutor + if lexerActionExecutor is not None: + lexerActionExecutor = lexerActionExecutor.fixOffsetBeforeMatch(input.index - self.startIndex) + + treatEofAsEpsilon = (t == Token.EOF) + config = LexerATNConfig(state=target, lexerActionExecutor=lexerActionExecutor, config=cfg) + if self.closure(input, config, reach, currentAltReachedAcceptState, True, treatEofAsEpsilon): + # any remaining configs for this alt have a lower priority than + # the one that just reached an accept state. + skipAlt = cfg.alt + + def accept(self, input:InputStream, lexerActionExecutor:LexerActionExecutor, startIndex:int, index:int, line:int, charPos:int): + if LexerATNSimulator.debug: + print("ACTION", lexerActionExecutor) + + # seek to after last char in token + input.seek(index) + self.line = line + self.column = charPos + + if lexerActionExecutor is not None and self.recog is not None: + lexerActionExecutor.execute(self.recog, input, startIndex) + + def getReachableTarget(self, trans:Transition, t:int): + if trans.matches(t, 0, self.MAX_CHAR_VALUE): + return trans.target + else: + return None + + def computeStartState(self, input:InputStream, p:ATNState): + initialContext = PredictionContext.EMPTY + configs = OrderedATNConfigSet() + for i in range(0,len(p.transitions)): + target = p.transitions[i].target + c = LexerATNConfig(state=target, alt=i+1, context=initialContext) + self.closure(input, c, configs, False, False, False) + return configs + + # Since the alternatives within any lexer decision are ordered by + # preference, this method stops pursuing the closure as soon as an accept + # state is reached. After the first accept state is reached by depth-first + # search from {@code config}, all other (potentially reachable) states for + # this rule would have a lower priority. + # + # @return {@code true} if an accept state is reached, otherwise + # {@code false}. + def closure(self, input:InputStream, config:LexerATNConfig, configs:ATNConfigSet, currentAltReachedAcceptState:bool, + speculative:bool, treatEofAsEpsilon:bool): + if LexerATNSimulator.debug: + print("closure(" + str(config) + ")") + + if isinstance( config.state, RuleStopState ): + if LexerATNSimulator.debug: + if self.recog is not None: + print("closure at", self.recog.symbolicNames[config.state.ruleIndex], "rule stop", str(config)) + else: + print("closure at rule stop", str(config)) + + if config.context is None or config.context.hasEmptyPath(): + if config.context is None or config.context.isEmpty(): + configs.add(config) + return True + else: + configs.add(LexerATNConfig(state=config.state, config=config, context=PredictionContext.EMPTY)) + currentAltReachedAcceptState = True + + if config.context is not None and not config.context.isEmpty(): + for i in range(0,len(config.context)): + if config.context.getReturnState(i) != PredictionContext.EMPTY_RETURN_STATE: + newContext = config.context.getParent(i) # "pop" return state + returnState = self.atn.states[config.context.getReturnState(i)] + c = LexerATNConfig(state=returnState, config=config, context=newContext) + currentAltReachedAcceptState = self.closure(input, c, configs, + currentAltReachedAcceptState, speculative, treatEofAsEpsilon) + + return currentAltReachedAcceptState + + # optimization + if not config.state.epsilonOnlyTransitions: + if not currentAltReachedAcceptState or not config.passedThroughNonGreedyDecision: + configs.add(config) + + for t in config.state.transitions: + c = self.getEpsilonTarget(input, config, t, configs, speculative, treatEofAsEpsilon) + if c is not None: + currentAltReachedAcceptState = self.closure(input, c, configs, currentAltReachedAcceptState, speculative, treatEofAsEpsilon) + + return currentAltReachedAcceptState + + # side-effect: can alter configs.hasSemanticContext + def getEpsilonTarget(self, input:InputStream, config:LexerATNConfig, t:Transition, configs:ATNConfigSet, + speculative:bool, treatEofAsEpsilon:bool): + c = None + if t.serializationType==Transition.RULE: + newContext = SingletonPredictionContext.create(config.context, t.followState.stateNumber) + c = LexerATNConfig(state=t.target, config=config, context=newContext) + + elif t.serializationType==Transition.PRECEDENCE: + raise UnsupportedOperationException("Precedence predicates are not supported in lexers.") + + elif t.serializationType==Transition.PREDICATE: + # Track traversing semantic predicates. If we traverse, + # we cannot add a DFA state for this "reach" computation + # because the DFA would not test the predicate again in the + # future. Rather than creating collections of semantic predicates + # like v3 and testing them on prediction, v4 will test them on the + # fly all the time using the ATN not the DFA. This is slower but + # semantically it's not used that often. One of the key elements to + # this predicate mechanism is not adding DFA states that see + # predicates immediately afterwards in the ATN. For example, + + # a : ID {p1}? | ID {p2}? ; + + # should create the start state for rule 'a' (to save start state + # competition), but should not create target of ID state. The + # collection of ATN states the following ID references includes + # states reached by traversing predicates. Since this is when we + # test them, we cannot cash the DFA state target of ID. + + if LexerATNSimulator.debug: + print("EVAL rule "+ str(t.ruleIndex) + ":" + str(t.predIndex)) + configs.hasSemanticContext = True + if self.evaluatePredicate(input, t.ruleIndex, t.predIndex, speculative): + c = LexerATNConfig(state=t.target, config=config) + + elif t.serializationType==Transition.ACTION: + if config.context is None or config.context.hasEmptyPath(): + # execute actions anywhere in the start rule for a token. + # + # TODO: if the entry rule is invoked recursively, some + # actions may be executed during the recursive call. The + # problem can appear when hasEmptyPath() is true but + # isEmpty() is false. In this case, the config needs to be + # split into two contexts - one with just the empty path + # and another with everything but the empty path. + # Unfortunately, the current algorithm does not allow + # getEpsilonTarget to return two configurations, so + # additional modifications are needed before we can support + # the split operation. + lexerActionExecutor = LexerActionExecutor.append(config.lexerActionExecutor, + self.atn.lexerActions[t.actionIndex]) + c = LexerATNConfig(state=t.target, config=config, lexerActionExecutor=lexerActionExecutor) + + else: + # ignore actions in referenced rules + c = LexerATNConfig(state=t.target, config=config) + + elif t.serializationType==Transition.EPSILON: + c = LexerATNConfig(state=t.target, config=config) + + elif t.serializationType in [ Transition.ATOM, Transition.RANGE, Transition.SET ]: + if treatEofAsEpsilon: + if t.matches(Token.EOF, 0, self.MAX_CHAR_VALUE): + c = LexerATNConfig(state=t.target, config=config) + + return c + + # Evaluate a predicate specified in the lexer. + # + #

If {@code speculative} is {@code true}, this method was called before + # {@link #consume} for the matched character. This method should call + # {@link #consume} before evaluating the predicate to ensure position + # sensitive values, including {@link Lexer#getText}, {@link Lexer#getLine}, + # and {@link Lexer#getcolumn}, properly reflect the current + # lexer state. This method should restore {@code input} and the simulator + # to the original state before returning (i.e. undo the actions made by the + # call to {@link #consume}.

+ # + # @param input The input stream. + # @param ruleIndex The rule containing the predicate. + # @param predIndex The index of the predicate within the rule. + # @param speculative {@code true} if the current index in {@code input} is + # one character before the predicate's location. + # + # @return {@code true} if the specified predicate evaluates to + # {@code true}. + #/ + def evaluatePredicate(self, input:InputStream, ruleIndex:int, predIndex:int, speculative:bool): + # assume true if no recognizer was provided + if self.recog is None: + return True + + if not speculative: + return self.recog.sempred(None, ruleIndex, predIndex) + + savedcolumn = self.column + savedLine = self.line + index = input.index + marker = input.mark() + try: + self.consume(input) + return self.recog.sempred(None, ruleIndex, predIndex) + finally: + self.column = savedcolumn + self.line = savedLine + input.seek(index) + input.release(marker) + + def captureSimState(self, settings:SimState, input:InputStream, dfaState:DFAState): + settings.index = input.index + settings.line = self.line + settings.column = self.column + settings.dfaState = dfaState + + def addDFAEdge(self, from_:DFAState, tk:int, to:DFAState=None, cfgs:ATNConfigSet=None) -> DFAState: + + if to is None and cfgs is not None: + # leading to this call, ATNConfigSet.hasSemanticContext is used as a + # marker indicating dynamic predicate evaluation makes this edge + # dependent on the specific input sequence, so the static edge in the + # DFA should be omitted. The target DFAState is still created since + # execATN has the ability to resynchronize with the DFA state cache + # following the predicate evaluation step. + # + # TJP notes: next time through the DFA, we see a pred again and eval. + # If that gets us to a previously created (but dangling) DFA + # state, we can continue in pure DFA mode from there. + #/ + suppressEdge = cfgs.hasSemanticContext + cfgs.hasSemanticContext = False + + to = self.addDFAState(cfgs) + + if suppressEdge: + return to + + # add the edge + if tk < self.MIN_DFA_EDGE or tk > self.MAX_DFA_EDGE: + # Only track edges within the DFA bounds + return to + + if LexerATNSimulator.debug: + print("EDGE " + str(from_) + " -> " + str(to) + " upon "+ chr(tk)) + + if from_.edges is None: + # make room for tokens 1..n and -1 masquerading as index 0 + from_.edges = [ None ] * (self.MAX_DFA_EDGE - self.MIN_DFA_EDGE + 1) + + from_.edges[tk - self.MIN_DFA_EDGE] = to # connect + + return to + + + # Add a new DFA state if there isn't one with this set of + # configurations already. This method also detects the first + # configuration containing an ATN rule stop state. Later, when + # traversing the DFA, we will know which rule to accept. + def addDFAState(self, configs:ATNConfigSet) -> DFAState: + + proposed = DFAState(configs=configs) + firstConfigWithRuleStopState = next((cfg for cfg in configs if isinstance(cfg.state, RuleStopState)), None) + + if firstConfigWithRuleStopState is not None: + proposed.isAcceptState = True + proposed.lexerActionExecutor = firstConfigWithRuleStopState.lexerActionExecutor + proposed.prediction = self.atn.ruleToTokenType[firstConfigWithRuleStopState.state.ruleIndex] + + dfa = self.decisionToDFA[self.mode] + existing = dfa.states.get(proposed, None) + if existing is not None: + return existing + + newState = proposed + + newState.stateNumber = len(dfa.states) + configs.setReadonly(True) + newState.configs = configs + dfa.states[newState] = newState + return newState + + def getDFA(self, mode:int): + return self.decisionToDFA[mode] + + # Get the text matched so far for the current token. + def getText(self, input:InputStream): + # index is first lookahead char, don't include. + return input.getText(self.startIndex, input.index-1) + + def consume(self, input:InputStream): + curChar = input.LA(1) + if curChar==ord('\n'): + self.line += 1 + self.column = 0 + else: + self.column += 1 + input.consume() + + def getTokenName(self, t:int): + if t==-1: + return "EOF" + else: + return "'" + chr(t) + "'" + + +LexerATNSimulator.ERROR = DFAState(0x7FFFFFFF, ATNConfigSet()) + +del Lexer diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/LexerAction.py b/.venv/lib/python3.13/site-packages/antlr4/atn/LexerAction.py new file mode 100644 index 0000000000000000000000000000000000000000..0fa7a895f31cea4415b71def30ca1ec90167f1b3 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/atn/LexerAction.py @@ -0,0 +1,298 @@ +# +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. + # + +from enum import IntEnum + +# need forward declaration +Lexer = None + + +class LexerActionType(IntEnum): + + CHANNEL = 0 #The type of a {@link LexerChannelAction} action. + CUSTOM = 1 #The type of a {@link LexerCustomAction} action. + MODE = 2 #The type of a {@link LexerModeAction} action. + MORE = 3 #The type of a {@link LexerMoreAction} action. + POP_MODE = 4 #The type of a {@link LexerPopModeAction} action. + PUSH_MODE = 5 #The type of a {@link LexerPushModeAction} action. + SKIP = 6 #The type of a {@link LexerSkipAction} action. + TYPE = 7 #The type of a {@link LexerTypeAction} action. + +class LexerAction(object): + __slots__ = ('actionType', 'isPositionDependent') + + def __init__(self, action:LexerActionType): + self.actionType = action + self.isPositionDependent = False + + def __hash__(self): + return hash(self.actionType) + + def __eq__(self, other): + return self is other + + +# +# Implements the {@code skip} lexer action by calling {@link Lexer#skip}. +# +#

The {@code skip} command does not have any parameters, so this action is +# implemented as a singleton instance exposed by {@link #INSTANCE}.

+class LexerSkipAction(LexerAction): + + # Provides a singleton instance of this parameterless lexer action. + INSTANCE = None + + def __init__(self): + super().__init__(LexerActionType.SKIP) + + def execute(self, lexer:Lexer): + lexer.skip() + + def __str__(self): + return "skip" + +LexerSkipAction.INSTANCE = LexerSkipAction() + +# Implements the {@code type} lexer action by calling {@link Lexer#setType} +# with the assigned type. +class LexerTypeAction(LexerAction): + __slots__ = 'type' + + def __init__(self, type:int): + super().__init__(LexerActionType.TYPE) + self.type = type + + def execute(self, lexer:Lexer): + lexer.type = self.type + + def __hash__(self): + return hash((self.actionType, self.type)) + + def __eq__(self, other): + if self is other: + return True + elif not isinstance(other, LexerTypeAction): + return False + else: + return self.type == other.type + + def __str__(self): + return "type(" + str(self.type) + ")" + + +# Implements the {@code pushMode} lexer action by calling +# {@link Lexer#pushMode} with the assigned mode. +class LexerPushModeAction(LexerAction): + __slots__ = 'mode' + + def __init__(self, mode:int): + super().__init__(LexerActionType.PUSH_MODE) + self.mode = mode + + #

This action is implemented by calling {@link Lexer#pushMode} with the + # value provided by {@link #getMode}.

+ def execute(self, lexer:Lexer): + lexer.pushMode(self.mode) + + def __hash__(self): + return hash((self.actionType, self.mode)) + + def __eq__(self, other): + if self is other: + return True + elif not isinstance(other, LexerPushModeAction): + return False + else: + return self.mode == other.mode + + def __str__(self): + return "pushMode(" + str(self.mode) + ")" + + +# Implements the {@code popMode} lexer action by calling {@link Lexer#popMode}. +# +#

The {@code popMode} command does not have any parameters, so this action is +# implemented as a singleton instance exposed by {@link #INSTANCE}.

+class LexerPopModeAction(LexerAction): + + INSTANCE = None + + def __init__(self): + super().__init__(LexerActionType.POP_MODE) + + #

This action is implemented by calling {@link Lexer#popMode}.

+ def execute(self, lexer:Lexer): + lexer.popMode() + + def __str__(self): + return "popMode" + +LexerPopModeAction.INSTANCE = LexerPopModeAction() + +# Implements the {@code more} lexer action by calling {@link Lexer#more}. +# +#

The {@code more} command does not have any parameters, so this action is +# implemented as a singleton instance exposed by {@link #INSTANCE}.

+class LexerMoreAction(LexerAction): + + INSTANCE = None + + def __init__(self): + super().__init__(LexerActionType.MORE) + + #

This action is implemented by calling {@link Lexer#popMode}.

+ def execute(self, lexer:Lexer): + lexer.more() + + def __str__(self): + return "more" + +LexerMoreAction.INSTANCE = LexerMoreAction() + +# Implements the {@code mode} lexer action by calling {@link Lexer#mode} with +# the assigned mode. +class LexerModeAction(LexerAction): + __slots__ = 'mode' + + def __init__(self, mode:int): + super().__init__(LexerActionType.MODE) + self.mode = mode + + #

This action is implemented by calling {@link Lexer#mode} with the + # value provided by {@link #getMode}.

+ def execute(self, lexer:Lexer): + lexer.mode(self.mode) + + def __hash__(self): + return hash((self.actionType, self.mode)) + + def __eq__(self, other): + if self is other: + return True + elif not isinstance(other, LexerModeAction): + return False + else: + return self.mode == other.mode + + def __str__(self): + return "mode(" + str(self.mode) + ")" + +# Executes a custom lexer action by calling {@link Recognizer#action} with the +# rule and action indexes assigned to the custom action. The implementation of +# a custom action is added to the generated code for the lexer in an override +# of {@link Recognizer#action} when the grammar is compiled. +# +#

This class may represent embedded actions created with the {...} +# syntax in ANTLR 4, as well as actions created for lexer commands where the +# command argument could not be evaluated when the grammar was compiled.

+ +class LexerCustomAction(LexerAction): + __slots__ = ('ruleIndex', 'actionIndex') + + # Constructs a custom lexer action with the specified rule and action + # indexes. + # + # @param ruleIndex The rule index to use for calls to + # {@link Recognizer#action}. + # @param actionIndex The action index to use for calls to + # {@link Recognizer#action}. + #/ + def __init__(self, ruleIndex:int, actionIndex:int): + super().__init__(LexerActionType.CUSTOM) + self.ruleIndex = ruleIndex + self.actionIndex = actionIndex + self.isPositionDependent = True + + #

Custom actions are implemented by calling {@link Lexer#action} with the + # appropriate rule and action indexes.

+ def execute(self, lexer:Lexer): + lexer.action(None, self.ruleIndex, self.actionIndex) + + def __hash__(self): + return hash((self.actionType, self.ruleIndex, self.actionIndex)) + + def __eq__(self, other): + if self is other: + return True + elif not isinstance(other, LexerCustomAction): + return False + else: + return self.ruleIndex == other.ruleIndex and self.actionIndex == other.actionIndex + +# Implements the {@code channel} lexer action by calling +# {@link Lexer#setChannel} with the assigned channel. +class LexerChannelAction(LexerAction): + __slots__ = 'channel' + + # Constructs a new {@code channel} action with the specified channel value. + # @param channel The channel value to pass to {@link Lexer#setChannel}. + def __init__(self, channel:int): + super().__init__(LexerActionType.CHANNEL) + self.channel = channel + + #

This action is implemented by calling {@link Lexer#setChannel} with the + # value provided by {@link #getChannel}.

+ def execute(self, lexer:Lexer): + lexer._channel = self.channel + + def __hash__(self): + return hash((self.actionType, self.channel)) + + def __eq__(self, other): + if self is other: + return True + elif not isinstance(other, LexerChannelAction): + return False + else: + return self.channel == other.channel + + def __str__(self): + return "channel(" + str(self.channel) + ")" + +# This implementation of {@link LexerAction} is used for tracking input offsets +# for position-dependent actions within a {@link LexerActionExecutor}. +# +#

This action is not serialized as part of the ATN, and is only required for +# position-dependent lexer actions which appear at a location other than the +# end of a rule. For more information about DFA optimizations employed for +# lexer actions, see {@link LexerActionExecutor#append} and +# {@link LexerActionExecutor#fixOffsetBeforeMatch}.

+class LexerIndexedCustomAction(LexerAction): + __slots__ = ('offset', 'action') + + # Constructs a new indexed custom action by associating a character offset + # with a {@link LexerAction}. + # + #

Note: This class is only required for lexer actions for which + # {@link LexerAction#isPositionDependent} returns {@code true}.

+ # + # @param offset The offset into the input {@link CharStream}, relative to + # the token start index, at which the specified lexer action should be + # executed. + # @param action The lexer action to execute at a particular offset in the + # input {@link CharStream}. + def __init__(self, offset:int, action:LexerAction): + super().__init__(action.actionType) + self.offset = offset + self.action = action + self.isPositionDependent = True + + #

This method calls {@link #execute} on the result of {@link #getAction} + # using the provided {@code lexer}.

+ def execute(self, lexer:Lexer): + # assume the input stream position was properly set by the calling code + self.action.execute(lexer) + + def __hash__(self): + return hash((self.actionType, self.offset, self.action)) + + def __eq__(self, other): + if self is other: + return True + elif not isinstance(other, LexerIndexedCustomAction): + return False + else: + return self.offset == other.offset and self.action == other.action diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/LexerActionExecutor.py b/.venv/lib/python3.13/site-packages/antlr4/atn/LexerActionExecutor.py new file mode 100644 index 0000000000000000000000000000000000000000..5c6462c3a28f4ccbcb0a65dcde96f497dd392416 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/atn/LexerActionExecutor.py @@ -0,0 +1,143 @@ +# +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +#/ + +# Represents an executor for a sequence of lexer actions which traversed during +# the matching operation of a lexer rule (token). +# +#

The executor tracks position information for position-dependent lexer actions +# efficiently, ensuring that actions appearing only at the end of the rule do +# not cause bloating of the {@link DFA} created for the lexer.

+ + +from antlr4.InputStream import InputStream +from antlr4.atn.LexerAction import LexerAction, LexerIndexedCustomAction + +# need a forward declaration +Lexer = None +LexerActionExecutor = None + +class LexerActionExecutor(object): + __slots__ = ('lexerActions', 'hashCode') + + def __init__(self, lexerActions:list=list()): + self.lexerActions = lexerActions + # Caches the result of {@link #hashCode} since the hash code is an element + # of the performance-critical {@link LexerATNConfig#hashCode} operation. + self.hashCode = hash("".join([str(la) for la in lexerActions])) + + + # Creates a {@link LexerActionExecutor} which executes the actions for + # the input {@code lexerActionExecutor} followed by a specified + # {@code lexerAction}. + # + # @param lexerActionExecutor The executor for actions already traversed by + # the lexer while matching a token within a particular + # {@link LexerATNConfig}. If this is {@code null}, the method behaves as + # though it were an empty executor. + # @param lexerAction The lexer action to execute after the actions + # specified in {@code lexerActionExecutor}. + # + # @return A {@link LexerActionExecutor} for executing the combine actions + # of {@code lexerActionExecutor} and {@code lexerAction}. + @staticmethod + def append(lexerActionExecutor:LexerActionExecutor , lexerAction:LexerAction ): + if lexerActionExecutor is None: + return LexerActionExecutor([ lexerAction ]) + + lexerActions = lexerActionExecutor.lexerActions + [ lexerAction ] + return LexerActionExecutor(lexerActions) + + # Creates a {@link LexerActionExecutor} which encodes the current offset + # for position-dependent lexer actions. + # + #

Normally, when the executor encounters lexer actions where + # {@link LexerAction#isPositionDependent} returns {@code true}, it calls + # {@link IntStream#seek} on the input {@link CharStream} to set the input + # position to the end of the current token. This behavior provides + # for efficient DFA representation of lexer actions which appear at the end + # of a lexer rule, even when the lexer rule matches a variable number of + # characters.

+ # + #

Prior to traversing a match transition in the ATN, the current offset + # from the token start index is assigned to all position-dependent lexer + # actions which have not already been assigned a fixed offset. By storing + # the offsets relative to the token start index, the DFA representation of + # lexer actions which appear in the middle of tokens remains efficient due + # to sharing among tokens of the same length, regardless of their absolute + # position in the input stream.

+ # + #

If the current executor already has offsets assigned to all + # position-dependent lexer actions, the method returns {@code this}.

+ # + # @param offset The current offset to assign to all position-dependent + # lexer actions which do not already have offsets assigned. + # + # @return A {@link LexerActionExecutor} which stores input stream offsets + # for all position-dependent lexer actions. + #/ + def fixOffsetBeforeMatch(self, offset:int): + updatedLexerActions = None + for i in range(0, len(self.lexerActions)): + if self.lexerActions[i].isPositionDependent and not isinstance(self.lexerActions[i], LexerIndexedCustomAction): + if updatedLexerActions is None: + updatedLexerActions = [ la for la in self.lexerActions ] + updatedLexerActions[i] = LexerIndexedCustomAction(offset, self.lexerActions[i]) + + if updatedLexerActions is None: + return self + else: + return LexerActionExecutor(updatedLexerActions) + + + # Execute the actions encapsulated by this executor within the context of a + # particular {@link Lexer}. + # + #

This method calls {@link IntStream#seek} to set the position of the + # {@code input} {@link CharStream} prior to calling + # {@link LexerAction#execute} on a position-dependent action. Before the + # method returns, the input position will be restored to the same position + # it was in when the method was invoked.

+ # + # @param lexer The lexer instance. + # @param input The input stream which is the source for the current token. + # When this method is called, the current {@link IntStream#index} for + # {@code input} should be the start of the following token, i.e. 1 + # character past the end of the current token. + # @param startIndex The token start index. This value may be passed to + # {@link IntStream#seek} to set the {@code input} position to the beginning + # of the token. + #/ + def execute(self, lexer:Lexer, input:InputStream, startIndex:int): + requiresSeek = False + stopIndex = input.index + try: + for lexerAction in self.lexerActions: + if isinstance(lexerAction, LexerIndexedCustomAction): + offset = lexerAction.offset + input.seek(startIndex + offset) + lexerAction = lexerAction.action + requiresSeek = (startIndex + offset) != stopIndex + elif lexerAction.isPositionDependent: + input.seek(stopIndex) + requiresSeek = False + lexerAction.execute(lexer) + finally: + if requiresSeek: + input.seek(stopIndex) + + def __hash__(self): + return self.hashCode + + def __eq__(self, other): + if self is other: + return True + elif not isinstance(other, LexerActionExecutor): + return False + else: + return self.hashCode == other.hashCode \ + and self.lexerActions == other.lexerActions + +del Lexer diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/ParserATNSimulator.py b/.venv/lib/python3.13/site-packages/antlr4/atn/ParserATNSimulator.py new file mode 100644 index 0000000000000000000000000000000000000000..d1fb3d7ed8bab47fb851d85da88d20dc39715627 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/atn/ParserATNSimulator.py @@ -0,0 +1,1649 @@ +# +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +# + +# +# The embodiment of the adaptive LL(*), ALL(*), parsing strategy. +# +#

+# The basic complexity of the adaptive strategy makes it harder to understand. +# We begin with ATN simulation to build paths in a DFA. Subsequent prediction +# requests go through the DFA first. If they reach a state without an edge for +# the current symbol, the algorithm fails over to the ATN simulation to +# complete the DFA path for the current input (until it finds a conflict state +# or uniquely predicting state).

+# +#

+# All of that is done without using the outer context because we want to create +# a DFA that is not dependent upon the rule invocation stack when we do a +# prediction. One DFA works in all contexts. We avoid using context not +# necessarily because it's slower, although it can be, but because of the DFA +# caching problem. The closure routine only considers the rule invocation stack +# created during prediction beginning in the decision rule. For example, if +# prediction occurs without invoking another rule's ATN, there are no context +# stacks in the configurations. When lack of context leads to a conflict, we +# don't know if it's an ambiguity or a weakness in the strong LL(*) parsing +# strategy (versus full LL(*)).

+# +#

+# When SLL yields a configuration set with conflict, we rewind the input and +# retry the ATN simulation, this time using full outer context without adding +# to the DFA. Configuration context stacks will be the full invocation stacks +# from the start rule. If we get a conflict using full context, then we can +# definitively say we have a true ambiguity for that input sequence. If we +# don't get a conflict, it implies that the decision is sensitive to the outer +# context. (It is not context-sensitive in the sense of context-sensitive +# grammars.)

+# +#

+# The next time we reach this DFA state with an SLL conflict, through DFA +# simulation, we will again retry the ATN simulation using full context mode. +# This is slow because we can't save the results and have to "interpret" the +# ATN each time we get that input.

+# +#

+# CACHING FULL CONTEXT PREDICTIONS

+# +#

+# We could cache results from full context to predicted alternative easily and +# that saves a lot of time but doesn't work in presence of predicates. The set +# of visible predicates from the ATN start state changes depending on the +# context, because closure can fall off the end of a rule. I tried to cache +# tuples (stack context, semantic context, predicted alt) but it was slower +# than interpreting and much more complicated. Also required a huge amount of +# memory. The goal is not to create the world's fastest parser anyway. I'd like +# to keep this algorithm simple. By launching multiple threads, we can improve +# the speed of parsing across a large number of files.

+# +#

+# There is no strict ordering between the amount of input used by SLL vs LL, +# which makes it really hard to build a cache for full context. Let's say that +# we have input A B C that leads to an SLL conflict with full context X. That +# implies that using X we might only use A B but we could also use A B C D to +# resolve conflict. Input A B C D could predict alternative 1 in one position +# in the input and A B C E could predict alternative 2 in another position in +# input. The conflicting SLL configurations could still be non-unique in the +# full context prediction, which would lead us to requiring more input than the +# original A B C. To make a prediction cache work, we have to track the exact +# input used during the previous prediction. That amounts to a cache that maps +# X to a specific DFA for that context.

+# +#

+# Something should be done for left-recursive expression predictions. They are +# likely LL(1) + pred eval. Easier to do the whole SLL unless error and retry +# with full LL thing Sam does.

+# +#

+# AVOIDING FULL CONTEXT PREDICTION

+# +#

+# We avoid doing full context retry when the outer context is empty, we did not +# dip into the outer context by falling off the end of the decision state rule, +# or when we force SLL mode.

+# +#

+# As an example of the not dip into outer context case, consider as super +# constructor calls versus function calls. One grammar might look like +# this:

+# +#
+# ctorBody
+#   : '{' superCall? stat* '}'
+#   ;
+# 
+# +#

+# Or, you might see something like

+# +#
+# stat
+#   : superCall ';'
+#   | expression ';'
+#   | ...
+#   ;
+# 
+# +#

+# In both cases I believe that no closure operations will dip into the outer +# context. In the first case ctorBody in the worst case will stop at the '}'. +# In the 2nd case it should stop at the ';'. Both cases should stay within the +# entry rule and not dip into the outer context.

+# +#

+# PREDICATES

+# +#

+# Predicates are always evaluated if present in either SLL or LL both. SLL and +# LL simulation deals with predicates differently. SLL collects predicates as +# it performs closure operations like ANTLR v3 did. It delays predicate +# evaluation until it reaches and accept state. This allows us to cache the SLL +# ATN simulation whereas, if we had evaluated predicates on-the-fly during +# closure, the DFA state configuration sets would be different and we couldn't +# build up a suitable DFA.

+# +#

+# When building a DFA accept state during ATN simulation, we evaluate any +# predicates and return the sole semantically valid alternative. If there is +# more than 1 alternative, we report an ambiguity. If there are 0 alternatives, +# we throw an exception. Alternatives without predicates act like they have +# true predicates. The simple way to think about it is to strip away all +# alternatives with false predicates and choose the minimum alternative that +# remains.

+# +#

+# When we start in the DFA and reach an accept state that's predicated, we test +# those and return the minimum semantically viable alternative. If no +# alternatives are viable, we throw an exception.

+# +#

+# During full LL ATN simulation, closure always evaluates predicates and +# on-the-fly. This is crucial to reducing the configuration set size during +# closure. It hits a landmine when parsing with the Java grammar, for example, +# without this on-the-fly evaluation.

+# +#

+# SHARING DFA

+# +#

+# All instances of the same parser share the same decision DFAs through a +# static field. Each instance gets its own ATN simulator but they share the +# same {@link #decisionToDFA} field. They also share a +# {@link PredictionContextCache} object that makes sure that all +# {@link PredictionContext} objects are shared among the DFA states. This makes +# a big size difference.

+# +#

+# THREAD SAFETY

+# +#

+# The {@link ParserATNSimulator} locks on the {@link #decisionToDFA} field when +# it adds a new DFA object to that array. {@link #addDFAEdge} +# locks on the DFA for the current decision when setting the +# {@link DFAState#edges} field. {@link #addDFAState} locks on +# the DFA for the current decision when looking up a DFA state to see if it +# already exists. We must make sure that all requests to add DFA states that +# are equivalent result in the same shared DFA object. This is because lots of +# threads will be trying to update the DFA at once. The +# {@link #addDFAState} method also locks inside the DFA lock +# but this time on the shared context cache when it rebuilds the +# configurations' {@link PredictionContext} objects using cached +# subgraphs/nodes. No other locking occurs, even during DFA simulation. This is +# safe as long as we can guarantee that all threads referencing +# {@code s.edge[t]} get the same physical target {@link DFAState}, or +# {@code null}. Once into the DFA, the DFA simulation does not reference the +# {@link DFA#states} map. It follows the {@link DFAState#edges} field to new +# targets. The DFA simulator will either find {@link DFAState#edges} to be +# {@code null}, to be non-{@code null} and {@code dfa.edges[t]} null, or +# {@code dfa.edges[t]} to be non-null. The +# {@link #addDFAEdge} method could be racing to set the field +# but in either case the DFA simulator works; if {@code null}, and requests ATN +# simulation. It could also race trying to get {@code dfa.edges[t]}, but either +# way it will work because it's not doing a test and set operation.

+# +#

+# Starting with SLL then failing to combined SLL/LL (Two-Stage +# Parsing)

+# +#

+# Sam pointed out that if SLL does not give a syntax error, then there is no +# point in doing full LL, which is slower. We only have to try LL if we get a +# syntax error. For maximum speed, Sam starts the parser set to pure SLL +# mode with the {@link BailErrorStrategy}:

+# +#
+# parser.{@link Parser#getInterpreter() getInterpreter()}.{@link #setPredictionMode setPredictionMode}{@code (}{@link PredictionMode#SLL}{@code )};
+# parser.{@link Parser#setErrorHandler setErrorHandler}(new {@link BailErrorStrategy}());
+# 
+# +#

+# If it does not get a syntax error, then we're done. If it does get a syntax +# error, we need to retry with the combined SLL/LL strategy.

+# +#

+# The reason this works is as follows. If there are no SLL conflicts, then the +# grammar is SLL (at least for that input set). If there is an SLL conflict, +# the full LL analysis must yield a set of viable alternatives which is a +# subset of the alternatives reported by SLL. If the LL set is a singleton, +# then the grammar is LL but not SLL. If the LL set is the same size as the SLL +# set, the decision is SLL. If the LL set has size > 1, then that decision +# is truly ambiguous on the current input. If the LL set is smaller, then the +# SLL conflict resolution might choose an alternative that the full LL would +# rule out as a possibility based upon better context information. If that's +# the case, then the SLL parse will definitely get an error because the full LL +# analysis says it's not viable. If SLL conflict resolution chooses an +# alternative within the LL set, them both SLL and LL would choose the same +# alternative because they both choose the minimum of multiple conflicting +# alternatives.

+# +#

+# Let's say we have a set of SLL conflicting alternatives {@code {1, 2, 3}} and +# a smaller LL set called s. If s is {@code {2, 3}}, then SLL +# parsing will get an error because SLL will pursue alternative 1. If +# s is {@code {1, 2}} or {@code {1, 3}} then both SLL and LL will +# choose the same alternative because alternative one is the minimum of either +# set. If s is {@code {2}} or {@code {3}} then SLL will get a syntax +# error. If s is {@code {1}} then SLL will succeed.

+# +#

+# Of course, if the input is invalid, then we will get an error for sure in +# both SLL and LL parsing. Erroneous input will therefore require 2 passes over +# the input.

+# +import sys +from antlr4 import DFA +from antlr4.PredictionContext import PredictionContextCache, PredictionContext, SingletonPredictionContext, \ + PredictionContextFromRuleContext +from antlr4.BufferedTokenStream import TokenStream +from antlr4.Parser import Parser +from antlr4.ParserRuleContext import ParserRuleContext +from antlr4.RuleContext import RuleContext +from antlr4.Token import Token +from antlr4.Utils import str_list +from antlr4.atn.ATN import ATN +from antlr4.atn.ATNConfig import ATNConfig +from antlr4.atn.ATNConfigSet import ATNConfigSet +from antlr4.atn.ATNSimulator import ATNSimulator +from antlr4.atn.ATNState import StarLoopEntryState, DecisionState, RuleStopState, ATNState +from antlr4.atn.PredictionMode import PredictionMode +from antlr4.atn.SemanticContext import SemanticContext, AND, andContext, orContext +from antlr4.atn.Transition import Transition, RuleTransition, ActionTransition, PrecedencePredicateTransition, \ + PredicateTransition, AtomTransition, SetTransition, NotSetTransition +from antlr4.dfa.DFAState import DFAState, PredPrediction +from antlr4.error.Errors import NoViableAltException + + +class ParserATNSimulator(ATNSimulator): + __slots__ = ( + 'parser', 'decisionToDFA', 'predictionMode', '_input', '_startIndex', + '_outerContext', '_dfa', 'mergeCache' + ) + + debug = False + debug_list_atn_decisions = False + dfa_debug = False + retry_debug = False + + + def __init__(self, parser:Parser, atn:ATN, decisionToDFA:list, sharedContextCache:PredictionContextCache): + super().__init__(atn, sharedContextCache) + self.parser = parser + self.decisionToDFA = decisionToDFA + # SLL, LL, or LL + exact ambig detection?# + self.predictionMode = PredictionMode.LL + # LAME globals to avoid parameters!!!!! I need these down deep in predTransition + self._input = None + self._startIndex = 0 + self._outerContext = None + self._dfa = None + # Each prediction operation uses a cache for merge of prediction contexts. + # Don't keep around as it wastes huge amounts of memory. DoubleKeyMap + # isn't synchronized but we're ok since two threads shouldn't reuse same + # parser/atnsim object because it can only handle one input at a time. + # This maps graphs a and b to merged result c. (a,b)→c. We can avoid + # the merge if we ever see a and b again. Note that (b,a)→c should + # also be examined during cache lookup. + # + self.mergeCache = None + + + def reset(self): + pass + + def adaptivePredict(self, input:TokenStream, decision:int, outerContext:ParserRuleContext): + if ParserATNSimulator.debug or ParserATNSimulator.debug_list_atn_decisions: + print("adaptivePredict decision " + str(decision) + + " exec LA(1)==" + self.getLookaheadName(input) + + " line " + str(input.LT(1).line) + ":" + + str(input.LT(1).column)) + self._input = input + self._startIndex = input.index + self._outerContext = outerContext + + dfa = self.decisionToDFA[decision] + self._dfa = dfa + m = input.mark() + index = input.index + + # Now we are certain to have a specific decision's DFA + # But, do we still need an initial state? + try: + if dfa.precedenceDfa: + # the start state for a precedence DFA depends on the current + # parser precedence, and is provided by a DFA method. + s0 = dfa.getPrecedenceStartState(self.parser.getPrecedence()) + else: + # the start state for a "regular" DFA is just s0 + s0 = dfa.s0 + + if s0 is None: + if outerContext is None: + outerContext = ParserRuleContext.EMPTY + if ParserATNSimulator.debug or ParserATNSimulator.debug_list_atn_decisions: + print("predictATN decision " + str(dfa.decision) + + " exec LA(1)==" + self.getLookaheadName(input) + + ", outerContext=" + outerContext.toString(self.parser.literalNames, None)) + + fullCtx = False + s0_closure = self.computeStartState(dfa.atnStartState, ParserRuleContext.EMPTY, fullCtx) + + if dfa.precedenceDfa: + # If this is a precedence DFA, we use applyPrecedenceFilter + # to convert the computed start state to a precedence start + # state. We then use DFA.setPrecedenceStartState to set the + # appropriate start state for the precedence level rather + # than simply setting DFA.s0. + # + dfa.s0.configs = s0_closure # not used for prediction but useful to know start configs anyway + s0_closure = self.applyPrecedenceFilter(s0_closure) + s0 = self.addDFAState(dfa, DFAState(configs=s0_closure)) + dfa.setPrecedenceStartState(self.parser.getPrecedence(), s0) + else: + s0 = self.addDFAState(dfa, DFAState(configs=s0_closure)) + dfa.s0 = s0 + + alt = self.execATN(dfa, s0, input, index, outerContext) + if ParserATNSimulator.debug: + print("DFA after predictATN: " + dfa.toString(self.parser.literalNames)) + return alt + finally: + self._dfa = None + self.mergeCache = None # wack cache after each prediction + input.seek(index) + input.release(m) + + # Performs ATN simulation to compute a predicted alternative based + # upon the remaining input, but also updates the DFA cache to avoid + # having to traverse the ATN again for the same input sequence. + + # There are some key conditions we're looking for after computing a new + # set of ATN configs (proposed DFA state): + # if the set is empty, there is no viable alternative for current symbol + # does the state uniquely predict an alternative? + # does the state have a conflict that would prevent us from + # putting it on the work list? + + # We also have some key operations to do: + # add an edge from previous DFA state to potentially new DFA state, D, + # upon current symbol but only if adding to work list, which means in all + # cases except no viable alternative (and possibly non-greedy decisions?) + # collecting predicates and adding semantic context to DFA accept states + # adding rule context to context-sensitive DFA accept states + # consuming an input symbol + # reporting a conflict + # reporting an ambiguity + # reporting a context sensitivity + # reporting insufficient predicates + + # cover these cases: + # dead end + # single alt + # single alt + preds + # conflict + # conflict + preds + # + def execATN(self, dfa:DFA, s0:DFAState, input:TokenStream, startIndex:int, outerContext:ParserRuleContext ): + if ParserATNSimulator.debug or ParserATNSimulator.debug_list_atn_decisions: + print("execATN decision " + str(dfa.decision) + + " exec LA(1)==" + self.getLookaheadName(input) + + " line " + str(input.LT(1).line) + ":" + str(input.LT(1).column)) + + previousD = s0 + + if ParserATNSimulator.debug: + print("s0 = " + str(s0)) + + t = input.LA(1) + + while True: # while more work + D = self.getExistingTargetState(previousD, t) + if D is None: + D = self.computeTargetState(dfa, previousD, t) + if D is self.ERROR: + # if any configs in previous dipped into outer context, that + # means that input up to t actually finished entry rule + # at least for SLL decision. Full LL doesn't dip into outer + # so don't need special case. + # We will get an error no matter what so delay until after + # decision; better error message. Also, no reachable target + # ATN states in SLL implies LL will also get nowhere. + # If conflict in states that dip out, choose min since we + # will get error no matter what. + e = self.noViableAlt(input, outerContext, previousD.configs, startIndex) + input.seek(startIndex) + alt = self.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(previousD.configs, outerContext) + if alt!=ATN.INVALID_ALT_NUMBER: + return alt + raise e + + if D.requiresFullContext and self.predictionMode != PredictionMode.SLL: + # IF PREDS, MIGHT RESOLVE TO SINGLE ALT => SLL (or syntax error) + conflictingAlts = D.configs.conflictingAlts + if D.predicates is not None: + if ParserATNSimulator.debug: + print("DFA state has preds in DFA sim LL failover") + conflictIndex = input.index + if conflictIndex != startIndex: + input.seek(startIndex) + + conflictingAlts = self.evalSemanticContext(D.predicates, outerContext, True) + if len(conflictingAlts)==1: + if ParserATNSimulator.debug: + print("Full LL avoided") + return min(conflictingAlts) + + if conflictIndex != startIndex: + # restore the index so reporting the fallback to full + # context occurs with the index at the correct spot + input.seek(conflictIndex) + + if ParserATNSimulator.dfa_debug: + print("ctx sensitive state " + str(outerContext) +" in " + str(D)) + fullCtx = True + s0_closure = self.computeStartState(dfa.atnStartState, outerContext, fullCtx) + self.reportAttemptingFullContext(dfa, conflictingAlts, D.configs, startIndex, input.index) + alt = self.execATNWithFullContext(dfa, D, s0_closure, input, startIndex, outerContext) + return alt + + if D.isAcceptState: + if D.predicates is None: + return D.prediction + + stopIndex = input.index + input.seek(startIndex) + alts = self.evalSemanticContext(D.predicates, outerContext, True) + if len(alts)==0: + raise self.noViableAlt(input, outerContext, D.configs, startIndex) + elif len(alts)==1: + return min(alts) + else: + # report ambiguity after predicate evaluation to make sure the correct + # set of ambig alts is reported. + self.reportAmbiguity(dfa, D, startIndex, stopIndex, False, alts, D.configs) + return min(alts) + + previousD = D + + if t != Token.EOF: + input.consume() + t = input.LA(1) + + # + # Get an existing target state for an edge in the DFA. If the target state + # for the edge has not yet been computed or is otherwise not available, + # this method returns {@code null}. + # + # @param previousD The current DFA state + # @param t The next input symbol + # @return The existing target DFA state for the given input symbol + # {@code t}, or {@code null} if the target state for this edge is not + # already cached + # + def getExistingTargetState(self, previousD:DFAState, t:int): + edges = previousD.edges + if edges is None or t + 1 < 0 or t + 1 >= len(edges): + return None + else: + return edges[t + 1] + + # + # Compute a target state for an edge in the DFA, and attempt to add the + # computed state and corresponding edge to the DFA. + # + # @param dfa The DFA + # @param previousD The current DFA state + # @param t The next input symbol + # + # @return The computed target DFA state for the given input symbol + # {@code t}. If {@code t} does not lead to a valid DFA state, this method + # returns {@link #ERROR}. + # + def computeTargetState(self, dfa:DFA, previousD:DFAState, t:int): + reach = self.computeReachSet(previousD.configs, t, False) + if reach is None: + self.addDFAEdge(dfa, previousD, t, self.ERROR) + return self.ERROR + + # create new target state; we'll add to DFA after it's complete + D = DFAState(configs=reach) + + predictedAlt = self.getUniqueAlt(reach) + + if ParserATNSimulator.debug: + altSubSets = PredictionMode.getConflictingAltSubsets(reach) + print("SLL altSubSets=" + str(altSubSets) + ", configs=" + str(reach) + + ", predict=" + str(predictedAlt) + ", allSubsetsConflict=" + + str(PredictionMode.allSubsetsConflict(altSubSets)) + ", conflictingAlts=" + + str(self.getConflictingAlts(reach))) + + if predictedAlt!=ATN.INVALID_ALT_NUMBER: + # NO CONFLICT, UNIQUELY PREDICTED ALT + D.isAcceptState = True + D.configs.uniqueAlt = predictedAlt + D.prediction = predictedAlt + elif PredictionMode.hasSLLConflictTerminatingPrediction(self.predictionMode, reach): + # MORE THAN ONE VIABLE ALTERNATIVE + D.configs.conflictingAlts = self.getConflictingAlts(reach) + D.requiresFullContext = True + # in SLL-only mode, we will stop at this state and return the minimum alt + D.isAcceptState = True + D.prediction = min(D.configs.conflictingAlts) + + if D.isAcceptState and D.configs.hasSemanticContext: + self.predicateDFAState(D, self.atn.getDecisionState(dfa.decision)) + if D.predicates is not None: + D.prediction = ATN.INVALID_ALT_NUMBER + + # all adds to dfa are done after we've created full D state + D = self.addDFAEdge(dfa, previousD, t, D) + return D + + def predicateDFAState(self, dfaState:DFAState, decisionState:DecisionState): + # We need to test all predicates, even in DFA states that + # uniquely predict alternative. + nalts = len(decisionState.transitions) + # Update DFA so reach becomes accept state with (predicate,alt) + # pairs if preds found for conflicting alts + altsToCollectPredsFrom = self.getConflictingAltsOrUniqueAlt(dfaState.configs) + altToPred = self.getPredsForAmbigAlts(altsToCollectPredsFrom, dfaState.configs, nalts) + if altToPred is not None: + dfaState.predicates = self.getPredicatePredictions(altsToCollectPredsFrom, altToPred) + dfaState.prediction = ATN.INVALID_ALT_NUMBER # make sure we use preds + else: + # There are preds in configs but they might go away + # when OR'd together like {p}? || NONE == NONE. If neither + # alt has preds, resolve to min alt + dfaState.prediction = min(altsToCollectPredsFrom) + + # comes back with reach.uniqueAlt set to a valid alt + def execATNWithFullContext(self, dfa:DFA, D:DFAState, # how far we got before failing over + s0:ATNConfigSet, + input:TokenStream, + startIndex:int, + outerContext:ParserRuleContext): + if ParserATNSimulator.debug or ParserATNSimulator.debug_list_atn_decisions: + print("execATNWithFullContext", str(s0)) + fullCtx = True + foundExactAmbig = False + reach = None + previous = s0 + input.seek(startIndex) + t = input.LA(1) + predictedAlt = -1 + while (True): # while more work + reach = self.computeReachSet(previous, t, fullCtx) + if reach is None: + # if any configs in previous dipped into outer context, that + # means that input up to t actually finished entry rule + # at least for LL decision. Full LL doesn't dip into outer + # so don't need special case. + # We will get an error no matter what so delay until after + # decision; better error message. Also, no reachable target + # ATN states in SLL implies LL will also get nowhere. + # If conflict in states that dip out, choose min since we + # will get error no matter what. + e = self.noViableAlt(input, outerContext, previous, startIndex) + input.seek(startIndex) + alt = self.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(previous, outerContext) + if alt!=ATN.INVALID_ALT_NUMBER: + return alt + else: + raise e + + altSubSets = PredictionMode.getConflictingAltSubsets(reach) + if ParserATNSimulator.debug: + print("LL altSubSets=" + str(altSubSets) + ", predict=" + + str(PredictionMode.getUniqueAlt(altSubSets)) + ", resolvesToJustOneViableAlt=" + + str(PredictionMode.resolvesToJustOneViableAlt(altSubSets))) + + reach.uniqueAlt = self.getUniqueAlt(reach) + # unique prediction? + if reach.uniqueAlt!=ATN.INVALID_ALT_NUMBER: + predictedAlt = reach.uniqueAlt + break + elif self.predictionMode is not PredictionMode.LL_EXACT_AMBIG_DETECTION: + predictedAlt = PredictionMode.resolvesToJustOneViableAlt(altSubSets) + if predictedAlt != ATN.INVALID_ALT_NUMBER: + break + else: + # In exact ambiguity mode, we never try to terminate early. + # Just keeps scarfing until we know what the conflict is + if PredictionMode.allSubsetsConflict(altSubSets) and PredictionMode.allSubsetsEqual(altSubSets): + foundExactAmbig = True + predictedAlt = PredictionMode.getSingleViableAlt(altSubSets) + break + # else there are multiple non-conflicting subsets or + # we're not sure what the ambiguity is yet. + # So, keep going. + + previous = reach + if t != Token.EOF: + input.consume() + t = input.LA(1) + + # If the configuration set uniquely predicts an alternative, + # without conflict, then we know that it's a full LL decision + # not SLL. + if reach.uniqueAlt != ATN.INVALID_ALT_NUMBER : + self.reportContextSensitivity(dfa, predictedAlt, reach, startIndex, input.index) + return predictedAlt + + # We do not check predicates here because we have checked them + # on-the-fly when doing full context prediction. + + # + # In non-exact ambiguity detection mode, we might actually be able to + # detect an exact ambiguity, but I'm not going to spend the cycles + # needed to check. We only emit ambiguity warnings in exact ambiguity + # mode. + # + # For example, we might know that we have conflicting configurations. + # But, that does not mean that there is no way forward without a + # conflict. It's possible to have nonconflicting alt subsets as in: + + # altSubSets=[{1, 2}, {1, 2}, {1}, {1, 2}] + + # from + # + # [(17,1,[5 $]), (13,1,[5 10 $]), (21,1,[5 10 $]), (11,1,[$]), + # (13,2,[5 10 $]), (21,2,[5 10 $]), (11,2,[$])] + # + # In this case, (17,1,[5 $]) indicates there is some next sequence that + # would resolve this without conflict to alternative 1. Any other viable + # next sequence, however, is associated with a conflict. We stop + # looking for input because no amount of further lookahead will alter + # the fact that we should predict alternative 1. We just can't say for + # sure that there is an ambiguity without looking further. + + self.reportAmbiguity(dfa, D, startIndex, input.index, foundExactAmbig, None, reach) + + return predictedAlt + + def computeReachSet(self, closure:ATNConfigSet, t:int, fullCtx:bool): + if ParserATNSimulator.debug: + print("in computeReachSet, starting closure: " + str(closure)) + + if self.mergeCache is None: + self.mergeCache = dict() + + intermediate = ATNConfigSet(fullCtx) + + # Configurations already in a rule stop state indicate reaching the end + # of the decision rule (local context) or end of the start rule (full + # context). Once reached, these configurations are never updated by a + # closure operation, so they are handled separately for the performance + # advantage of having a smaller intermediate set when calling closure. + # + # For full-context reach operations, separate handling is required to + # ensure that the alternative matching the longest overall sequence is + # chosen when multiple such configurations can match the input. + + skippedStopStates = None + + # First figure out where we can reach on input t + for c in closure: + if ParserATNSimulator.debug: + print("testing " + self.getTokenName(t) + " at " + str(c)) + + if isinstance(c.state, RuleStopState): + if fullCtx or t == Token.EOF: + if skippedStopStates is None: + skippedStopStates = list() + skippedStopStates.append(c) + continue + + for trans in c.state.transitions: + target = self.getReachableTarget(trans, t) + if target is not None: + intermediate.add(ATNConfig(state=target, config=c), self.mergeCache) + + # Now figure out where the reach operation can take us... + + reach = None + + # This block optimizes the reach operation for intermediate sets which + # trivially indicate a termination state for the overall + # adaptivePredict operation. + # + # The conditions assume that intermediate + # contains all configurations relevant to the reach set, but this + # condition is not true when one or more configurations have been + # withheld in skippedStopStates, or when the current symbol is EOF. + # + if skippedStopStates is None and t!=Token.EOF: + if len(intermediate)==1: + # Don't pursue the closure if there is just one state. + # It can only have one alternative; just add to result + # Also don't pursue the closure if there is unique alternative + # among the configurations. + reach = intermediate + elif self.getUniqueAlt(intermediate)!=ATN.INVALID_ALT_NUMBER: + # Also don't pursue the closure if there is unique alternative + # among the configurations. + reach = intermediate + + # If the reach set could not be trivially determined, perform a closure + # operation on the intermediate set to compute its initial value. + # + if reach is None: + reach = ATNConfigSet(fullCtx) + closureBusy = set() + treatEofAsEpsilon = t == Token.EOF + for c in intermediate: + self.closure(c, reach, closureBusy, False, fullCtx, treatEofAsEpsilon) + + if t == Token.EOF: + # After consuming EOF no additional input is possible, so we are + # only interested in configurations which reached the end of the + # decision rule (local context) or end of the start rule (full + # context). Update reach to contain only these configurations. This + # handles both explicit EOF transitions in the grammar and implicit + # EOF transitions following the end of the decision or start rule. + # + # When reach==intermediate, no closure operation was performed. In + # this case, removeAllConfigsNotInRuleStopState needs to check for + # reachable rule stop states as well as configurations already in + # a rule stop state. + # + # This is handled before the configurations in skippedStopStates, + # because any configurations potentially added from that list are + # already guaranteed to meet this condition whether or not it's + # required. + # + reach = self.removeAllConfigsNotInRuleStopState(reach, reach is intermediate) + + # If skippedStopStates is not null, then it contains at least one + # configuration. For full-context reach operations, these + # configurations reached the end of the start rule, in which case we + # only add them back to reach if no configuration during the current + # closure operation reached such a state. This ensures adaptivePredict + # chooses an alternative matching the longest overall sequence when + # multiple alternatives are viable. + # + if skippedStopStates is not None and ( (not fullCtx) or (not PredictionMode.hasConfigInRuleStopState(reach))): + for c in skippedStopStates: + reach.add(c, self.mergeCache) + if len(reach)==0: + return None + else: + return reach + + # + # Return a configuration set containing only the configurations from + # {@code configs} which are in a {@link RuleStopState}. If all + # configurations in {@code configs} are already in a rule stop state, this + # method simply returns {@code configs}. + # + #

When {@code lookToEndOfRule} is true, this method uses + # {@link ATN#nextTokens} for each configuration in {@code configs} which is + # not already in a rule stop state to see if a rule stop state is reachable + # from the configuration via epsilon-only transitions.

+ # + # @param configs the configuration set to update + # @param lookToEndOfRule when true, this method checks for rule stop states + # reachable by epsilon-only transitions from each configuration in + # {@code configs}. + # + # @return {@code configs} if all configurations in {@code configs} are in a + # rule stop state, otherwise return a new configuration set containing only + # the configurations from {@code configs} which are in a rule stop state + # + def removeAllConfigsNotInRuleStopState(self, configs:ATNConfigSet, lookToEndOfRule:bool): + if PredictionMode.allConfigsInRuleStopStates(configs): + return configs + result = ATNConfigSet(configs.fullCtx) + for config in configs: + if isinstance(config.state, RuleStopState): + result.add(config, self.mergeCache) + continue + if lookToEndOfRule and config.state.epsilonOnlyTransitions: + nextTokens = self.atn.nextTokens(config.state) + if Token.EPSILON in nextTokens: + endOfRuleState = self.atn.ruleToStopState[config.state.ruleIndex] + result.add(ATNConfig(state=endOfRuleState, config=config), self.mergeCache) + return result + + def computeStartState(self, p:ATNState, ctx:RuleContext, fullCtx:bool): + # always at least the implicit call to start rule + initialContext = PredictionContextFromRuleContext(self.atn, ctx) + configs = ATNConfigSet(fullCtx) + + for i in range(0, len(p.transitions)): + target = p.transitions[i].target + c = ATNConfig(target, i+1, initialContext) + closureBusy = set() + self.closure(c, configs, closureBusy, True, fullCtx, False) + return configs + + # + # This method transforms the start state computed by + # {@link #computeStartState} to the special start state used by a + # precedence DFA for a particular precedence value. The transformation + # process applies the following changes to the start state's configuration + # set. + # + #
    + #
  1. Evaluate the precedence predicates for each configuration using + # {@link SemanticContext#evalPrecedence}.
  2. + #
  3. Remove all configurations which predict an alternative greater than + # 1, for which another configuration that predicts alternative 1 is in the + # same ATN state with the same prediction context. This transformation is + # valid for the following reasons: + # + #
  4. + #
+ # + #

+ # The prediction context must be considered by this filter to address + # situations like the following. + #

+ # + #
+    # grammar TA;
+    # prog: statement* EOF;
+    # statement: letterA | statement letterA 'b' ;
+    # letterA: 'a';
+    # 
+ #
+ #

+ # If the above grammar, the ATN state immediately before the token + # reference {@code 'a'} in {@code letterA} is reachable from the left edge + # of both the primary and closure blocks of the left-recursive rule + # {@code statement}. The prediction context associated with each of these + # configurations distinguishes between them, and prevents the alternative + # which stepped out to {@code prog} (and then back in to {@code statement} + # from being eliminated by the filter. + #

+ # + # @param configs The configuration set computed by + # {@link #computeStartState} as the start state for the DFA. + # @return The transformed configuration set representing the start state + # for a precedence DFA at a particular precedence level (determined by + # calling {@link Parser#getPrecedence}). + # + def applyPrecedenceFilter(self, configs:ATNConfigSet): + statesFromAlt1 = dict() + configSet = ATNConfigSet(configs.fullCtx) + for config in configs: + # handle alt 1 first + if config.alt != 1: + continue + updatedContext = config.semanticContext.evalPrecedence(self.parser, self._outerContext) + if updatedContext is None: + # the configuration was eliminated + continue + + statesFromAlt1[config.state.stateNumber] = config.context + if updatedContext is not config.semanticContext: + configSet.add(ATNConfig(config=config, semantic=updatedContext), self.mergeCache) + else: + configSet.add(config, self.mergeCache) + + for config in configs: + if config.alt == 1: + # already handled + continue + + # In the future, this elimination step could be updated to also + # filter the prediction context for alternatives predicting alt>1 + # (basically a graph subtraction algorithm). + # + if not config.precedenceFilterSuppressed: + context = statesFromAlt1.get(config.state.stateNumber, None) + if context==config.context: + # eliminated + continue + + configSet.add(config, self.mergeCache) + + return configSet + + def getReachableTarget(self, trans:Transition, ttype:int): + if trans.matches(ttype, 0, self.atn.maxTokenType): + return trans.target + else: + return None + + def getPredsForAmbigAlts(self, ambigAlts:set, configs:ATNConfigSet, nalts:int): + # REACH=[1|1|[]|0:0, 1|2|[]|0:1] + # altToPred starts as an array of all null contexts. The entry at index i + # corresponds to alternative i. altToPred[i] may have one of three values: + # 1. null: no ATNConfig c is found such that c.alt==i + # 2. SemanticContext.NONE: At least one ATNConfig c exists such that + # c.alt==i and c.semanticContext==SemanticContext.NONE. In other words, + # alt i has at least one unpredicated config. + # 3. Non-NONE Semantic Context: There exists at least one, and for all + # ATNConfig c such that c.alt==i, c.semanticContext!=SemanticContext.NONE. + # + # From this, it is clear that NONE||anything==NONE. + # + altToPred = [None] * (nalts + 1) + for c in configs: + if c.alt in ambigAlts: + altToPred[c.alt] = orContext(altToPred[c.alt], c.semanticContext) + + nPredAlts = 0 + for i in range(1, nalts+1): + if altToPred[i] is None: + altToPred[i] = SemanticContext.NONE + elif altToPred[i] is not SemanticContext.NONE: + nPredAlts += 1 + + # nonambig alts are null in altToPred + if nPredAlts==0: + altToPred = None + if ParserATNSimulator.debug: + print("getPredsForAmbigAlts result " + str_list(altToPred)) + return altToPred + + def getPredicatePredictions(self, ambigAlts:set, altToPred:list): + pairs = [] + containsPredicate = False + for i in range(1, len(altToPred)): + pred = altToPred[i] + # unpredicated is indicated by SemanticContext.NONE + if ambigAlts is not None and i in ambigAlts: + pairs.append(PredPrediction(pred, i)) + if pred is not SemanticContext.NONE: + containsPredicate = True + + if not containsPredicate: + return None + + return pairs + + # + # This method is used to improve the localization of error messages by + # choosing an alternative rather than throwing a + # {@link NoViableAltException} in particular prediction scenarios where the + # {@link #ERROR} state was reached during ATN simulation. + # + #

+ # The default implementation of this method uses the following + # algorithm to identify an ATN configuration which successfully parsed the + # decision entry rule. Choosing such an alternative ensures that the + # {@link ParserRuleContext} returned by the calling rule will be complete + # and valid, and the syntax error will be reported later at a more + # localized location.

+ # + # + # + #

+ # In some scenarios, the algorithm described above could predict an + # alternative which will result in a {@link FailedPredicateException} in + # the parser. Specifically, this could occur if the only configuration + # capable of successfully parsing to the end of the decision rule is + # blocked by a semantic predicate. By choosing this alternative within + # {@link #adaptivePredict} instead of throwing a + # {@link NoViableAltException}, the resulting + # {@link FailedPredicateException} in the parser will identify the specific + # predicate which is preventing the parser from successfully parsing the + # decision rule, which helps developers identify and correct logic errors + # in semantic predicates. + #

+ # + # @param configs The ATN configurations which were valid immediately before + # the {@link #ERROR} state was reached + # @param outerContext The is the \gamma_0 initial parser context from the paper + # or the parser stack at the instant before prediction commences. + # + # @return The value to return from {@link #adaptivePredict}, or + # {@link ATN#INVALID_ALT_NUMBER} if a suitable alternative was not + # identified and {@link #adaptivePredict} should report an error instead. + # + def getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(self, configs:ATNConfigSet, outerContext:ParserRuleContext): + semValidConfigs, semInvalidConfigs = self.splitAccordingToSemanticValidity(configs, outerContext) + alt = self.getAltThatFinishedDecisionEntryRule(semValidConfigs) + if alt!=ATN.INVALID_ALT_NUMBER: # semantically/syntactically viable path exists + return alt + # Is there a syntactically valid path with a failed pred? + if len(semInvalidConfigs)>0: + alt = self.getAltThatFinishedDecisionEntryRule(semInvalidConfigs) + if alt!=ATN.INVALID_ALT_NUMBER: # syntactically viable path exists + return alt + return ATN.INVALID_ALT_NUMBER + + def getAltThatFinishedDecisionEntryRule(self, configs:ATNConfigSet): + alts = set() + for c in configs: + if c.reachesIntoOuterContext>0 or (isinstance(c.state, RuleStopState) and c.context.hasEmptyPath() ): + alts.add(c.alt) + if len(alts)==0: + return ATN.INVALID_ALT_NUMBER + else: + return min(alts) + + # Walk the list of configurations and split them according to + # those that have preds evaluating to true/false. If no pred, assume + # true pred and include in succeeded set. Returns Pair of sets. + # + # Create a new set so as not to alter the incoming parameter. + # + # Assumption: the input stream has been restored to the starting point + # prediction, which is where predicates need to evaluate. + # + def splitAccordingToSemanticValidity(self, configs:ATNConfigSet, outerContext:ParserRuleContext): + succeeded = ATNConfigSet(configs.fullCtx) + failed = ATNConfigSet(configs.fullCtx) + for c in configs: + if c.semanticContext is not SemanticContext.NONE: + predicateEvaluationResult = c.semanticContext.eval(self.parser, outerContext) + if predicateEvaluationResult: + succeeded.add(c) + else: + failed.add(c) + else: + succeeded.add(c) + return (succeeded,failed) + + # Look through a list of predicate/alt pairs, returning alts for the + # pairs that win. A {@code NONE} predicate indicates an alt containing an + # unpredicated config which behaves as "always true." If !complete + # then we stop at the first predicate that evaluates to true. This + # includes pairs with null predicates. + # + def evalSemanticContext(self, predPredictions:list, outerContext:ParserRuleContext, complete:bool): + predictions = set() + for pair in predPredictions: + if pair.pred is SemanticContext.NONE: + predictions.add(pair.alt) + if not complete: + break + continue + predicateEvaluationResult = pair.pred.eval(self.parser, outerContext) + if ParserATNSimulator.debug or ParserATNSimulator.dfa_debug: + print("eval pred " + str(pair) + "=" + str(predicateEvaluationResult)) + + if predicateEvaluationResult: + if ParserATNSimulator.debug or ParserATNSimulator.dfa_debug: + print("PREDICT " + str(pair.alt)) + predictions.add(pair.alt) + if not complete: + break + return predictions + + + # TODO: If we are doing predicates, there is no point in pursuing + # closure operations if we reach a DFA state that uniquely predicts + # alternative. We will not be caching that DFA state and it is a + # waste to pursue the closure. Might have to advance when we do + # ambig detection thought :( + # + + def closure(self, config:ATNConfig, configs:ATNConfigSet, closureBusy:set, collectPredicates:bool, fullCtx:bool, treatEofAsEpsilon:bool): + initialDepth = 0 + self.closureCheckingStopState(config, configs, closureBusy, collectPredicates, + fullCtx, initialDepth, treatEofAsEpsilon) + + + def closureCheckingStopState(self, config:ATNConfig, configs:ATNConfigSet, closureBusy:set, collectPredicates:bool, fullCtx:bool, depth:int, treatEofAsEpsilon:bool): + if ParserATNSimulator.debug: + print("closure(" + str(config) + ")") + + if isinstance(config.state, RuleStopState): + # We hit rule end. If we have context info, use it + # run thru all possible stack tops in ctx + if not config.context.isEmpty(): + for i in range(0, len(config.context)): + state = config.context.getReturnState(i) + if state is PredictionContext.EMPTY_RETURN_STATE: + if fullCtx: + configs.add(ATNConfig(state=config.state, context=PredictionContext.EMPTY, config=config), self.mergeCache) + continue + else: + # we have no context info, just chase follow links (if greedy) + if ParserATNSimulator.debug: + print("FALLING off rule " + self.getRuleName(config.state.ruleIndex)) + self.closure_(config, configs, closureBusy, collectPredicates, + fullCtx, depth, treatEofAsEpsilon) + continue + returnState = self.atn.states[state] + newContext = config.context.getParent(i) # "pop" return state + c = ATNConfig(state=returnState, alt=config.alt, context=newContext, semantic=config.semanticContext) + # While we have context to pop back from, we may have + # gotten that context AFTER having falling off a rule. + # Make sure we track that we are now out of context. + c.reachesIntoOuterContext = config.reachesIntoOuterContext + self.closureCheckingStopState(c, configs, closureBusy, collectPredicates, fullCtx, depth - 1, treatEofAsEpsilon) + return + elif fullCtx: + # reached end of start rule + configs.add(config, self.mergeCache) + return + else: + # else if we have no context info, just chase follow links (if greedy) + if ParserATNSimulator.debug: + print("FALLING off rule " + self.getRuleName(config.state.ruleIndex)) + + self.closure_(config, configs, closureBusy, collectPredicates, fullCtx, depth, treatEofAsEpsilon) + + # Do the actual work of walking epsilon edges# + def closure_(self, config:ATNConfig, configs:ATNConfigSet, closureBusy:set, collectPredicates:bool, fullCtx:bool, depth:int, treatEofAsEpsilon:bool): + p = config.state + # optimization + if not p.epsilonOnlyTransitions: + configs.add(config, self.mergeCache) + # make sure to not return here, because EOF transitions can act as + # both epsilon transitions and non-epsilon transitions. + + first = True + for t in p.transitions: + if first: + first = False + if self.canDropLoopEntryEdgeInLeftRecursiveRule(config): + continue + + continueCollecting = collectPredicates and not isinstance(t, ActionTransition) + c = self.getEpsilonTarget(config, t, continueCollecting, depth == 0, fullCtx, treatEofAsEpsilon) + if c is not None: + newDepth = depth + if isinstance( config.state, RuleStopState): + # target fell off end of rule; mark resulting c as having dipped into outer context + # We can't get here if incoming config was rule stop and we had context + # track how far we dip into outer context. Might + # come in handy and we avoid evaluating context dependent + # preds if this is > 0. + if self._dfa is not None and self._dfa.precedenceDfa: + if t.outermostPrecedenceReturn == self._dfa.atnStartState.ruleIndex: + c.precedenceFilterSuppressed = True + c.reachesIntoOuterContext += 1 + if c in closureBusy: + # avoid infinite recursion for right-recursive rules + continue + closureBusy.add(c) + configs.dipsIntoOuterContext = True # TODO: can remove? only care when we add to set per middle of this method + newDepth -= 1 + if ParserATNSimulator.debug: + print("dips into outer ctx: " + str(c)) + else: + if not t.isEpsilon: + if c in closureBusy: + # avoid infinite recursion for EOF* and EOF+ + continue + closureBusy.add(c) + if isinstance(t, RuleTransition): + # latch when newDepth goes negative - once we step out of the entry context we can't return + if newDepth >= 0: + newDepth += 1 + + self.closureCheckingStopState(c, configs, closureBusy, continueCollecting, fullCtx, newDepth, treatEofAsEpsilon) + + + + # Implements first-edge (loop entry) elimination as an optimization + # during closure operations. See antlr/antlr4#1398. + # + # The optimization is to avoid adding the loop entry config when + # the exit path can only lead back to the same + # StarLoopEntryState after popping context at the rule end state + # (traversing only epsilon edges, so we're still in closure, in + # this same rule). + # + # We need to detect any state that can reach loop entry on + # epsilon w/o exiting rule. We don't have to look at FOLLOW + # links, just ensure that all stack tops for config refer to key + # states in LR rule. + # + # To verify we are in the right situation we must first check + # closure is at a StarLoopEntryState generated during LR removal. + # Then we check that each stack top of context is a return state + # from one of these cases: + # + # 1. 'not' expr, '(' type ')' expr. The return state points at loop entry state + # 2. expr op expr. The return state is the block end of internal block of (...)* + # 3. 'between' expr 'and' expr. The return state of 2nd expr reference. + # That state points at block end of internal block of (...)*. + # 4. expr '?' expr ':' expr. The return state points at block end, + # which points at loop entry state. + # + # If any is true for each stack top, then closure does not add a + # config to the current config set for edge[0], the loop entry branch. + # + # Conditions fail if any context for the current config is: + # + # a. empty (we'd fall out of expr to do a global FOLLOW which could + # even be to some weird spot in expr) or, + # b. lies outside of expr or, + # c. lies within expr but at a state not the BlockEndState + # generated during LR removal + # + # Do we need to evaluate predicates ever in closure for this case? + # + # No. Predicates, including precedence predicates, are only + # evaluated when computing a DFA start state. I.e., only before + # the lookahead (but not parser) consumes a token. + # + # There are no epsilon edges allowed in LR rule alt blocks or in + # the "primary" part (ID here). If closure is in + # StarLoopEntryState any lookahead operation will have consumed a + # token as there are no epsilon-paths that lead to + # StarLoopEntryState. We do not have to evaluate predicates + # therefore if we are in the generated StarLoopEntryState of a LR + # rule. Note that when making a prediction starting at that + # decision point, decision d=2, compute-start-state performs + # closure starting at edges[0], edges[1] emanating from + # StarLoopEntryState. That means it is not performing closure on + # StarLoopEntryState during compute-start-state. + # + # How do we know this always gives same prediction answer? + # + # Without predicates, loop entry and exit paths are ambiguous + # upon remaining input +b (in, say, a+b). Either paths lead to + # valid parses. Closure can lead to consuming + immediately or by + # falling out of this call to expr back into expr and loop back + # again to StarLoopEntryState to match +b. In this special case, + # we choose the more efficient path, which is to take the bypass + # path. + # + # The lookahead language has not changed because closure chooses + # one path over the other. Both paths lead to consuming the same + # remaining input during a lookahead operation. If the next token + # is an operator, lookahead will enter the choice block with + # operators. If it is not, lookahead will exit expr. Same as if + # closure had chosen to enter the choice block immediately. + # + # Closure is examining one config (some loopentrystate, some alt, + # context) which means it is considering exactly one alt. Closure + # always copies the same alt to any derived configs. + # + # How do we know this optimization doesn't mess up precedence in + # our parse trees? + # + # Looking through expr from left edge of stat only has to confirm + # that an input, say, a+b+c; begins with any valid interpretation + # of an expression. The precedence actually doesn't matter when + # making a decision in stat seeing through expr. It is only when + # parsing rule expr that we must use the precedence to get the + # right interpretation and, hence, parse tree. + # + # @since 4.6 + # + def canDropLoopEntryEdgeInLeftRecursiveRule(self, config): + # return False + p = config.state + # First check to see if we are in StarLoopEntryState generated during + # left-recursion elimination. For efficiency, also check if + # the context has an empty stack case. If so, it would mean + # global FOLLOW so we can't perform optimization + # Are we the special loop entry/exit state? or SLL wildcard + if p.stateType != ATNState.STAR_LOOP_ENTRY \ + or not p.isPrecedenceDecision \ + or config.context.isEmpty() \ + or config.context.hasEmptyPath(): + return False + + # Require all return states to return back to the same rule + # that p is in. + numCtxs = len(config.context) + for i in range(0, numCtxs): # for each stack context + returnState = self.atn.states[config.context.getReturnState(i)] + if returnState.ruleIndex != p.ruleIndex: + return False + + decisionStartState = p.transitions[0].target + blockEndStateNum = decisionStartState.endState.stateNumber + blockEndState = self.atn.states[blockEndStateNum] + + # Verify that the top of each stack context leads to loop entry/exit + # state through epsilon edges and w/o leaving rule. + for i in range(0, numCtxs): # for each stack context + returnStateNumber = config.context.getReturnState(i) + returnState = self.atn.states[returnStateNumber] + # all states must have single outgoing epsilon edge + if len(returnState.transitions) != 1 or not returnState.transitions[0].isEpsilon: + return False + + # Look for prefix op case like 'not expr', (' type ')' expr + returnStateTarget = returnState.transitions[0].target + if returnState.stateType == ATNState.BLOCK_END and returnStateTarget is p: + continue + + # Look for 'expr op expr' or case where expr's return state is block end + # of (...)* internal block; the block end points to loop back + # which points to p but we don't need to check that + if returnState is blockEndState: + continue + + # Look for ternary expr ? expr : expr. The return state points at block end, + # which points at loop entry state + if returnStateTarget is blockEndState: + continue + + # Look for complex prefix 'between expr and expr' case where 2nd expr's + # return state points at block end state of (...)* internal block + if returnStateTarget.stateType == ATNState.BLOCK_END \ + and len(returnStateTarget.transitions) == 1 \ + and returnStateTarget.transitions[0].isEpsilon \ + and returnStateTarget.transitions[0].target is p: + continue + + # anything else ain't conforming + return False + + return True + + + def getRuleName(self, index:int): + if self.parser is not None and index>=0: + return self.parser.ruleNames[index] + else: + return "" + + epsilonTargetMethods = dict() + epsilonTargetMethods[Transition.RULE] = lambda sim, config, t, collectPredicates, inContext, fullCtx, treatEofAsEpsilon: \ + sim.ruleTransition(config, t) + epsilonTargetMethods[Transition.PRECEDENCE] = lambda sim, config, t, collectPredicates, inContext, fullCtx, treatEofAsEpsilon: \ + sim.precedenceTransition(config, t, collectPredicates, inContext, fullCtx) + epsilonTargetMethods[Transition.PREDICATE] = lambda sim, config, t, collectPredicates, inContext, fullCtx, treatEofAsEpsilon: \ + sim.predTransition(config, t, collectPredicates, inContext, fullCtx) + epsilonTargetMethods[Transition.ACTION] = lambda sim, config, t, collectPredicates, inContext, fullCtx, treatEofAsEpsilon: \ + sim.actionTransition(config, t) + epsilonTargetMethods[Transition.EPSILON] = lambda sim, config, t, collectPredicates, inContext, fullCtx, treatEofAsEpsilon: \ + ATNConfig(state=t.target, config=config) + epsilonTargetMethods[Transition.ATOM] = lambda sim, config, t, collectPredicates, inContext, fullCtx, treatEofAsEpsilon: \ + ATNConfig(state=t.target, config=config) if treatEofAsEpsilon and t.matches(Token.EOF, 0, 1) else None + epsilonTargetMethods[Transition.RANGE] = lambda sim, config, t, collectPredicates, inContext, fullCtx, treatEofAsEpsilon: \ + ATNConfig(state=t.target, config=config) if treatEofAsEpsilon and t.matches(Token.EOF, 0, 1) else None + epsilonTargetMethods[Transition.SET] = lambda sim, config, t, collectPredicates, inContext, fullCtx, treatEofAsEpsilon: \ + ATNConfig(state=t.target, config=config) if treatEofAsEpsilon and t.matches(Token.EOF, 0, 1) else None + + def getEpsilonTarget(self, config:ATNConfig, t:Transition, collectPredicates:bool, inContext:bool, fullCtx:bool, treatEofAsEpsilon:bool): + m = self.epsilonTargetMethods.get(t.serializationType, None) + if m is None: + return None + else: + return m(self, config, t, collectPredicates, inContext, fullCtx, treatEofAsEpsilon) + + def actionTransition(self, config:ATNConfig, t:ActionTransition): + if ParserATNSimulator.debug: + print("ACTION edge " + str(t.ruleIndex) + ":" + str(t.actionIndex)) + return ATNConfig(state=t.target, config=config) + + def precedenceTransition(self, config:ATNConfig, pt:PrecedencePredicateTransition, collectPredicates:bool, inContext:bool, fullCtx:bool): + if ParserATNSimulator.debug: + print("PRED (collectPredicates=" + str(collectPredicates) + ") " + + str(pt.precedence) + ">=_p, ctx dependent=true") + if self.parser is not None: + print("context surrounding pred is " + str(self.parser.getRuleInvocationStack())) + + c = None + if collectPredicates and inContext: + if fullCtx: + # In full context mode, we can evaluate predicates on-the-fly + # during closure, which dramatically reduces the size of + # the config sets. It also obviates the need to test predicates + # later during conflict resolution. + currentPosition = self._input.index + self._input.seek(self._startIndex) + predSucceeds = pt.getPredicate().eval(self.parser, self._outerContext) + self._input.seek(currentPosition) + if predSucceeds: + c = ATNConfig(state=pt.target, config=config) # no pred context + else: + newSemCtx = andContext(config.semanticContext, pt.getPredicate()) + c = ATNConfig(state=pt.target, semantic=newSemCtx, config=config) + else: + c = ATNConfig(state=pt.target, config=config) + + if ParserATNSimulator.debug: + print("config from pred transition=" + str(c)) + return c + + def predTransition(self, config:ATNConfig, pt:PredicateTransition, collectPredicates:bool, inContext:bool, fullCtx:bool): + if ParserATNSimulator.debug: + print("PRED (collectPredicates=" + str(collectPredicates) + ") " + str(pt.ruleIndex) + + ":" + str(pt.predIndex) + ", ctx dependent=" + str(pt.isCtxDependent)) + if self.parser is not None: + print("context surrounding pred is " + str(self.parser.getRuleInvocationStack())) + + c = None + if collectPredicates and (not pt.isCtxDependent or (pt.isCtxDependent and inContext)): + if fullCtx: + # In full context mode, we can evaluate predicates on-the-fly + # during closure, which dramatically reduces the size of + # the config sets. It also obviates the need to test predicates + # later during conflict resolution. + currentPosition = self._input.index + self._input.seek(self._startIndex) + predSucceeds = pt.getPredicate().eval(self.parser, self._outerContext) + self._input.seek(currentPosition) + if predSucceeds: + c = ATNConfig(state=pt.target, config=config) # no pred context + else: + newSemCtx = andContext(config.semanticContext, pt.getPredicate()) + c = ATNConfig(state=pt.target, semantic=newSemCtx, config=config) + else: + c = ATNConfig(state=pt.target, config=config) + + if ParserATNSimulator.debug: + print("config from pred transition=" + str(c)) + return c + + def ruleTransition(self, config:ATNConfig, t:RuleTransition): + if ParserATNSimulator.debug: + print("CALL rule " + self.getRuleName(t.target.ruleIndex) + ", ctx=" + str(config.context)) + returnState = t.followState + newContext = SingletonPredictionContext.create(config.context, returnState.stateNumber) + return ATNConfig(state=t.target, context=newContext, config=config ) + + def getConflictingAlts(self, configs:ATNConfigSet): + altsets = PredictionMode.getConflictingAltSubsets(configs) + return PredictionMode.getAlts(altsets) + + # Sam pointed out a problem with the previous definition, v3, of + # ambiguous states. If we have another state associated with conflicting + # alternatives, we should keep going. For example, the following grammar + # + # s : (ID | ID ID?) ';' ; + # + # When the ATN simulation reaches the state before ';', it has a DFA + # state that looks like: [12|1|[], 6|2|[], 12|2|[]]. Naturally + # 12|1|[] and 12|2|[] conflict, but we cannot stop processing this node + # because alternative to has another way to continue, via [6|2|[]]. + # The key is that we have a single state that has config's only associated + # with a single alternative, 2, and crucially the state transitions + # among the configurations are all non-epsilon transitions. That means + # we don't consider any conflicts that include alternative 2. So, we + # ignore the conflict between alts 1 and 2. We ignore a set of + # conflicting alts when there is an intersection with an alternative + # associated with a single alt state in the state→config-list map. + # + # It's also the case that we might have two conflicting configurations but + # also a 3rd nonconflicting configuration for a different alternative: + # [1|1|[], 1|2|[], 8|3|[]]. This can come about from grammar: + # + # a : A | A | A B ; + # + # After matching input A, we reach the stop state for rule A, state 1. + # State 8 is the state right before B. Clearly alternatives 1 and 2 + # conflict and no amount of further lookahead will separate the two. + # However, alternative 3 will be able to continue and so we do not + # stop working on this state. In the previous example, we're concerned + # with states associated with the conflicting alternatives. Here alt + # 3 is not associated with the conflicting configs, but since we can continue + # looking for input reasonably, I don't declare the state done. We + # ignore a set of conflicting alts when we have an alternative + # that we still need to pursue. + # + + def getConflictingAltsOrUniqueAlt(self, configs:ATNConfigSet): + conflictingAlts = None + if configs.uniqueAlt!= ATN.INVALID_ALT_NUMBER: + conflictingAlts = set() + conflictingAlts.add(configs.uniqueAlt) + else: + conflictingAlts = configs.conflictingAlts + return conflictingAlts + + def getTokenName(self, t:int): + if t==Token.EOF: + return "EOF" + if self.parser is not None and \ + self.parser.literalNames is not None and \ + t < len(self.parser.literalNames): + return self.parser.literalNames[t] + "<" + str(t) + ">" + else: + return str(t) + + def getLookaheadName(self, input:TokenStream): + return self.getTokenName(input.LA(1)) + + # Used for debugging in adaptivePredict around execATN but I cut + # it out for clarity now that alg. works well. We can leave this + # "dead" code for a bit. + # + def dumpDeadEndConfigs(self, nvae:NoViableAltException): + print("dead end configs: ") + for c in nvae.getDeadEndConfigs(): + trans = "no edges" + if len(c.state.transitions)>0: + t = c.state.transitions[0] + if isinstance(t, AtomTransition): + trans = "Atom "+ self.getTokenName(t.label) + elif isinstance(t, SetTransition): + neg = isinstance(t, NotSetTransition) + trans = ("~" if neg else "")+"Set "+ str(t.set) + print(c.toString(self.parser, True) + ":" + trans, file=sys.stderr) + + def noViableAlt(self, input:TokenStream, outerContext:ParserRuleContext, configs:ATNConfigSet, startIndex:int): + return NoViableAltException(self.parser, input, input.get(startIndex), input.LT(1), configs, outerContext) + + def getUniqueAlt(self, configs:ATNConfigSet): + alt = ATN.INVALID_ALT_NUMBER + for c in configs: + if alt == ATN.INVALID_ALT_NUMBER: + alt = c.alt # found first alt + elif c.alt!=alt: + return ATN.INVALID_ALT_NUMBER + return alt + + # + # Add an edge to the DFA, if possible. This method calls + # {@link #addDFAState} to ensure the {@code to} state is present in the + # DFA. If {@code from} is {@code null}, or if {@code t} is outside the + # range of edges that can be represented in the DFA tables, this method + # returns without adding the edge to the DFA. + # + #

If {@code to} is {@code null}, this method returns {@code null}. + # Otherwise, this method returns the {@link DFAState} returned by calling + # {@link #addDFAState} for the {@code to} state.

+ # + # @param dfa The DFA + # @param from The source state for the edge + # @param t The input symbol + # @param to The target state for the edge + # + # @return If {@code to} is {@code null}, this method returns {@code null}; + # otherwise this method returns the result of calling {@link #addDFAState} + # on {@code to} + # + def addDFAEdge(self, dfa:DFA, from_:DFAState, t:int, to:DFAState): + if ParserATNSimulator.debug: + print("EDGE " + str(from_) + " -> " + str(to) + " upon " + self.getTokenName(t)) + + if to is None: + return None + + to = self.addDFAState(dfa, to) # used existing if possible not incoming + if from_ is None or t < -1 or t > self.atn.maxTokenType: + return to + + if from_.edges is None: + from_.edges = [None] * (self.atn.maxTokenType + 2) + from_.edges[t+1] = to # connect + + if ParserATNSimulator.debug: + names = None if self.parser is None else self.parser.literalNames + print("DFA=\n" + dfa.toString(names)) + + return to + + # + # Add state {@code D} to the DFA if it is not already present, and return + # the actual instance stored in the DFA. If a state equivalent to {@code D} + # is already in the DFA, the existing state is returned. Otherwise this + # method returns {@code D} after adding it to the DFA. + # + #

If {@code D} is {@link #ERROR}, this method returns {@link #ERROR} and + # does not change the DFA.

+ # + # @param dfa The dfa + # @param D The DFA state to add + # @return The state stored in the DFA. This will be either the existing + # state if {@code D} is already in the DFA, or {@code D} itself if the + # state was not already present. + # + def addDFAState(self, dfa:DFA, D:DFAState): + if D is self.ERROR: + return D + + + existing = dfa.states.get(D, None) + if existing is not None: + return existing + + D.stateNumber = len(dfa.states) + if not D.configs.readonly: + D.configs.optimizeConfigs(self) + D.configs.setReadonly(True) + dfa.states[D] = D + if ParserATNSimulator.debug: + print("adding new DFA state: " + str(D)) + return D + + def reportAttemptingFullContext(self, dfa:DFA, conflictingAlts:set, configs:ATNConfigSet, startIndex:int, stopIndex:int): + if ParserATNSimulator.debug or ParserATNSimulator.retry_debug: + print("reportAttemptingFullContext decision=" + str(dfa.decision) + ":" + str(configs) + + ", input=" + self.parser.getTokenStream().getText(startIndex, stopIndex)) + if self.parser is not None: + self.parser.getErrorListenerDispatch().reportAttemptingFullContext(self.parser, dfa, startIndex, stopIndex, conflictingAlts, configs) + + def reportContextSensitivity(self, dfa:DFA, prediction:int, configs:ATNConfigSet, startIndex:int, stopIndex:int): + if ParserATNSimulator.debug or ParserATNSimulator.retry_debug: + print("reportContextSensitivity decision=" + str(dfa.decision) + ":" + str(configs) + + ", input=" + self.parser.getTokenStream().getText(startIndex, stopIndex)) + if self.parser is not None: + self.parser.getErrorListenerDispatch().reportContextSensitivity(self.parser, dfa, startIndex, stopIndex, prediction, configs) + + # If context sensitive parsing, we know it's ambiguity not conflict# + def reportAmbiguity(self, dfa:DFA, D:DFAState, startIndex:int, stopIndex:int, + exact:bool, ambigAlts:set, configs:ATNConfigSet ): + if ParserATNSimulator.debug or ParserATNSimulator.retry_debug: +# ParserATNPathFinder finder = new ParserATNPathFinder(parser, atn); +# int i = 1; +# for (Transition t : dfa.atnStartState.transitions) { +# print("ALT "+i+"="); +# print(startIndex+".."+stopIndex+", len(input)="+parser.getInputStream().size()); +# TraceTree path = finder.trace(t.target, parser.getContext(), (TokenStream)parser.getInputStream(), +# startIndex, stopIndex); +# if ( path!=null ) { +# print("path = "+path.toStringTree()); +# for (TraceTree leaf : path.leaves) { +# List states = path.getPathToNode(leaf); +# print("states="+states); +# } +# } +# i++; +# } + print("reportAmbiguity " + str(ambigAlts) + ":" + str(configs) + + ", input=" + self.parser.getTokenStream().getText(startIndex, stopIndex)) + if self.parser is not None: + self.parser.getErrorListenerDispatch().reportAmbiguity(self.parser, dfa, startIndex, stopIndex, exact, ambigAlts, configs) diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/PredictionMode.py b/.venv/lib/python3.13/site-packages/antlr4/atn/PredictionMode.py new file mode 100644 index 0000000000000000000000000000000000000000..8e5c73bb47f329d519f4e574ba3a36fc6c4ac29f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/atn/PredictionMode.py @@ -0,0 +1,499 @@ +# +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +# +# +# This enumeration defines the prediction modes available in ANTLR 4 along with +# utility methods for analyzing configuration sets for conflicts and/or +# ambiguities. + + +from enum import Enum +from antlr4.atn.ATN import ATN +from antlr4.atn.ATNConfig import ATNConfig +from antlr4.atn.ATNConfigSet import ATNConfigSet +from antlr4.atn.ATNState import RuleStopState +from antlr4.atn.SemanticContext import SemanticContext + +PredictionMode = None + +class PredictionMode(Enum): + # + # The SLL(*) prediction mode. This prediction mode ignores the current + # parser context when making predictions. This is the fastest prediction + # mode, and provides correct results for many grammars. This prediction + # mode is more powerful than the prediction mode provided by ANTLR 3, but + # may result in syntax errors for grammar and input combinations which are + # not SLL. + # + #

+ # When using this prediction mode, the parser will either return a correct + # parse tree (i.e. the same parse tree that would be returned with the + # {@link #LL} prediction mode), or it will report a syntax error. If a + # syntax error is encountered when using the {@link #SLL} prediction mode, + # it may be due to either an actual syntax error in the input or indicate + # that the particular combination of grammar and input requires the more + # powerful {@link #LL} prediction abilities to complete successfully.

+ # + #

+ # This prediction mode does not provide any guarantees for prediction + # behavior for syntactically-incorrect inputs.

+ # + SLL = 0 + # + # The LL(*) prediction mode. This prediction mode allows the current parser + # context to be used for resolving SLL conflicts that occur during + # prediction. This is the fastest prediction mode that guarantees correct + # parse results for all combinations of grammars with syntactically correct + # inputs. + # + #

+ # When using this prediction mode, the parser will make correct decisions + # for all syntactically-correct grammar and input combinations. However, in + # cases where the grammar is truly ambiguous this prediction mode might not + # report a precise answer for exactly which alternatives are + # ambiguous.

+ # + #

+ # This prediction mode does not provide any guarantees for prediction + # behavior for syntactically-incorrect inputs.

+ # + LL = 1 + # + # The LL(*) prediction mode with exact ambiguity detection. In addition to + # the correctness guarantees provided by the {@link #LL} prediction mode, + # this prediction mode instructs the prediction algorithm to determine the + # complete and exact set of ambiguous alternatives for every ambiguous + # decision encountered while parsing. + # + #

+ # This prediction mode may be used for diagnosing ambiguities during + # grammar development. Due to the performance overhead of calculating sets + # of ambiguous alternatives, this prediction mode should be avoided when + # the exact results are not necessary.

+ # + #

+ # This prediction mode does not provide any guarantees for prediction + # behavior for syntactically-incorrect inputs.

+ # + LL_EXACT_AMBIG_DETECTION = 2 + + + # + # Computes the SLL prediction termination condition. + # + #

+ # This method computes the SLL prediction termination condition for both of + # the following cases.

+ # + # + # + #

COMBINED SLL+LL PARSING

+ # + #

When LL-fallback is enabled upon SLL conflict, correct predictions are + # ensured regardless of how the termination condition is computed by this + # method. Due to the substantially higher cost of LL prediction, the + # prediction should only fall back to LL when the additional lookahead + # cannot lead to a unique SLL prediction.

+ # + #

Assuming combined SLL+LL parsing, an SLL configuration set with only + # conflicting subsets should fall back to full LL, even if the + # configuration sets don't resolve to the same alternative (e.g. + # {@code {1,2}} and {@code {3,4}}. If there is at least one non-conflicting + # configuration, SLL could continue with the hopes that more lookahead will + # resolve via one of those non-conflicting configurations.

+ # + #

Here's the prediction termination rule them: SLL (for SLL+LL parsing) + # stops when it sees only conflicting configuration subsets. In contrast, + # full LL keeps going when there is uncertainty.

+ # + #

HEURISTIC

+ # + #

As a heuristic, we stop prediction when we see any conflicting subset + # unless we see a state that only has one alternative associated with it. + # The single-alt-state thing lets prediction continue upon rules like + # (otherwise, it would admit defeat too soon):

+ # + #

{@code [12|1|[], 6|2|[], 12|2|[]]. s : (ID | ID ID?) ';' ;}

+ # + #

When the ATN simulation reaches the state before {@code ';'}, it has a + # DFA state that looks like: {@code [12|1|[], 6|2|[], 12|2|[]]}. Naturally + # {@code 12|1|[]} and {@code 12|2|[]} conflict, but we cannot stop + # processing this node because alternative to has another way to continue, + # via {@code [6|2|[]]}.

+ # + #

It also let's us continue for this rule:

+ # + #

{@code [1|1|[], 1|2|[], 8|3|[]] a : A | A | A B ;}

+ # + #

After matching input A, we reach the stop state for rule A, state 1. + # State 8 is the state right before B. Clearly alternatives 1 and 2 + # conflict and no amount of further lookahead will separate the two. + # However, alternative 3 will be able to continue and so we do not stop + # working on this state. In the previous example, we're concerned with + # states associated with the conflicting alternatives. Here alt 3 is not + # associated with the conflicting configs, but since we can continue + # looking for input reasonably, don't declare the state done.

+ # + #

PURE SLL PARSING

+ # + #

To handle pure SLL parsing, all we have to do is make sure that we + # combine stack contexts for configurations that differ only by semantic + # predicate. From there, we can do the usual SLL termination heuristic.

+ # + #

PREDICATES IN SLL+LL PARSING

+ # + #

SLL decisions don't evaluate predicates until after they reach DFA stop + # states because they need to create the DFA cache that works in all + # semantic situations. In contrast, full LL evaluates predicates collected + # during start state computation so it can ignore predicates thereafter. + # This means that SLL termination detection can totally ignore semantic + # predicates.

+ # + #

Implementation-wise, {@link ATNConfigSet} combines stack contexts but not + # semantic predicate contexts so we might see two configurations like the + # following.

+ # + #

{@code (s, 1, x, {}), (s, 1, x', {p})}

+ # + #

Before testing these configurations against others, we have to merge + # {@code x} and {@code x'} (without modifying the existing configurations). + # For example, we test {@code (x+x')==x''} when looking for conflicts in + # the following configurations.

+ # + #

{@code (s, 1, x, {}), (s, 1, x', {p}), (s, 2, x'', {})}

+ # + #

If the configuration set has predicates (as indicated by + # {@link ATNConfigSet#hasSemanticContext}), this algorithm makes a copy of + # the configurations to strip out all of the predicates so that a standard + # {@link ATNConfigSet} will merge everything ignoring predicates.

+ # + @classmethod + def hasSLLConflictTerminatingPrediction(cls, mode:PredictionMode, configs:ATNConfigSet): + # Configs in rule stop states indicate reaching the end of the decision + # rule (local context) or end of start rule (full context). If all + # configs meet this condition, then none of the configurations is able + # to match additional input so we terminate prediction. + # + if cls.allConfigsInRuleStopStates(configs): + return True + + # pure SLL mode parsing + if mode == PredictionMode.SLL: + # Don't bother with combining configs from different semantic + # contexts if we can fail over to full LL; costs more time + # since we'll often fail over anyway. + if configs.hasSemanticContext: + # dup configs, tossing out semantic predicates + dup = ATNConfigSet() + for c in configs: + c = ATNConfig(config=c, semantic=SemanticContext.NONE) + dup.add(c) + configs = dup + # now we have combined contexts for configs with dissimilar preds + + # pure SLL or combined SLL+LL mode parsing + altsets = cls.getConflictingAltSubsets(configs) + return cls.hasConflictingAltSet(altsets) and not cls.hasStateAssociatedWithOneAlt(configs) + + # Checks if any configuration in {@code configs} is in a + # {@link RuleStopState}. Configurations meeting this condition have reached + # the end of the decision rule (local context) or end of start rule (full + # context). + # + # @param configs the configuration set to test + # @return {@code true} if any configuration in {@code configs} is in a + # {@link RuleStopState}, otherwise {@code false} + @classmethod + def hasConfigInRuleStopState(cls, configs:ATNConfigSet): + return any(isinstance(cfg.state, RuleStopState) for cfg in configs) + + # Checks if all configurations in {@code configs} are in a + # {@link RuleStopState}. Configurations meeting this condition have reached + # the end of the decision rule (local context) or end of start rule (full + # context). + # + # @param configs the configuration set to test + # @return {@code true} if all configurations in {@code configs} are in a + # {@link RuleStopState}, otherwise {@code false} + @classmethod + def allConfigsInRuleStopStates(cls, configs:ATNConfigSet): + return all(isinstance(cfg.state, RuleStopState) for cfg in configs) + + # + # Full LL prediction termination. + # + #

Can we stop looking ahead during ATN simulation or is there some + # uncertainty as to which alternative we will ultimately pick, after + # consuming more input? Even if there are partial conflicts, we might know + # that everything is going to resolve to the same minimum alternative. That + # means we can stop since no more lookahead will change that fact. On the + # other hand, there might be multiple conflicts that resolve to different + # minimums. That means we need more look ahead to decide which of those + # alternatives we should predict.

+ # + #

The basic idea is to split the set of configurations {@code C}, into + # conflicting subsets {@code (s, _, ctx, _)} and singleton subsets with + # non-conflicting configurations. Two configurations conflict if they have + # identical {@link ATNConfig#state} and {@link ATNConfig#context} values + # but different {@link ATNConfig#alt} value, e.g. {@code (s, i, ctx, _)} + # and {@code (s, j, ctx, _)} for {@code i!=j}.

+ # + #

Reduce these configuration subsets to the set of possible alternatives. + # You can compute the alternative subsets in one pass as follows:

+ # + #

{@code A_s,ctx = {i | (s, i, ctx, _)}} for each configuration in + # {@code C} holding {@code s} and {@code ctx} fixed.

+ # + #

Or in pseudo-code, for each configuration {@code c} in {@code C}:

+ # + #
+    # map[c] U= c.{@link ATNConfig#alt alt} # map hash/equals uses s and x, not
+    # alt and not pred
+    # 
+ # + #

The values in {@code map} are the set of {@code A_s,ctx} sets.

+ # + #

If {@code |A_s,ctx|=1} then there is no conflict associated with + # {@code s} and {@code ctx}.

+ # + #

Reduce the subsets to singletons by choosing a minimum of each subset. If + # the union of these alternative subsets is a singleton, then no amount of + # more lookahead will help us. We will always pick that alternative. If, + # however, there is more than one alternative, then we are uncertain which + # alternative to predict and must continue looking for resolution. We may + # or may not discover an ambiguity in the future, even if there are no + # conflicting subsets this round.

+ # + #

The biggest sin is to terminate early because it means we've made a + # decision but were uncertain as to the eventual outcome. We haven't used + # enough lookahead. On the other hand, announcing a conflict too late is no + # big deal; you will still have the conflict. It's just inefficient. It + # might even look until the end of file.

+ # + #

No special consideration for semantic predicates is required because + # predicates are evaluated on-the-fly for full LL prediction, ensuring that + # no configuration contains a semantic context during the termination + # check.

+ # + #

CONFLICTING CONFIGS

+ # + #

Two configurations {@code (s, i, x)} and {@code (s, j, x')}, conflict + # when {@code i!=j} but {@code x=x'}. Because we merge all + # {@code (s, i, _)} configurations together, that means that there are at + # most {@code n} configurations associated with state {@code s} for + # {@code n} possible alternatives in the decision. The merged stacks + # complicate the comparison of configuration contexts {@code x} and + # {@code x'}. Sam checks to see if one is a subset of the other by calling + # merge and checking to see if the merged result is either {@code x} or + # {@code x'}. If the {@code x} associated with lowest alternative {@code i} + # is the superset, then {@code i} is the only possible prediction since the + # others resolve to {@code min(i)} as well. However, if {@code x} is + # associated with {@code j>i} then at least one stack configuration for + # {@code j} is not in conflict with alternative {@code i}. The algorithm + # should keep going, looking for more lookahead due to the uncertainty.

+ # + #

For simplicity, I'm doing a equality check between {@code x} and + # {@code x'} that lets the algorithm continue to consume lookahead longer + # than necessary. The reason I like the equality is of course the + # simplicity but also because that is the test you need to detect the + # alternatives that are actually in conflict.

+ # + #

CONTINUE/STOP RULE

+ # + #

Continue if union of resolved alternative sets from non-conflicting and + # conflicting alternative subsets has more than one alternative. We are + # uncertain about which alternative to predict.

+ # + #

The complete set of alternatives, {@code [i for (_,i,_)]}, tells us which + # alternatives are still in the running for the amount of input we've + # consumed at this point. The conflicting sets let us to strip away + # configurations that won't lead to more states because we resolve + # conflicts to the configuration with a minimum alternate for the + # conflicting set.

+ # + #

CASES

+ # + # + # + #

EXACT AMBIGUITY DETECTION

+ # + #

If all states report the same conflicting set of alternatives, then we + # know we have the exact ambiguity set.

+ # + #

|A_i|>1 and + # A_i = A_j for all i, j.

+ # + #

In other words, we continue examining lookahead until all {@code A_i} + # have more than one alternative and all {@code A_i} are the same. If + # {@code A={{1,2}, {1,3}}}, then regular LL prediction would terminate + # because the resolved set is {@code {1}}. To determine what the real + # ambiguity is, we have to know whether the ambiguity is between one and + # two or one and three so we keep going. We can only stop prediction when + # we need exact ambiguity detection when the sets look like + # {@code A={{1,2}}} or {@code {{1,2},{1,2}}}, etc...

+ # + @classmethod + def resolvesToJustOneViableAlt(cls, altsets:list): + return cls.getSingleViableAlt(altsets) + + # + # Determines if every alternative subset in {@code altsets} contains more + # than one alternative. + # + # @param altsets a collection of alternative subsets + # @return {@code true} if every {@link BitSet} in {@code altsets} has + # {@link BitSet#cardinality cardinality} > 1, otherwise {@code false} + # + @classmethod + def allSubsetsConflict(cls, altsets:list): + return not cls.hasNonConflictingAltSet(altsets) + + # + # Determines if any single alternative subset in {@code altsets} contains + # exactly one alternative. + # + # @param altsets a collection of alternative subsets + # @return {@code true} if {@code altsets} contains a {@link BitSet} with + # {@link BitSet#cardinality cardinality} 1, otherwise {@code false} + # + @classmethod + def hasNonConflictingAltSet(cls, altsets:list): + return any(len(alts) == 1 for alts in altsets) + + # + # Determines if any single alternative subset in {@code altsets} contains + # more than one alternative. + # + # @param altsets a collection of alternative subsets + # @return {@code true} if {@code altsets} contains a {@link BitSet} with + # {@link BitSet#cardinality cardinality} > 1, otherwise {@code false} + # + @classmethod + def hasConflictingAltSet(cls, altsets:list): + return any(len(alts) > 1 for alts in altsets) + + # + # Determines if every alternative subset in {@code altsets} is equivalent. + # + # @param altsets a collection of alternative subsets + # @return {@code true} if every member of {@code altsets} is equal to the + # others, otherwise {@code false} + # + @classmethod + def allSubsetsEqual(cls, altsets:list): + if not altsets: + return True + first = next(iter(altsets)) + return all(alts == first for alts in iter(altsets)) + + # + # Returns the unique alternative predicted by all alternative subsets in + # {@code altsets}. If no such alternative exists, this method returns + # {@link ATN#INVALID_ALT_NUMBER}. + # + # @param altsets a collection of alternative subsets + # + @classmethod + def getUniqueAlt(cls, altsets:list): + all = cls.getAlts(altsets) + if len(all)==1: + return next(iter(all)) + return ATN.INVALID_ALT_NUMBER + + # Gets the complete set of represented alternatives for a collection of + # alternative subsets. This method returns the union of each {@link BitSet} + # in {@code altsets}. + # + # @param altsets a collection of alternative subsets + # @return the set of represented alternatives in {@code altsets} + # + @classmethod + def getAlts(cls, altsets:list): + return set.union(*altsets) + + # + # This function gets the conflicting alt subsets from a configuration set. + # For each configuration {@code c} in {@code configs}: + # + #
+    # map[c] U= c.{@link ATNConfig#alt alt} # map hash/equals uses s and x, not
+    # alt and not pred
+    # 
+ # + @classmethod + def getConflictingAltSubsets(cls, configs:ATNConfigSet): + configToAlts = dict() + for c in configs: + h = hash((c.state.stateNumber, c.context)) + alts = configToAlts.get(h, None) + if alts is None: + alts = set() + configToAlts[h] = alts + alts.add(c.alt) + return configToAlts.values() + + # + # Get a map from state to alt subset from a configuration set. For each + # configuration {@code c} in {@code configs}: + # + #
+    # map[c.{@link ATNConfig#state state}] U= c.{@link ATNConfig#alt alt}
+    # 
+ # + @classmethod + def getStateToAltMap(cls, configs:ATNConfigSet): + m = dict() + for c in configs: + alts = m.get(c.state, None) + if alts is None: + alts = set() + m[c.state] = alts + alts.add(c.alt) + return m + + @classmethod + def hasStateAssociatedWithOneAlt(cls, configs:ATNConfigSet): + return any(len(alts) == 1 for alts in cls.getStateToAltMap(configs).values()) + + @classmethod + def getSingleViableAlt(cls, altsets:list): + viableAlts = set() + for alts in altsets: + minAlt = min(alts) + viableAlts.add(minAlt) + if len(viableAlts)>1 : # more than 1 viable alt + return ATN.INVALID_ALT_NUMBER + return min(viableAlts) diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/SemanticContext.py b/.venv/lib/python3.13/site-packages/antlr4/atn/SemanticContext.py new file mode 100644 index 0000000000000000000000000000000000000000..8f4dc31088d35b73304432c46c54e31c1ab92700 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/atn/SemanticContext.py @@ -0,0 +1,323 @@ +# +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +# + +# A tree structure used to record the semantic context in which +# an ATN configuration is valid. It's either a single predicate, +# a conjunction {@code p1&&p2}, or a sum of products {@code p1||p2}. +# +#

I have scoped the {@link AND}, {@link OR}, and {@link Predicate} subclasses of +# {@link SemanticContext} within the scope of this outer class.

+# +from antlr4.Recognizer import Recognizer +from antlr4.RuleContext import RuleContext +from io import StringIO + + +class SemanticContext(object): + # + # The default {@link SemanticContext}, which is semantically equivalent to + # a predicate of the form {@code {true}?}. + # + NONE = None + + # + # For context independent predicates, we evaluate them without a local + # context (i.e., null context). That way, we can evaluate them without + # having to create proper rule-specific context during prediction (as + # opposed to the parser, which creates them naturally). In a practical + # sense, this avoids a cast exception from RuleContext to myruleContext. + # + #

For context dependent predicates, we must pass in a local context so that + # references such as $arg evaluate properly as _localctx.arg. We only + # capture context dependent predicates in the context in which we begin + # prediction, so we passed in the outer context here in case of context + # dependent predicate evaluation.

+ # + def eval(self, parser:Recognizer , outerContext:RuleContext ): + pass + + # + # Evaluate the precedence predicates for the context and reduce the result. + # + # @param parser The parser instance. + # @param outerContext The current parser context object. + # @return The simplified semantic context after precedence predicates are + # evaluated, which will be one of the following values. + # + # + def evalPrecedence(self, parser:Recognizer, outerContext:RuleContext): + return self + +# need forward declaration +AND = None + +def andContext(a:SemanticContext, b:SemanticContext): + if a is None or a is SemanticContext.NONE: + return b + if b is None or b is SemanticContext.NONE: + return a + result = AND(a, b) + if len(result.opnds) == 1: + return result.opnds[0] + else: + return result + +# need forward declaration +OR = None + +def orContext(a:SemanticContext, b:SemanticContext): + if a is None: + return b + if b is None: + return a + if a is SemanticContext.NONE or b is SemanticContext.NONE: + return SemanticContext.NONE + result = OR(a, b) + if len(result.opnds) == 1: + return result.opnds[0] + else: + return result + +def filterPrecedencePredicates(collection:set): + return [context for context in collection if isinstance(context, PrecedencePredicate)] + + +class Predicate(SemanticContext): + __slots__ = ('ruleIndex', 'predIndex', 'isCtxDependent') + + def __init__(self, ruleIndex:int=-1, predIndex:int=-1, isCtxDependent:bool=False): + self.ruleIndex = ruleIndex + self.predIndex = predIndex + self.isCtxDependent = isCtxDependent # e.g., $i ref in pred + + def eval(self, parser:Recognizer , outerContext:RuleContext ): + localctx = outerContext if self.isCtxDependent else None + return parser.sempred(localctx, self.ruleIndex, self.predIndex) + + def __hash__(self): + return hash((self.ruleIndex, self.predIndex, self.isCtxDependent)) + + def __eq__(self, other): + if self is other: + return True + elif not isinstance(other, Predicate): + return False + return self.ruleIndex == other.ruleIndex and \ + self.predIndex == other.predIndex and \ + self.isCtxDependent == other.isCtxDependent + + def __str__(self): + return "{" + str(self.ruleIndex) + ":" + str(self.predIndex) + "}?" + + +class PrecedencePredicate(SemanticContext): + + def __init__(self, precedence:int=0): + self.precedence = precedence + + def eval(self, parser:Recognizer , outerContext:RuleContext ): + return parser.precpred(outerContext, self.precedence) + + def evalPrecedence(self, parser:Recognizer, outerContext:RuleContext): + if parser.precpred(outerContext, self.precedence): + return SemanticContext.NONE + else: + return None + + def __lt__(self, other): + return self.precedence < other.precedence + + def __hash__(self): + return 31 + + def __eq__(self, other): + if self is other: + return True + elif not isinstance(other, PrecedencePredicate): + return False + else: + return self.precedence == other.precedence + +# A semantic context which is true whenever none of the contained contexts +# is false. +del AND +class AND(SemanticContext): + __slots__ = 'opnds' + + def __init__(self, a:SemanticContext, b:SemanticContext): + operands = set() + if isinstance( a, AND ): + operands.update(a.opnds) + else: + operands.add(a) + if isinstance( b, AND ): + operands.update(b.opnds) + else: + operands.add(b) + + precedencePredicates = filterPrecedencePredicates(operands) + if len(precedencePredicates)>0: + # interested in the transition with the lowest precedence + reduced = min(precedencePredicates) + operands.add(reduced) + + self.opnds = list(operands) + + def __eq__(self, other): + if self is other: + return True + elif not isinstance(other, AND): + return False + else: + return self.opnds == other.opnds + + def __hash__(self): + h = 0 + for o in self.opnds: + h = hash((h, o)) + return hash((h, "AND")) + + # + # {@inheritDoc} + # + #

+ # The evaluation of predicates by this context is short-circuiting, but + # unordered.

+ # + def eval(self, parser:Recognizer, outerContext:RuleContext): + return all(opnd.eval(parser, outerContext) for opnd in self.opnds) + + def evalPrecedence(self, parser:Recognizer, outerContext:RuleContext): + differs = False + operands = [] + for context in self.opnds: + evaluated = context.evalPrecedence(parser, outerContext) + differs |= evaluated is not context + if evaluated is None: + # The AND context is false if any element is false + return None + elif evaluated is not SemanticContext.NONE: + # Reduce the result by skipping true elements + operands.append(evaluated) + + if not differs: + return self + + if len(operands)==0: + # all elements were true, so the AND context is true + return SemanticContext.NONE + + result = None + for o in operands: + result = o if result is None else andContext(result, o) + + return result + + def __str__(self): + with StringIO() as buf: + first = True + for o in self.opnds: + if not first: + buf.write("&&") + buf.write(str(o)) + first = False + return buf.getvalue() + +# +# A semantic context which is true whenever at least one of the contained +# contexts is true. +del OR +class OR (SemanticContext): + __slots__ = 'opnds' + + def __init__(self, a:SemanticContext, b:SemanticContext): + operands = set() + if isinstance( a, OR ): + operands.update(a.opnds) + else: + operands.add(a) + if isinstance( b, OR ): + operands.update(b.opnds) + else: + operands.add(b) + + precedencePredicates = filterPrecedencePredicates(operands) + if len(precedencePredicates)>0: + # interested in the transition with the highest precedence + s = sorted(precedencePredicates) + reduced = s[-1] + operands.add(reduced) + + self.opnds = list(operands) + + def __eq__(self, other): + if self is other: + return True + elif not isinstance(other, OR): + return False + else: + return self.opnds == other.opnds + + def __hash__(self): + h = 0 + for o in self.opnds: + h = hash((h, o)) + return hash((h, "OR")) + + #

+ # The evaluation of predicates by this context is short-circuiting, but + # unordered.

+ # + def eval(self, parser:Recognizer, outerContext:RuleContext): + return any(opnd.eval(parser, outerContext) for opnd in self.opnds) + + def evalPrecedence(self, parser:Recognizer, outerContext:RuleContext): + differs = False + operands = [] + for context in self.opnds: + evaluated = context.evalPrecedence(parser, outerContext) + differs |= evaluated is not context + if evaluated is SemanticContext.NONE: + # The OR context is true if any element is true + return SemanticContext.NONE + elif evaluated is not None: + # Reduce the result by skipping false elements + operands.append(evaluated) + + if not differs: + return self + + if len(operands)==0: + # all elements were false, so the OR context is false + return None + + result = None + for o in operands: + result = o if result is None else orContext(result, o) + + return result + + def __str__(self): + with StringIO() as buf: + first = True + for o in self.opnds: + if not first: + buf.write("||") + buf.write(str(o)) + first = False + return buf.getvalue() + + +SemanticContext.NONE = Predicate() diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/Transition.py b/.venv/lib/python3.13/site-packages/antlr4/atn/Transition.py new file mode 100644 index 0000000000000000000000000000000000000000..2e4c9971763c34dbb2690660434c5c99d44193e1 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/atn/Transition.py @@ -0,0 +1,268 @@ +# +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +# + +# An ATN transition between any two ATN states. Subclasses define +# atom, set, epsilon, action, predicate, rule transitions. +# +#

This is a one way link. It emanates from a state (usually via a list of +# transitions) and has a target state.

+# +#

Since we never have to change the ATN transitions once we construct it, +# we can fix these transitions as specific classes. The DFA transitions +# on the other hand need to update the labels as it adds transitions to +# the states. We'll use the term Edge for the DFA to distinguish them from +# ATN transitions.

+# +from antlr4.IntervalSet import IntervalSet +from antlr4.Token import Token + +# need forward declarations +from antlr4.atn.SemanticContext import Predicate, PrecedencePredicate + +ATNState = None +RuleStartState = None + +class Transition (object): + __slots__ = ('target','isEpsilon','label') + + # constants for serialization + EPSILON = 1 + RANGE = 2 + RULE = 3 + PREDICATE = 4 # e.g., {isType(input.LT(1))}? + ATOM = 5 + ACTION = 6 + SET = 7 # ~(A|B) or ~atom, wildcard, which convert to next 2 + NOT_SET = 8 + WILDCARD = 9 + PRECEDENCE = 10 + + serializationNames = [ + "INVALID", + "EPSILON", + "RANGE", + "RULE", + "PREDICATE", + "ATOM", + "ACTION", + "SET", + "NOT_SET", + "WILDCARD", + "PRECEDENCE" + ] + + serializationTypes = dict() + + def __init__(self, target:ATNState): + # The target of this transition. + if target is None: + raise Exception("target cannot be null.") + self.target = target + # Are we epsilon, action, sempred? + self.isEpsilon = False + self.label = None + + +# TODO: make all transitions sets? no, should remove set edges +class AtomTransition(Transition): + __slots__ = ('label_', 'serializationType') + + def __init__(self, target:ATNState, label:int): + super().__init__(target) + self.label_ = label # The token type or character value; or, signifies special label. + self.label = self.makeLabel() + self.serializationType = self.ATOM + + def makeLabel(self): + s = IntervalSet() + s.addOne(self.label_) + return s + + def matches( self, symbol:int, minVocabSymbol:int, maxVocabSymbol:int): + return self.label_ == symbol + + def __str__(self): + return str(self.label_) + +class RuleTransition(Transition): + __slots__ = ('ruleIndex', 'precedence', 'followState', 'serializationType') + + def __init__(self, ruleStart:RuleStartState, ruleIndex:int, precedence:int, followState:ATNState): + super().__init__(ruleStart) + self.ruleIndex = ruleIndex # ptr to the rule definition object for this rule ref + self.precedence = precedence + self.followState = followState # what node to begin computations following ref to rule + self.serializationType = self.RULE + self.isEpsilon = True + + def matches( self, symbol:int, minVocabSymbol:int, maxVocabSymbol:int): + return False + + +class EpsilonTransition(Transition): + __slots__ = ('serializationType', 'outermostPrecedenceReturn') + + def __init__(self, target, outermostPrecedenceReturn=-1): + super(EpsilonTransition, self).__init__(target) + self.serializationType = self.EPSILON + self.isEpsilon = True + self.outermostPrecedenceReturn = outermostPrecedenceReturn + + def matches( self, symbol:int, minVocabSymbol:int, maxVocabSymbol:int): + return False + + def __str__(self): + return "epsilon" + +class RangeTransition(Transition): + __slots__ = ('serializationType', 'start', 'stop') + + def __init__(self, target:ATNState, start:int, stop:int): + super().__init__(target) + self.serializationType = self.RANGE + self.start = start + self.stop = stop + self.label = self.makeLabel() + + def makeLabel(self): + s = IntervalSet() + s.addRange(range(self.start, self.stop + 1)) + return s + + def matches( self, symbol:int, minVocabSymbol:int, maxVocabSymbol:int): + return symbol >= self.start and symbol <= self.stop + + def __str__(self): + return "'" + chr(self.start) + "'..'" + chr(self.stop) + "'" + +class AbstractPredicateTransition(Transition): + + def __init__(self, target:ATNState): + super().__init__(target) + + +class PredicateTransition(AbstractPredicateTransition): + __slots__ = ('serializationType', 'ruleIndex', 'predIndex', 'isCtxDependent') + + def __init__(self, target:ATNState, ruleIndex:int, predIndex:int, isCtxDependent:bool): + super().__init__(target) + self.serializationType = self.PREDICATE + self.ruleIndex = ruleIndex + self.predIndex = predIndex + self.isCtxDependent = isCtxDependent # e.g., $i ref in pred + self.isEpsilon = True + + def matches( self, symbol:int, minVocabSymbol:int, maxVocabSymbol:int): + return False + + def getPredicate(self): + return Predicate(self.ruleIndex, self.predIndex, self.isCtxDependent) + + def __str__(self): + return "pred_" + str(self.ruleIndex) + ":" + str(self.predIndex) + +class ActionTransition(Transition): + __slots__ = ('serializationType', 'ruleIndex', 'actionIndex', 'isCtxDependent') + + def __init__(self, target:ATNState, ruleIndex:int, actionIndex:int=-1, isCtxDependent:bool=False): + super().__init__(target) + self.serializationType = self.ACTION + self.ruleIndex = ruleIndex + self.actionIndex = actionIndex + self.isCtxDependent = isCtxDependent # e.g., $i ref in pred + self.isEpsilon = True + + def matches( self, symbol:int, minVocabSymbol:int, maxVocabSymbol:int): + return False + + def __str__(self): + return "action_"+self.ruleIndex+":"+self.actionIndex + +# A transition containing a set of values. +class SetTransition(Transition): + __slots__ = 'serializationType' + + def __init__(self, target:ATNState, set:IntervalSet): + super().__init__(target) + self.serializationType = self.SET + if set is not None: + self.label = set + else: + self.label = IntervalSet() + self.label.addRange(range(Token.INVALID_TYPE, Token.INVALID_TYPE + 1)) + + def matches( self, symbol:int, minVocabSymbol:int, maxVocabSymbol:int): + return symbol in self.label + + def __str__(self): + return str(self.label) + +class NotSetTransition(SetTransition): + + def __init__(self, target:ATNState, set:IntervalSet): + super().__init__(target, set) + self.serializationType = self.NOT_SET + + def matches( self, symbol:int, minVocabSymbol:int, maxVocabSymbol:int): + return symbol >= minVocabSymbol \ + and symbol <= maxVocabSymbol \ + and not super(type(self), self).matches(symbol, minVocabSymbol, maxVocabSymbol) + + def __str__(self): + return '~' + super(type(self), self).__str__() + + +class WildcardTransition(Transition): + __slots__ = 'serializationType' + + def __init__(self, target:ATNState): + super().__init__(target) + self.serializationType = self.WILDCARD + + def matches( self, symbol:int, minVocabSymbol:int, maxVocabSymbol:int): + return symbol >= minVocabSymbol and symbol <= maxVocabSymbol + + def __str__(self): + return "." + + +class PrecedencePredicateTransition(AbstractPredicateTransition): + __slots__ = ('serializationType', 'precedence') + + def __init__(self, target:ATNState, precedence:int): + super().__init__(target) + self.serializationType = self.PRECEDENCE + self.precedence = precedence + self.isEpsilon = True + + def matches( self, symbol:int, minVocabSymbol:int, maxVocabSymbol:int): + return False + + + def getPredicate(self): + return PrecedencePredicate(self.precedence) + + def __str__(self): + return self.precedence + " >= _p" + + +Transition.serializationTypes = { + EpsilonTransition: Transition.EPSILON, + RangeTransition: Transition.RANGE, + RuleTransition: Transition.RULE, + PredicateTransition: Transition.PREDICATE, + AtomTransition: Transition.ATOM, + ActionTransition: Transition.ACTION, + SetTransition: Transition.SET, + NotSetTransition: Transition.NOT_SET, + WildcardTransition: Transition.WILDCARD, + PrecedencePredicateTransition: Transition.PRECEDENCE + } + +del ATNState +del RuleStartState + +from antlr4.atn.ATNState import * diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/__init__.py b/.venv/lib/python3.13/site-packages/antlr4/atn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..216c000dc5ffc8e53cc9c596e420c1e67604d1aa --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/atn/__init__.py @@ -0,0 +1 @@ +__author__ = 'ericvergnaud' diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ATN.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ATN.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..53ca48fc54c74dab5959cc5fb4d66c372f8d2d8e Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ATN.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ATNConfig.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ATNConfig.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..70d8872bffa11b114e1b081f7fe20f5c0a4b5582 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ATNConfig.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ATNConfigSet.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ATNConfigSet.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3f93e0a700b9a44bb3a2f88c54c917a9d9a02252 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ATNConfigSet.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ATNDeserializationOptions.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ATNDeserializationOptions.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..51f5682b8d0d92081457d0f660dbca2677270217 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ATNDeserializationOptions.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ATNDeserializer.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ATNDeserializer.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..59fb27c762c9e8923e8b51294277a2ca031d27b8 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ATNDeserializer.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ATNSimulator.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ATNSimulator.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..044715cc8a8c0546107bc09401db831be4709c8f Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ATNSimulator.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ATNState.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ATNState.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b5e24dcc1017f08c768b176c5669b303b594fce3 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ATNState.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ATNType.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ATNType.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bfcd28d5d4880a765aa62628dd2a5e00500bced0 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ATNType.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/LexerATNSimulator.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/LexerATNSimulator.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0bd7ce78ac3145c0cefbcba900afa50022d08c66 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/LexerATNSimulator.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/LexerAction.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/LexerAction.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..38d81fbf02c1c6d86ba9da4376bdbf104281ef7e Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/LexerAction.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/LexerActionExecutor.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/LexerActionExecutor.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4346c1117676ff06a2f65e3008a2e9d496e4095b Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/LexerActionExecutor.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ParserATNSimulator.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ParserATNSimulator.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..879022c396d47ed0c4a9ac3472cdf3b6c833e521 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/ParserATNSimulator.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/PredictionMode.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/PredictionMode.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..db522bc79b6280e356a6bd26185fef02835ef959 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/PredictionMode.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/SemanticContext.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/SemanticContext.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..23a64f7c6b4d670e2f8c48311bf1504bb3ef3eee Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/SemanticContext.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/Transition.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/Transition.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9194fee59396a909abd9ccf7b0a4021746570e1d Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/Transition.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/__init__.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..26e6718b741baa68de9dd6c6b5043eacb18527d3 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/atn/__pycache__/__init__.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/dfa/DFA.py b/.venv/lib/python3.13/site-packages/antlr4/dfa/DFA.py new file mode 100644 index 0000000000000000000000000000000000000000..d80589a6834a48cc6bb718bf33f57156e32ec934 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/dfa/DFA.py @@ -0,0 +1,133 @@ +# +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +from antlr4.atn.ATNState import StarLoopEntryState + +from antlr4.atn.ATNConfigSet import ATNConfigSet +from antlr4.atn.ATNState import DecisionState +from antlr4.dfa.DFAState import DFAState +from antlr4.error.Errors import IllegalStateException + + +class DFA(object): + __slots__ = ('atnStartState', 'decision', '_states', 's0', 'precedenceDfa') + + def __init__(self, atnStartState:DecisionState, decision:int=0): + # From which ATN state did we create this DFA? + self.atnStartState = atnStartState + self.decision = decision + # A set of all DFA states. Use {@link Map} so we can get old state back + # ({@link Set} only allows you to see if it's there). + self._states = dict() + self.s0 = None + # {@code true} if this DFA is for a precedence decision; otherwise, + # {@code false}. This is the backing field for {@link #isPrecedenceDfa}, + # {@link #setPrecedenceDfa}. + self.precedenceDfa = False + + if isinstance(atnStartState, StarLoopEntryState): + if atnStartState.isPrecedenceDecision: + self.precedenceDfa = True + precedenceState = DFAState(configs=ATNConfigSet()) + precedenceState.edges = [] + precedenceState.isAcceptState = False + precedenceState.requiresFullContext = False + self.s0 = precedenceState + + + # Get the start state for a specific precedence value. + # + # @param precedence The current precedence. + # @return The start state corresponding to the specified precedence, or + # {@code null} if no start state exists for the specified precedence. + # + # @throws IllegalStateException if this is not a precedence DFA. + # @see #isPrecedenceDfa() + + def getPrecedenceStartState(self, precedence:int): + if not self.precedenceDfa: + raise IllegalStateException("Only precedence DFAs may contain a precedence start state.") + + # s0.edges is never null for a precedence DFA + if precedence < 0 or precedence >= len(self.s0.edges): + return None + return self.s0.edges[precedence] + + # Set the start state for a specific precedence value. + # + # @param precedence The current precedence. + # @param startState The start state corresponding to the specified + # precedence. + # + # @throws IllegalStateException if this is not a precedence DFA. + # @see #isPrecedenceDfa() + # + def setPrecedenceStartState(self, precedence:int, startState:DFAState): + if not self.precedenceDfa: + raise IllegalStateException("Only precedence DFAs may contain a precedence start state.") + + if precedence < 0: + return + + # synchronization on s0 here is ok. when the DFA is turned into a + # precedence DFA, s0 will be initialized once and not updated again + # s0.edges is never null for a precedence DFA + if precedence >= len(self.s0.edges): + ext = [None] * (precedence + 1 - len(self.s0.edges)) + self.s0.edges.extend(ext) + self.s0.edges[precedence] = startState + # + # Sets whether this is a precedence DFA. If the specified value differs + # from the current DFA configuration, the following actions are taken; + # otherwise no changes are made to the current DFA. + # + # + # + # @param precedenceDfa {@code true} if this is a precedence DFA; otherwise, + # {@code false} + + def setPrecedenceDfa(self, precedenceDfa:bool): + if self.precedenceDfa != precedenceDfa: + self._states = dict() + if precedenceDfa: + precedenceState = DFAState(configs=ATNConfigSet()) + precedenceState.edges = [] + precedenceState.isAcceptState = False + precedenceState.requiresFullContext = False + self.s0 = precedenceState + else: + self.s0 = None + self.precedenceDfa = precedenceDfa + + @property + def states(self): + return self._states + + # Return a list of all states in this DFA, ordered by state number. + def sortedStates(self): + return sorted(self._states.keys(), key=lambda state: state.stateNumber) + + def __str__(self): + return self.toString(None) + + def toString(self, literalNames:list=None, symbolicNames:list=None): + if self.s0 is None: + return "" + from antlr4.dfa.DFASerializer import DFASerializer + serializer = DFASerializer(self,literalNames,symbolicNames) + return str(serializer) + + def toLexerString(self): + if self.s0 is None: + return "" + from antlr4.dfa.DFASerializer import LexerDFASerializer + serializer = LexerDFASerializer(self) + return str(serializer) diff --git a/.venv/lib/python3.13/site-packages/antlr4/dfa/DFASerializer.py b/.venv/lib/python3.13/site-packages/antlr4/dfa/DFASerializer.py new file mode 100644 index 0000000000000000000000000000000000000000..bca0727b76dc54909be0bf60b6d636ec8f539927 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/dfa/DFASerializer.py @@ -0,0 +1,73 @@ +# +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +#/ + +# A DFA walker that knows how to dump them to serialized strings.#/ +from io import StringIO +from antlr4 import DFA +from antlr4.Utils import str_list +from antlr4.dfa.DFAState import DFAState + + +class DFASerializer(object): + __slots__ = ('dfa', 'literalNames', 'symbolicNames') + + def __init__(self, dfa:DFA, literalNames:list=None, symbolicNames:list=None): + self.dfa = dfa + self.literalNames = literalNames + self.symbolicNames = symbolicNames + + def __str__(self): + if self.dfa.s0 is None: + return None + with StringIO() as buf: + for s in self.dfa.sortedStates(): + n = 0 + if s.edges is not None: + n = len(s.edges) + for i in range(0, n): + t = s.edges[i] + if t is not None and t.stateNumber != 0x7FFFFFFF: + buf.write(self.getStateString(s)) + label = self.getEdgeLabel(i) + buf.write("-") + buf.write(label) + buf.write("->") + buf.write(self.getStateString(t)) + buf.write('\n') + output = buf.getvalue() + if len(output)==0: + return None + else: + return output + + def getEdgeLabel(self, i:int): + if i==0: + return "EOF" + if self.literalNames is not None and i<=len(self.literalNames): + return self.literalNames[i-1] + elif self.symbolicNames is not None and i<=len(self.symbolicNames): + return self.symbolicNames[i-1] + else: + return str(i-1) + + def getStateString(self, s:DFAState): + n = s.stateNumber + baseStateStr = ( ":" if s.isAcceptState else "") + "s" + str(n) + ( "^" if s.requiresFullContext else "") + if s.isAcceptState: + if s.predicates is not None: + return baseStateStr + "=>" + str_list(s.predicates) + else: + return baseStateStr + "=>" + str(s.prediction) + else: + return baseStateStr + +class LexerDFASerializer(DFASerializer): + + def __init__(self, dfa:DFA): + super().__init__(dfa, None) + + def getEdgeLabel(self, i:int): + return "'" + chr(i) + "'" diff --git a/.venv/lib/python3.13/site-packages/antlr4/dfa/DFAState.py b/.venv/lib/python3.13/site-packages/antlr4/dfa/DFAState.py new file mode 100644 index 0000000000000000000000000000000000000000..51955a448886ea1fa34f0f4dff7fb0976edd1975 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/dfa/DFAState.py @@ -0,0 +1,126 @@ +# +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +#/ + +# Map a predicate to a predicted alternative.#/ +from io import StringIO +from antlr4.atn.ATNConfigSet import ATNConfigSet +from antlr4.atn.SemanticContext import SemanticContext + + +class PredPrediction(object): + __slots__ = ('alt', 'pred') + + def __init__(self, pred:SemanticContext, alt:int): + self.alt = alt + self.pred = pred + + def __str__(self): + return "(" + str(self.pred) + ", " + str(self.alt) + ")" + +# A DFA state represents a set of possible ATN configurations. +# As Aho, Sethi, Ullman p. 117 says "The DFA uses its state +# to keep track of all possible states the ATN can be in after +# reading each input symbol. That is to say, after reading +# input a1a2..an, the DFA is in a state that represents the +# subset T of the states of the ATN that are reachable from the +# ATN's start state along some path labeled a1a2..an." +# In conventional NFA→DFA conversion, therefore, the subset T +# would be a bitset representing the set of states the +# ATN could be in. We need to track the alt predicted by each +# state as well, however. More importantly, we need to maintain +# a stack of states, tracking the closure operations as they +# jump from rule to rule, emulating rule invocations (method calls). +# I have to add a stack to simulate the proper lookahead sequences for +# the underlying LL grammar from which the ATN was derived. +# +#

I use a set of ATNConfig objects not simple states. An ATNConfig +# is both a state (ala normal conversion) and a RuleContext describing +# the chain of rules (if any) followed to arrive at that state.

+# +#

A DFA state may have multiple references to a particular state, +# but with different ATN contexts (with same or different alts) +# meaning that state was reached via a different set of rule invocations.

+#/ +class DFAState(object): + __slots__ = ( + 'stateNumber', 'configs', 'edges', 'isAcceptState', 'prediction', + 'lexerActionExecutor', 'requiresFullContext', 'predicates' + ) + + def __init__(self, stateNumber:int=-1, configs:ATNConfigSet=ATNConfigSet()): + self.stateNumber = stateNumber + self.configs = configs + # {@code edges[symbol]} points to target of symbol. Shift up by 1 so (-1) + # {@link Token#EOF} maps to {@code edges[0]}. + self.edges = None + self.isAcceptState = False + # if accept state, what ttype do we match or alt do we predict? + # This is set to {@link ATN#INVALID_ALT_NUMBER} when {@link #predicates}{@code !=null} or + # {@link #requiresFullContext}. + self.prediction = 0 + self.lexerActionExecutor = None + # Indicates that this state was created during SLL prediction that + # discovered a conflict between the configurations in the state. Future + # {@link ParserATNSimulator#execATN} invocations immediately jumped doing + # full context prediction if this field is true. + self.requiresFullContext = False + # During SLL parsing, this is a list of predicates associated with the + # ATN configurations of the DFA state. When we have predicates, + # {@link #requiresFullContext} is {@code false} since full context prediction evaluates predicates + # on-the-fly. If this is not null, then {@link #prediction} is + # {@link ATN#INVALID_ALT_NUMBER}. + # + #

We only use these for non-{@link #requiresFullContext} but conflicting states. That + # means we know from the context (it's $ or we don't dip into outer + # context) that it's an ambiguity not a conflict.

+ # + #

This list is computed by {@link ParserATNSimulator#predicateDFAState}.

+ self.predicates = None + + + + # Get the set of all alts mentioned by all ATN configurations in this + # DFA state. + def getAltSet(self): + if self.configs is not None: + return set(cfg.alt for cfg in self.configs) or None + return None + + def __hash__(self): + return hash(self.configs) + + # Two {@link DFAState} instances are equal if their ATN configuration sets + # are the same. This method is used to see if a state already exists. + # + #

Because the number of alternatives and number of ATN configurations are + # finite, there is a finite number of DFA states that can be processed. + # This is necessary to show that the algorithm terminates.

+ # + #

Cannot test the DFA state numbers here because in + # {@link ParserATNSimulator#addDFAState} we need to know if any other state + # exists that has this exact set of ATN configurations. The + # {@link #stateNumber} is irrelevant.

+ def __eq__(self, other): + # compare set of ATN configurations in this set with other + if self is other: + return True + elif not isinstance(other, DFAState): + return False + else: + return self.configs==other.configs + + def __str__(self): + with StringIO() as buf: + buf.write(str(self.stateNumber)) + buf.write(":") + buf.write(str(self.configs)) + if self.isAcceptState: + buf.write("=>") + if self.predicates is not None: + buf.write(str(self.predicates)) + else: + buf.write(str(self.prediction)) + return buf.getvalue() diff --git a/.venv/lib/python3.13/site-packages/antlr4/dfa/__init__.py b/.venv/lib/python3.13/site-packages/antlr4/dfa/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..216c000dc5ffc8e53cc9c596e420c1e67604d1aa --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/dfa/__init__.py @@ -0,0 +1 @@ +__author__ = 'ericvergnaud' diff --git a/.venv/lib/python3.13/site-packages/antlr4/dfa/__pycache__/DFA.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/dfa/__pycache__/DFA.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..602bb03785c7f05da6f075e32d20fc4d6f593daf Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/dfa/__pycache__/DFA.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/dfa/__pycache__/DFAState.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/dfa/__pycache__/DFAState.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..29cb3c2d790f8737e4950f7d59ed14d6dde6d885 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/dfa/__pycache__/DFAState.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/dfa/__pycache__/__init__.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/dfa/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..754eebadc3a5458230bd3eeb7d286323f06c25fc Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/dfa/__pycache__/__init__.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/error/DiagnosticErrorListener.py b/.venv/lib/python3.13/site-packages/antlr4/error/DiagnosticErrorListener.py new file mode 100644 index 0000000000000000000000000000000000000000..32ac14b63579ce7c984c2e34f2b1c80bebe328ed --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/error/DiagnosticErrorListener.py @@ -0,0 +1,107 @@ +# +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +# + + +# +# This implementation of {@link ANTLRErrorListener} can be used to identify +# certain potential correctness and performance problems in grammars. "Reports" +# are made by calling {@link Parser#notifyErrorListeners} with the appropriate +# message. +# +# + +from io import StringIO +from antlr4 import Parser, DFA +from antlr4.atn.ATNConfigSet import ATNConfigSet +from antlr4.error.ErrorListener import ErrorListener + +class DiagnosticErrorListener(ErrorListener): + + def __init__(self, exactOnly:bool=True): + # whether all ambiguities or only exact ambiguities are reported. + self.exactOnly = exactOnly + + def reportAmbiguity(self, recognizer:Parser, dfa:DFA, startIndex:int, + stopIndex:int, exact:bool, ambigAlts:set, configs:ATNConfigSet): + if self.exactOnly and not exact: + return + + with StringIO() as buf: + buf.write("reportAmbiguity d=") + buf.write(self.getDecisionDescription(recognizer, dfa)) + buf.write(": ambigAlts=") + buf.write(str(self.getConflictingAlts(ambigAlts, configs))) + buf.write(", input='") + buf.write(recognizer.getTokenStream().getText(startIndex, stopIndex)) + buf.write("'") + recognizer.notifyErrorListeners(buf.getvalue()) + + + def reportAttemptingFullContext(self, recognizer:Parser, dfa:DFA, startIndex:int, + stopIndex:int, conflictingAlts:set, configs:ATNConfigSet): + with StringIO() as buf: + buf.write("reportAttemptingFullContext d=") + buf.write(self.getDecisionDescription(recognizer, dfa)) + buf.write(", input='") + buf.write(recognizer.getTokenStream().getText(startIndex, stopIndex)) + buf.write("'") + recognizer.notifyErrorListeners(buf.getvalue()) + + def reportContextSensitivity(self, recognizer:Parser, dfa:DFA, startIndex:int, + stopIndex:int, prediction:int, configs:ATNConfigSet): + with StringIO() as buf: + buf.write("reportContextSensitivity d=") + buf.write(self.getDecisionDescription(recognizer, dfa)) + buf.write(", input='") + buf.write(recognizer.getTokenStream().getText(startIndex, stopIndex)) + buf.write("'") + recognizer.notifyErrorListeners(buf.getvalue()) + + def getDecisionDescription(self, recognizer:Parser, dfa:DFA): + decision = dfa.decision + ruleIndex = dfa.atnStartState.ruleIndex + + ruleNames = recognizer.ruleNames + if ruleIndex < 0 or ruleIndex >= len(ruleNames): + return str(decision) + + ruleName = ruleNames[ruleIndex] + if ruleName is None or len(ruleName)==0: + return str(decision) + + return str(decision) + " (" + ruleName + ")" + + # + # Computes the set of conflicting or ambiguous alternatives from a + # configuration set, if that information was not already provided by the + # parser. + # + # @param reportedAlts The set of conflicting or ambiguous alternatives, as + # reported by the parser. + # @param configs The conflicting or ambiguous configuration set. + # @return Returns {@code reportedAlts} if it is not {@code null}, otherwise + # returns the set of alternatives represented in {@code configs}. + # + def getConflictingAlts(self, reportedAlts:set, configs:ATNConfigSet): + if reportedAlts is not None: + return reportedAlts + + result = set() + for config in configs: + result.add(config.alt) + + return result diff --git a/.venv/lib/python3.13/site-packages/antlr4/error/ErrorListener.py b/.venv/lib/python3.13/site-packages/antlr4/error/ErrorListener.py new file mode 100644 index 0000000000000000000000000000000000000000..933264d431b9829f43a38d5f0f07c83bbad703a0 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/error/ErrorListener.py @@ -0,0 +1,72 @@ +# +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. + +# Provides an empty default implementation of {@link ANTLRErrorListener}. The +# default implementation of each method does nothing, but can be overridden as +# necessary. + + +import sys + +class ErrorListener(object): + + def syntaxError(self, recognizer, offendingSymbol, line, column, msg, e): + pass + + def reportAmbiguity(self, recognizer, dfa, startIndex, stopIndex, exact, ambigAlts, configs): + pass + + def reportAttemptingFullContext(self, recognizer, dfa, startIndex, stopIndex, conflictingAlts, configs): + pass + + def reportContextSensitivity(self, recognizer, dfa, startIndex, stopIndex, prediction, configs): + pass + +class ConsoleErrorListener(ErrorListener): + # + # Provides a default instance of {@link ConsoleErrorListener}. + # + INSTANCE = None + + # + # {@inheritDoc} + # + #

+ # This implementation prints messages to {@link System#err} containing the + # values of {@code line}, {@code charPositionInLine}, and {@code msg} using + # the following format.

+ # + #
+    # line line:charPositionInLine msg
+    # 
+ # + def syntaxError(self, recognizer, offendingSymbol, line, column, msg, e): + print("line " + str(line) + ":" + str(column) + " " + msg, file=sys.stderr) + +ConsoleErrorListener.INSTANCE = ConsoleErrorListener() + +class ProxyErrorListener(ErrorListener): + + def __init__(self, delegates): + super().__init__() + if delegates is None: + raise ReferenceError("delegates") + self.delegates = delegates + + def syntaxError(self, recognizer, offendingSymbol, line, column, msg, e): + for delegate in self.delegates: + delegate.syntaxError(recognizer, offendingSymbol, line, column, msg, e) + + def reportAmbiguity(self, recognizer, dfa, startIndex, stopIndex, exact, ambigAlts, configs): + for delegate in self.delegates: + delegate.reportAmbiguity(recognizer, dfa, startIndex, stopIndex, exact, ambigAlts, configs) + + def reportAttemptingFullContext(self, recognizer, dfa, startIndex, stopIndex, conflictingAlts, configs): + for delegate in self.delegates: + delegate.reportAttemptingFullContext(recognizer, dfa, startIndex, stopIndex, conflictingAlts, configs) + + def reportContextSensitivity(self, recognizer, dfa, startIndex, stopIndex, prediction, configs): + for delegate in self.delegates: + delegate.reportContextSensitivity(recognizer, dfa, startIndex, stopIndex, prediction, configs) diff --git a/.venv/lib/python3.13/site-packages/antlr4/error/ErrorStrategy.py b/.venv/lib/python3.13/site-packages/antlr4/error/ErrorStrategy.py new file mode 100644 index 0000000000000000000000000000000000000000..0f7caadb240445e6d997ad582a51836f95cab5c5 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/error/ErrorStrategy.py @@ -0,0 +1,709 @@ +# +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +# +import sys +from antlr4.IntervalSet import IntervalSet + +from antlr4.Token import Token +from antlr4.atn.ATNState import ATNState +from antlr4.error.Errors import RecognitionException, NoViableAltException, InputMismatchException, \ + FailedPredicateException, ParseCancellationException + +# need forward declaration +Parser = None + +class ErrorStrategy(object): + + def reset(self, recognizer:Parser): + pass + + def recoverInline(self, recognizer:Parser): + pass + + def recover(self, recognizer:Parser, e:RecognitionException): + pass + + def sync(self, recognizer:Parser): + pass + + def inErrorRecoveryMode(self, recognizer:Parser): + pass + + def reportError(self, recognizer:Parser, e:RecognitionException): + pass + + +# This is the default implementation of {@link ANTLRErrorStrategy} used for +# error reporting and recovery in ANTLR parsers. +# +class DefaultErrorStrategy(ErrorStrategy): + + def __init__(self): + super().__init__() + # Indicates whether the error strategy is currently "recovering from an + # error". This is used to suppress reporting multiple error messages while + # attempting to recover from a detected syntax error. + # + # @see #inErrorRecoveryMode + # + self.errorRecoveryMode = False + + # The index into the input stream where the last error occurred. + # This is used to prevent infinite loops where an error is found + # but no token is consumed during recovery...another error is found, + # ad nauseum. This is a failsafe mechanism to guarantee that at least + # one token/tree node is consumed for two errors. + # + self.lastErrorIndex = -1 + self.lastErrorStates = None + self.nextTokensContext = None + self.nextTokenState = 0 + + #

The default implementation simply calls {@link #endErrorCondition} to + # ensure that the handler is not in error recovery mode.

+ def reset(self, recognizer:Parser): + self.endErrorCondition(recognizer) + + # + # This method is called to enter error recovery mode when a recognition + # exception is reported. + # + # @param recognizer the parser instance + # + def beginErrorCondition(self, recognizer:Parser): + self.errorRecoveryMode = True + + def inErrorRecoveryMode(self, recognizer:Parser): + return self.errorRecoveryMode + + # + # This method is called to leave error recovery mode after recovering from + # a recognition exception. + # + # @param recognizer + # + def endErrorCondition(self, recognizer:Parser): + self.errorRecoveryMode = False + self.lastErrorStates = None + self.lastErrorIndex = -1 + + # + # {@inheritDoc} + # + #

The default implementation simply calls {@link #endErrorCondition}.

+ # + def reportMatch(self, recognizer:Parser): + self.endErrorCondition(recognizer) + + # + # {@inheritDoc} + # + #

The default implementation returns immediately if the handler is already + # in error recovery mode. Otherwise, it calls {@link #beginErrorCondition} + # and dispatches the reporting task based on the runtime type of {@code e} + # according to the following table.

+ # + # + # + def reportError(self, recognizer:Parser, e:RecognitionException): + # if we've already reported an error and have not matched a token + # yet successfully, don't report any errors. + if self.inErrorRecoveryMode(recognizer): + return # don't report spurious errors + self.beginErrorCondition(recognizer) + if isinstance( e, NoViableAltException ): + self.reportNoViableAlternative(recognizer, e) + elif isinstance( e, InputMismatchException ): + self.reportInputMismatch(recognizer, e) + elif isinstance( e, FailedPredicateException ): + self.reportFailedPredicate(recognizer, e) + else: + print("unknown recognition error type: " + type(e).__name__) + recognizer.notifyErrorListeners(e.message, e.offendingToken, e) + + # + # {@inheritDoc} + # + #

The default implementation resynchronizes the parser by consuming tokens + # until we find one in the resynchronization set--loosely the set of tokens + # that can follow the current rule.

+ # + def recover(self, recognizer:Parser, e:RecognitionException): + if self.lastErrorIndex==recognizer.getInputStream().index \ + and self.lastErrorStates is not None \ + and recognizer.state in self.lastErrorStates: + # uh oh, another error at same token index and previously-visited + # state in ATN; must be a case where LT(1) is in the recovery + # token set so nothing got consumed. Consume a single token + # at least to prevent an infinite loop; this is a failsafe. + recognizer.consume() + + self.lastErrorIndex = recognizer._input.index + if self.lastErrorStates is None: + self.lastErrorStates = [] + self.lastErrorStates.append(recognizer.state) + followSet = self.getErrorRecoverySet(recognizer) + self.consumeUntil(recognizer, followSet) + + # The default implementation of {@link ANTLRErrorStrategy#sync} makes sure + # that the current lookahead symbol is consistent with what were expecting + # at this point in the ATN. You can call this anytime but ANTLR only + # generates code to check before subrules/loops and each iteration. + # + #

Implements Jim Idle's magic sync mechanism in closures and optional + # subrules. E.g.,

+ # + #
+    # a : sync ( stuff sync )* ;
+    # sync : {consume to what can follow sync} ;
+    # 
+ # + # At the start of a sub rule upon error, {@link #sync} performs single + # token deletion, if possible. If it can't do that, it bails on the current + # rule and uses the default error recovery, which consumes until the + # resynchronization set of the current rule. + # + #

If the sub rule is optional ({@code (...)?}, {@code (...)*}, or block + # with an empty alternative), then the expected set includes what follows + # the subrule.

+ # + #

During loop iteration, it consumes until it sees a token that can start a + # sub rule or what follows loop. Yes, that is pretty aggressive. We opt to + # stay in the loop as long as possible.

+ # + #

ORIGINS

+ # + #

Previous versions of ANTLR did a poor job of their recovery within loops. + # A single mismatch token or missing token would force the parser to bail + # out of the entire rules surrounding the loop. So, for rule

+ # + #
+    # classDef : 'class' ID '{' member* '}'
+    # 
+ # + # input with an extra token between members would force the parser to + # consume until it found the next class definition rather than the next + # member definition of the current class. + # + #

This functionality cost a little bit of effort because the parser has to + # compare token set at the start of the loop and at each iteration. If for + # some reason speed is suffering for you, you can turn off this + # functionality by simply overriding this method as a blank { }.

+ # + def sync(self, recognizer:Parser): + # If already recovering, don't try to sync + if self.inErrorRecoveryMode(recognizer): + return + + s = recognizer._interp.atn.states[recognizer.state] + la = recognizer.getTokenStream().LA(1) + # try cheaper subset first; might get lucky. seems to shave a wee bit off + nextTokens = recognizer.atn.nextTokens(s) + if la in nextTokens: + self.nextTokensContext = None + self.nextTokenState = ATNState.INVALID_STATE_NUMBER + return + elif Token.EPSILON in nextTokens: + if self.nextTokensContext is None: + # It's possible the next token won't match information tracked + # by sync is restricted for performance. + self.nextTokensContext = recognizer._ctx + self.nextTokensState = recognizer._stateNumber + return + + if s.stateType in [ATNState.BLOCK_START, ATNState.STAR_BLOCK_START, + ATNState.PLUS_BLOCK_START, ATNState.STAR_LOOP_ENTRY]: + # report error and recover if possible + if self.singleTokenDeletion(recognizer)is not None: + return + else: + raise InputMismatchException(recognizer) + + elif s.stateType in [ATNState.PLUS_LOOP_BACK, ATNState.STAR_LOOP_BACK]: + self.reportUnwantedToken(recognizer) + expecting = recognizer.getExpectedTokens() + whatFollowsLoopIterationOrRule = expecting.addSet(self.getErrorRecoverySet(recognizer)) + self.consumeUntil(recognizer, whatFollowsLoopIterationOrRule) + + else: + # do nothing if we can't identify the exact kind of ATN state + pass + + # This is called by {@link #reportError} when the exception is a + # {@link NoViableAltException}. + # + # @see #reportError + # + # @param recognizer the parser instance + # @param e the recognition exception + # + def reportNoViableAlternative(self, recognizer:Parser, e:NoViableAltException): + tokens = recognizer.getTokenStream() + if tokens is not None: + if e.startToken.type==Token.EOF: + input = "" + else: + input = tokens.getText(e.startToken, e.offendingToken) + else: + input = "" + msg = "no viable alternative at input " + self.escapeWSAndQuote(input) + recognizer.notifyErrorListeners(msg, e.offendingToken, e) + + # + # This is called by {@link #reportError} when the exception is an + # {@link InputMismatchException}. + # + # @see #reportError + # + # @param recognizer the parser instance + # @param e the recognition exception + # + def reportInputMismatch(self, recognizer:Parser, e:InputMismatchException): + msg = "mismatched input " + self.getTokenErrorDisplay(e.offendingToken) \ + + " expecting " + e.getExpectedTokens().toString(recognizer.literalNames, recognizer.symbolicNames) + recognizer.notifyErrorListeners(msg, e.offendingToken, e) + + # + # This is called by {@link #reportError} when the exception is a + # {@link FailedPredicateException}. + # + # @see #reportError + # + # @param recognizer the parser instance + # @param e the recognition exception + # + def reportFailedPredicate(self, recognizer, e): + ruleName = recognizer.ruleNames[recognizer._ctx.getRuleIndex()] + msg = "rule " + ruleName + " " + e.message + recognizer.notifyErrorListeners(msg, e.offendingToken, e) + + # This method is called to report a syntax error which requires the removal + # of a token from the input stream. At the time this method is called, the + # erroneous symbol is current {@code LT(1)} symbol and has not yet been + # removed from the input stream. When this method returns, + # {@code recognizer} is in error recovery mode. + # + #

This method is called when {@link #singleTokenDeletion} identifies + # single-token deletion as a viable recovery strategy for a mismatched + # input error.

+ # + #

The default implementation simply returns if the handler is already in + # error recovery mode. Otherwise, it calls {@link #beginErrorCondition} to + # enter error recovery mode, followed by calling + # {@link Parser#notifyErrorListeners}.

+ # + # @param recognizer the parser instance + # + def reportUnwantedToken(self, recognizer:Parser): + if self.inErrorRecoveryMode(recognizer): + return + + self.beginErrorCondition(recognizer) + t = recognizer.getCurrentToken() + tokenName = self.getTokenErrorDisplay(t) + expecting = self.getExpectedTokens(recognizer) + msg = "extraneous input " + tokenName + " expecting " \ + + expecting.toString(recognizer.literalNames, recognizer.symbolicNames) + recognizer.notifyErrorListeners(msg, t, None) + + # This method is called to report a syntax error which requires the + # insertion of a missing token into the input stream. At the time this + # method is called, the missing token has not yet been inserted. When this + # method returns, {@code recognizer} is in error recovery mode. + # + #

This method is called when {@link #singleTokenInsertion} identifies + # single-token insertion as a viable recovery strategy for a mismatched + # input error.

+ # + #

The default implementation simply returns if the handler is already in + # error recovery mode. Otherwise, it calls {@link #beginErrorCondition} to + # enter error recovery mode, followed by calling + # {@link Parser#notifyErrorListeners}.

+ # + # @param recognizer the parser instance + # + def reportMissingToken(self, recognizer:Parser): + if self.inErrorRecoveryMode(recognizer): + return + self.beginErrorCondition(recognizer) + t = recognizer.getCurrentToken() + expecting = self.getExpectedTokens(recognizer) + msg = "missing " + expecting.toString(recognizer.literalNames, recognizer.symbolicNames) \ + + " at " + self.getTokenErrorDisplay(t) + recognizer.notifyErrorListeners(msg, t, None) + + #

The default implementation attempts to recover from the mismatched input + # by using single token insertion and deletion as described below. If the + # recovery attempt fails, this method throws an + # {@link InputMismatchException}.

+ # + #

EXTRA TOKEN (single token deletion)

+ # + #

{@code LA(1)} is not what we are looking for. If {@code LA(2)} has the + # right token, however, then assume {@code LA(1)} is some extra spurious + # token and delete it. Then consume and return the next token (which was + # the {@code LA(2)} token) as the successful result of the match operation.

+ # + #

This recovery strategy is implemented by {@link #singleTokenDeletion}.

+ # + #

MISSING TOKEN (single token insertion)

+ # + #

If current token (at {@code LA(1)}) is consistent with what could come + # after the expected {@code LA(1)} token, then assume the token is missing + # and use the parser's {@link TokenFactory} to create it on the fly. The + # "insertion" is performed by returning the created token as the successful + # result of the match operation.

+ # + #

This recovery strategy is implemented by {@link #singleTokenInsertion}.

+ # + #

EXAMPLE

+ # + #

For example, Input {@code i=(3;} is clearly missing the {@code ')'}. When + # the parser returns from the nested call to {@code expr}, it will have + # call chain:

+ # + #
+    # stat → expr → atom
+    # 
+ # + # and it will be trying to match the {@code ')'} at this point in the + # derivation: + # + #
+    # => ID '=' '(' INT ')' ('+' atom)* ';'
+    #                    ^
+    # 
+ # + # The attempt to match {@code ')'} will fail when it sees {@code ';'} and + # call {@link #recoverInline}. To recover, it sees that {@code LA(1)==';'} + # is in the set of tokens that can follow the {@code ')'} token reference + # in rule {@code atom}. It can assume that you forgot the {@code ')'}. + # + def recoverInline(self, recognizer:Parser): + # SINGLE TOKEN DELETION + matchedSymbol = self.singleTokenDeletion(recognizer) + if matchedSymbol is not None: + # we have deleted the extra token. + # now, move past ttype token as if all were ok + recognizer.consume() + return matchedSymbol + + # SINGLE TOKEN INSERTION + if self.singleTokenInsertion(recognizer): + return self.getMissingSymbol(recognizer) + + # even that didn't work; must throw the exception + raise InputMismatchException(recognizer) + + # + # This method implements the single-token insertion inline error recovery + # strategy. It is called by {@link #recoverInline} if the single-token + # deletion strategy fails to recover from the mismatched input. If this + # method returns {@code true}, {@code recognizer} will be in error recovery + # mode. + # + #

This method determines whether or not single-token insertion is viable by + # checking if the {@code LA(1)} input symbol could be successfully matched + # if it were instead the {@code LA(2)} symbol. If this method returns + # {@code true}, the caller is responsible for creating and inserting a + # token with the correct type to produce this behavior.

+ # + # @param recognizer the parser instance + # @return {@code true} if single-token insertion is a viable recovery + # strategy for the current mismatched input, otherwise {@code false} + # + def singleTokenInsertion(self, recognizer:Parser): + currentSymbolType = recognizer.getTokenStream().LA(1) + # if current token is consistent with what could come after current + # ATN state, then we know we're missing a token; error recovery + # is free to conjure up and insert the missing token + atn = recognizer._interp.atn + currentState = atn.states[recognizer.state] + next = currentState.transitions[0].target + expectingAtLL2 = atn.nextTokens(next, recognizer._ctx) + if currentSymbolType in expectingAtLL2: + self.reportMissingToken(recognizer) + return True + else: + return False + + # This method implements the single-token deletion inline error recovery + # strategy. It is called by {@link #recoverInline} to attempt to recover + # from mismatched input. If this method returns null, the parser and error + # handler state will not have changed. If this method returns non-null, + # {@code recognizer} will not be in error recovery mode since the + # returned token was a successful match. + # + #

If the single-token deletion is successful, this method calls + # {@link #reportUnwantedToken} to report the error, followed by + # {@link Parser#consume} to actually "delete" the extraneous token. Then, + # before returning {@link #reportMatch} is called to signal a successful + # match.

+ # + # @param recognizer the parser instance + # @return the successfully matched {@link Token} instance if single-token + # deletion successfully recovers from the mismatched input, otherwise + # {@code null} + # + def singleTokenDeletion(self, recognizer:Parser): + nextTokenType = recognizer.getTokenStream().LA(2) + expecting = self.getExpectedTokens(recognizer) + if nextTokenType in expecting: + self.reportUnwantedToken(recognizer) + # print("recoverFromMismatchedToken deleting " \ + # + str(recognizer.getTokenStream().LT(1)) \ + # + " since " + str(recognizer.getTokenStream().LT(2)) \ + # + " is what we want", file=sys.stderr) + recognizer.consume() # simply delete extra token + # we want to return the token we're actually matching + matchedSymbol = recognizer.getCurrentToken() + self.reportMatch(recognizer) # we know current token is correct + return matchedSymbol + else: + return None + + # Conjure up a missing token during error recovery. + # + # The recognizer attempts to recover from single missing + # symbols. But, actions might refer to that missing symbol. + # For example, x=ID {f($x);}. The action clearly assumes + # that there has been an identifier matched previously and that + # $x points at that token. If that token is missing, but + # the next token in the stream is what we want we assume that + # this token is missing and we keep going. Because we + # have to return some token to replace the missing token, + # we have to conjure one up. This method gives the user control + # over the tokens returned for missing tokens. Mostly, + # you will want to create something special for identifier + # tokens. For literals such as '{' and ',', the default + # action in the parser or tree parser works. It simply creates + # a CommonToken of the appropriate type. The text will be the token. + # If you change what tokens must be created by the lexer, + # override this method to create the appropriate tokens. + # + def getMissingSymbol(self, recognizer:Parser): + currentSymbol = recognizer.getCurrentToken() + expecting = self.getExpectedTokens(recognizer) + expectedTokenType = expecting[0] # get any element + if expectedTokenType==Token.EOF: + tokenText = "" + else: + name = None + if expectedTokenType < len(recognizer.literalNames): + name = recognizer.literalNames[expectedTokenType] + if name is None and expectedTokenType < len(recognizer.symbolicNames): + name = recognizer.symbolicNames[expectedTokenType] + tokenText = "" + current = currentSymbol + lookback = recognizer.getTokenStream().LT(-1) + if current.type==Token.EOF and lookback is not None: + current = lookback + return recognizer.getTokenFactory().create(current.source, + expectedTokenType, tokenText, Token.DEFAULT_CHANNEL, + -1, -1, current.line, current.column) + + def getExpectedTokens(self, recognizer:Parser): + return recognizer.getExpectedTokens() + + # How should a token be displayed in an error message? The default + # is to display just the text, but during development you might + # want to have a lot of information spit out. Override in that case + # to use t.toString() (which, for CommonToken, dumps everything about + # the token). This is better than forcing you to override a method in + # your token objects because you don't have to go modify your lexer + # so that it creates a new Java type. + # + def getTokenErrorDisplay(self, t:Token): + if t is None: + return "" + s = t.text + if s is None: + if t.type==Token.EOF: + s = "" + else: + s = "<" + str(t.type) + ">" + return self.escapeWSAndQuote(s) + + def escapeWSAndQuote(self, s:str): + s = s.replace("\n","\\n") + s = s.replace("\r","\\r") + s = s.replace("\t","\\t") + return "'" + s + "'" + + # Compute the error recovery set for the current rule. During + # rule invocation, the parser pushes the set of tokens that can + # follow that rule reference on the stack; this amounts to + # computing FIRST of what follows the rule reference in the + # enclosing rule. See LinearApproximator.FIRST(). + # This local follow set only includes tokens + # from within the rule; i.e., the FIRST computation done by + # ANTLR stops at the end of a rule. + # + # EXAMPLE + # + # When you find a "no viable alt exception", the input is not + # consistent with any of the alternatives for rule r. The best + # thing to do is to consume tokens until you see something that + # can legally follow a call to r#or* any rule that called r. + # You don't want the exact set of viable next tokens because the + # input might just be missing a token--you might consume the + # rest of the input looking for one of the missing tokens. + # + # Consider grammar: + # + # a : '[' b ']' + # | '(' b ')' + # ; + # b : c '^' INT ; + # c : ID + # | INT + # ; + # + # At each rule invocation, the set of tokens that could follow + # that rule is pushed on a stack. Here are the various + # context-sensitive follow sets: + # + # FOLLOW(b1_in_a) = FIRST(']') = ']' + # FOLLOW(b2_in_a) = FIRST(')') = ')' + # FOLLOW(c_in_b) = FIRST('^') = '^' + # + # Upon erroneous input "[]", the call chain is + # + # a -> b -> c + # + # and, hence, the follow context stack is: + # + # depth follow set start of rule execution + # 0 a (from main()) + # 1 ']' b + # 2 '^' c + # + # Notice that ')' is not included, because b would have to have + # been called from a different context in rule a for ')' to be + # included. + # + # For error recovery, we cannot consider FOLLOW(c) + # (context-sensitive or otherwise). We need the combined set of + # all context-sensitive FOLLOW sets--the set of all tokens that + # could follow any reference in the call chain. We need to + # resync to one of those tokens. Note that FOLLOW(c)='^' and if + # we resync'd to that token, we'd consume until EOF. We need to + # sync to context-sensitive FOLLOWs for a, b, and c: {']','^'}. + # In this case, for input "[]", LA(1) is ']' and in the set, so we would + # not consume anything. After printing an error, rule c would + # return normally. Rule b would not find the required '^' though. + # At this point, it gets a mismatched token error and throws an + # exception (since LA(1) is not in the viable following token + # set). The rule exception handler tries to recover, but finds + # the same recovery set and doesn't consume anything. Rule b + # exits normally returning to rule a. Now it finds the ']' (and + # with the successful match exits errorRecovery mode). + # + # So, you can see that the parser walks up the call chain looking + # for the token that was a member of the recovery set. + # + # Errors are not generated in errorRecovery mode. + # + # ANTLR's error recovery mechanism is based upon original ideas: + # + # "Algorithms + Data Structures = Programs" by Niklaus Wirth + # + # and + # + # "A note on error recovery in recursive descent parsers": + # http:#portal.acm.org/citation.cfm?id=947902.947905 + # + # Later, Josef Grosch had some good ideas: + # + # "Efficient and Comfortable Error Recovery in Recursive Descent + # Parsers": + # ftp:#www.cocolab.com/products/cocktail/doca4.ps/ell.ps.zip + # + # Like Grosch I implement context-sensitive FOLLOW sets that are combined + # at run-time upon error to avoid overhead during parsing. + # + def getErrorRecoverySet(self, recognizer:Parser): + atn = recognizer._interp.atn + ctx = recognizer._ctx + recoverSet = IntervalSet() + while ctx is not None and ctx.invokingState>=0: + # compute what follows who invoked us + invokingState = atn.states[ctx.invokingState] + rt = invokingState.transitions[0] + follow = atn.nextTokens(rt.followState) + recoverSet.addSet(follow) + ctx = ctx.parentCtx + recoverSet.removeOne(Token.EPSILON) + return recoverSet + + # Consume tokens until one matches the given token set.# + def consumeUntil(self, recognizer:Parser, set_:set): + ttype = recognizer.getTokenStream().LA(1) + while ttype != Token.EOF and not ttype in set_: + recognizer.consume() + ttype = recognizer.getTokenStream().LA(1) + + +# +# This implementation of {@link ANTLRErrorStrategy} responds to syntax errors +# by immediately canceling the parse operation with a +# {@link ParseCancellationException}. The implementation ensures that the +# {@link ParserRuleContext#exception} field is set for all parse tree nodes +# that were not completed prior to encountering the error. +# +#

+# This error strategy is useful in the following scenarios.

+# +#
    +#
  • Two-stage parsing: This error strategy allows the first +# stage of two-stage parsing to immediately terminate if an error is +# encountered, and immediately fall back to the second stage. In addition to +# avoiding wasted work by attempting to recover from errors here, the empty +# implementation of {@link BailErrorStrategy#sync} improves the performance of +# the first stage.
  • +#
  • Silent validation: When syntax errors are not being +# reported or logged, and the parse result is simply ignored if errors occur, +# the {@link BailErrorStrategy} avoids wasting work on recovering from errors +# when the result will be ignored either way.
  • +#
+# +#

+# {@code myparser.setErrorHandler(new BailErrorStrategy());}

+# +# @see Parser#setErrorHandler(ANTLRErrorStrategy) +# +class BailErrorStrategy(DefaultErrorStrategy): + # Instead of recovering from exception {@code e}, re-throw it wrapped + # in a {@link ParseCancellationException} so it is not caught by the + # rule function catches. Use {@link Exception#getCause()} to get the + # original {@link RecognitionException}. + # + def recover(self, recognizer:Parser, e:RecognitionException): + context = recognizer._ctx + while context is not None: + context.exception = e + context = context.parentCtx + raise ParseCancellationException(e) + + # Make sure we don't attempt to recover inline; if the parser + # successfully recovers, it won't throw an exception. + # + def recoverInline(self, recognizer:Parser): + self.recover(recognizer, InputMismatchException(recognizer)) + + # Make sure we don't attempt to recover from problems in subrules.# + def sync(self, recognizer:Parser): + pass + +del Parser \ No newline at end of file diff --git a/.venv/lib/python3.13/site-packages/antlr4/error/Errors.py b/.venv/lib/python3.13/site-packages/antlr4/error/Errors.py new file mode 100644 index 0000000000000000000000000000000000000000..e78ac05911d3c9569441fe376ff7d6c686c05c95 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/error/Errors.py @@ -0,0 +1,172 @@ +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +# + +# need forward declaration +Token = None +Lexer = None +Parser = None +TokenStream = None +ATNConfigSet = None +ParserRulecontext = None +PredicateTransition = None +BufferedTokenStream = None + +class UnsupportedOperationException(Exception): + + def __init__(self, msg:str): + super().__init__(msg) + +class IllegalStateException(Exception): + + def __init__(self, msg:str): + super().__init__(msg) + +class CancellationException(IllegalStateException): + + def __init__(self, msg:str): + super().__init__(msg) + +# The root of the ANTLR exception hierarchy. In general, ANTLR tracks just +# 3 kinds of errors: prediction errors, failed predicate errors, and +# mismatched input errors. In each case, the parser knows where it is +# in the input, where it is in the ATN, the rule invocation stack, +# and what kind of problem occurred. + +from antlr4.InputStream import InputStream +from antlr4.ParserRuleContext import ParserRuleContext +from antlr4.Recognizer import Recognizer + +class RecognitionException(Exception): + + + def __init__(self, message:str=None, recognizer:Recognizer=None, input:InputStream=None, ctx:ParserRulecontext=None): + super().__init__(message) + self.message = message + self.recognizer = recognizer + self.input = input + self.ctx = ctx + # The current {@link Token} when an error occurred. Since not all streams + # support accessing symbols by index, we have to track the {@link Token} + # instance itself. + self.offendingToken = None + # Get the ATN state number the parser was in at the time the error + # occurred. For {@link NoViableAltException} and + # {@link LexerNoViableAltException} exceptions, this is the + # {@link DecisionState} number. For others, it is the state whose outgoing + # edge we couldn't match. + self.offendingState = -1 + if recognizer is not None: + self.offendingState = recognizer.state + + #

If the state number is not known, this method returns -1.

+ + # + # Gets the set of input symbols which could potentially follow the + # previously matched symbol at the time this exception was thrown. + # + #

If the set of expected tokens is not known and could not be computed, + # this method returns {@code null}.

+ # + # @return The set of token types that could potentially follow the current + # state in the ATN, or {@code null} if the information is not available. + #/ + def getExpectedTokens(self): + if self.recognizer is not None: + return self.recognizer.atn.getExpectedTokens(self.offendingState, self.ctx) + else: + return None + + +class LexerNoViableAltException(RecognitionException): + + def __init__(self, lexer:Lexer, input:InputStream, startIndex:int, deadEndConfigs:ATNConfigSet): + super().__init__(message=None, recognizer=lexer, input=input, ctx=None) + self.startIndex = startIndex + self.deadEndConfigs = deadEndConfigs + + def __str__(self): + symbol = "" + if self.startIndex >= 0 and self.startIndex < self.input.size: + symbol = self.input.getText(self.startIndex, self.startIndex) + # TODO symbol = Utils.escapeWhitespace(symbol, false); + return "LexerNoViableAltException('" + symbol + "')" + +# Indicates that the parser could not decide which of two or more paths +# to take based upon the remaining input. It tracks the starting token +# of the offending input and also knows where the parser was +# in the various paths when the error. Reported by reportNoViableAlternative() +# +class NoViableAltException(RecognitionException): + + def __init__(self, recognizer:Parser, input:TokenStream=None, startToken:Token=None, + offendingToken:Token=None, deadEndConfigs:ATNConfigSet=None, ctx:ParserRuleContext=None): + if ctx is None: + ctx = recognizer._ctx + if offendingToken is None: + offendingToken = recognizer.getCurrentToken() + if startToken is None: + startToken = recognizer.getCurrentToken() + if input is None: + input = recognizer.getInputStream() + super().__init__(recognizer=recognizer, input=input, ctx=ctx) + # Which configurations did we try at input.index() that couldn't match input.LT(1)?# + self.deadEndConfigs = deadEndConfigs + # The token object at the start index; the input stream might + # not be buffering tokens so get a reference to it. (At the + # time the error occurred, of course the stream needs to keep a + # buffer all of the tokens but later we might not have access to those.) + self.startToken = startToken + self.offendingToken = offendingToken + +# This signifies any kind of mismatched input exceptions such as +# when the current input does not match the expected token. +# +class InputMismatchException(RecognitionException): + + def __init__(self, recognizer:Parser): + super().__init__(recognizer=recognizer, input=recognizer.getInputStream(), ctx=recognizer._ctx) + self.offendingToken = recognizer.getCurrentToken() + + +# A semantic predicate failed during validation. Validation of predicates +# occurs when normally parsing the alternative just like matching a token. +# Disambiguating predicate evaluation occurs when we test a predicate during +# prediction. + +class FailedPredicateException(RecognitionException): + + def __init__(self, recognizer:Parser, predicate:str=None, message:str=None): + super().__init__(message=self.formatMessage(predicate,message), recognizer=recognizer, + input=recognizer.getInputStream(), ctx=recognizer._ctx) + s = recognizer._interp.atn.states[recognizer.state] + trans = s.transitions[0] + from antlr4.atn.Transition import PredicateTransition + if isinstance(trans, PredicateTransition): + self.ruleIndex = trans.ruleIndex + self.predicateIndex = trans.predIndex + else: + self.ruleIndex = 0 + self.predicateIndex = 0 + self.predicate = predicate + self.offendingToken = recognizer.getCurrentToken() + + def formatMessage(self, predicate:str, message:str): + if message is not None: + return message + else: + return "failed predicate: {" + predicate + "}?" + +class ParseCancellationException(CancellationException): + + pass + +del Token +del Lexer +del Parser +del TokenStream +del ATNConfigSet +del ParserRulecontext +del PredicateTransition +del BufferedTokenStream diff --git a/.venv/lib/python3.13/site-packages/antlr4/error/__init__.py b/.venv/lib/python3.13/site-packages/antlr4/error/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..216c000dc5ffc8e53cc9c596e420c1e67604d1aa --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/error/__init__.py @@ -0,0 +1 @@ +__author__ = 'ericvergnaud' diff --git a/.venv/lib/python3.13/site-packages/antlr4/error/__pycache__/DiagnosticErrorListener.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/error/__pycache__/DiagnosticErrorListener.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..41c69b6fb5b098c45fed8dc363b90f70aaff3edb Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/error/__pycache__/DiagnosticErrorListener.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/error/__pycache__/ErrorListener.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/error/__pycache__/ErrorListener.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..410aa2c2f6075d8049092654df7e81a730688e24 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/error/__pycache__/ErrorListener.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/error/__pycache__/ErrorStrategy.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/error/__pycache__/ErrorStrategy.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4d908d9309da93772500065820c9bfaf0232ee23 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/error/__pycache__/ErrorStrategy.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/error/__pycache__/Errors.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/error/__pycache__/Errors.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d105d9bd72a0a80f563d33d09edbc5e19dbd7d84 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/error/__pycache__/Errors.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/error/__pycache__/__init__.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/error/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9b8e112295d08327a18d5e7d8d3b8f1ceddfea43 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/error/__pycache__/__init__.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/tree/Chunk.py b/.venv/lib/python3.13/site-packages/antlr4/tree/Chunk.py new file mode 100644 index 0000000000000000000000000000000000000000..081419a34f65463b370b848b141192bfe491befd --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/tree/Chunk.py @@ -0,0 +1,30 @@ +# +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +# + +class Chunk(object): + pass + +class TagChunk(Chunk): + __slots__ = ('tag', 'label') + + def __init__(self, tag:str, label:str=None): + self.tag = tag + self.label = label + + def __str__(self): + if self.label is None: + return self.tag + else: + return self.label + ":" + self.tag + +class TextChunk(Chunk): + __slots__ = 'text' + + def __init__(self, text:str): + self.text = text + + def __str__(self): + return "'" + self.text + "'" diff --git a/.venv/lib/python3.13/site-packages/antlr4/tree/ParseTreeMatch.py b/.venv/lib/python3.13/site-packages/antlr4/tree/ParseTreeMatch.py new file mode 100644 index 0000000000000000000000000000000000000000..c02bc0357d26b343a72307cda77ff62fe307a44a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/tree/ParseTreeMatch.py @@ -0,0 +1,118 @@ +# +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +# + + +# +# Represents the result of matching a {@link ParseTree} against a tree pattern. +# +from io import StringIO +from antlr4.tree.ParseTreePattern import ParseTreePattern +from antlr4.tree.Tree import ParseTree + + +class ParseTreeMatch(object): + __slots__ = ('tree', 'pattern', 'labels', 'mismatchedNode') + # + # Constructs a new instance of {@link ParseTreeMatch} from the specified + # parse tree and pattern. + # + # @param tree The parse tree to match against the pattern. + # @param pattern The parse tree pattern. + # @param labels A mapping from label names to collections of + # {@link ParseTree} objects located by the tree pattern matching process. + # @param mismatchedNode The first node which failed to match the tree + # pattern during the matching process. + # + # @exception IllegalArgumentException if {@code tree} is {@code null} + # @exception IllegalArgumentException if {@code pattern} is {@code null} + # @exception IllegalArgumentException if {@code labels} is {@code null} + # + def __init__(self, tree:ParseTree, pattern:ParseTreePattern, labels:dict, mismatchedNode:ParseTree): + if tree is None: + raise Exception("tree cannot be null") + if pattern is None: + raise Exception("pattern cannot be null") + if labels is None: + raise Exception("labels cannot be null") + self.tree = tree + self.pattern = pattern + self.labels = labels + self.mismatchedNode = mismatchedNode + + # + # Get the last node associated with a specific {@code label}. + # + #

For example, for pattern {@code }, {@code get("id")} returns the + # node matched for that {@code ID}. If more than one node + # matched the specified label, only the last is returned. If there is + # no node associated with the label, this returns {@code null}.

+ # + #

Pattern tags like {@code } and {@code } without labels are + # considered to be labeled with {@code ID} and {@code expr}, respectively.

+ # + # @param label The label to check. + # + # @return The last {@link ParseTree} to match a tag with the specified + # label, or {@code null} if no parse tree matched a tag with the label. + # + def get(self, label:str): + parseTrees = self.labels.get(label, None) + if parseTrees is None or len(parseTrees)==0: + return None + else: + return parseTrees[len(parseTrees)-1] + + # + # Return all nodes matching a rule or token tag with the specified label. + # + #

If the {@code label} is the name of a parser rule or token in the + # grammar, the resulting list will contain both the parse trees matching + # rule or tags explicitly labeled with the label and the complete set of + # parse trees matching the labeled and unlabeled tags in the pattern for + # the parser rule or token. For example, if {@code label} is {@code "foo"}, + # the result will contain all of the following.

+ # + #
    + #
  • Parse tree nodes matching tags of the form {@code } and + # {@code }.
  • + #
  • Parse tree nodes matching tags of the form {@code }.
  • + #
  • Parse tree nodes matching tags of the form {@code }.
  • + #
+ # + # @param label The label. + # + # @return A collection of all {@link ParseTree} nodes matching tags with + # the specified {@code label}. If no nodes matched the label, an empty list + # is returned. + # + def getAll(self, label:str): + nodes = self.labels.get(label, None) + if nodes is None: + return list() + else: + return nodes + + + # + # Gets a value indicating whether the match operation succeeded. + # + # @return {@code true} if the match operation succeeded; otherwise, + # {@code false}. + # + def succeeded(self): + return self.mismatchedNode is None + + # + # {@inheritDoc} + # + def __str__(self): + with StringIO() as buf: + buf.write("Match ") + buf.write("succeeded" if self.succeeded() else "failed") + buf.write("; found ") + buf.write(str(len(self.labels))) + buf.write(" labels") + return buf.getvalue() diff --git a/.venv/lib/python3.13/site-packages/antlr4/tree/ParseTreePattern.py b/.venv/lib/python3.13/site-packages/antlr4/tree/ParseTreePattern.py new file mode 100644 index 0000000000000000000000000000000000000000..37fd0bf09f478d47f927b3fdf7d7a32da1c0b795 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/tree/ParseTreePattern.py @@ -0,0 +1,72 @@ +# +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +# + +# +# A pattern like {@code = ;} converted to a {@link ParseTree} by +# {@link ParseTreePatternMatcher#compile(String, int)}. +# +from antlr4.tree.ParseTreePatternMatcher import ParseTreePatternMatcher +from antlr4.tree.Tree import ParseTree +from antlr4.xpath.XPath import XPath + + +class ParseTreePattern(object): + __slots__ = ('matcher', 'patternRuleIndex', 'pattern', 'patternTree') + + # Construct a new instance of the {@link ParseTreePattern} class. + # + # @param matcher The {@link ParseTreePatternMatcher} which created this + # tree pattern. + # @param pattern The tree pattern in concrete syntax form. + # @param patternRuleIndex The parser rule which serves as the root of the + # tree pattern. + # @param patternTree The tree pattern in {@link ParseTree} form. + # + def __init__(self, matcher:ParseTreePatternMatcher, pattern:str, patternRuleIndex:int , patternTree:ParseTree): + self.matcher = matcher + self.patternRuleIndex = patternRuleIndex + self.pattern = pattern + self.patternTree = patternTree + + # + # Match a specific parse tree against this tree pattern. + # + # @param tree The parse tree to match against this tree pattern. + # @return A {@link ParseTreeMatch} object describing the result of the + # match operation. The {@link ParseTreeMatch#succeeded()} method can be + # used to determine whether or not the match was successful. + # + def match(self, tree:ParseTree): + return self.matcher.match(tree, self) + + # + # Determine whether or not a parse tree matches this tree pattern. + # + # @param tree The parse tree to match against this tree pattern. + # @return {@code true} if {@code tree} is a match for the current tree + # pattern; otherwise, {@code false}. + # + def matches(self, tree:ParseTree): + return self.matcher.match(tree, self).succeeded() + + # Find all nodes using XPath and then try to match those subtrees against + # this tree pattern. + # + # @param tree The {@link ParseTree} to match against this pattern. + # @param xpath An expression matching the nodes + # + # @return A collection of {@link ParseTreeMatch} objects describing the + # successful matches. Unsuccessful matches are omitted from the result, + # regardless of the reason for the failure. + # + def findAll(self, tree:ParseTree, xpath:str): + subtrees = XPath.findAll(tree, xpath, self.matcher.parser) + matches = list() + for t in subtrees: + match = self.match(t) + if match.succeeded(): + matches.append(match) + return matches diff --git a/.venv/lib/python3.13/site-packages/antlr4/tree/ParseTreePatternMatcher.py b/.venv/lib/python3.13/site-packages/antlr4/tree/ParseTreePatternMatcher.py new file mode 100644 index 0000000000000000000000000000000000000000..62fd197b0d143393fa187ead9b0c576112b486be --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/tree/ParseTreePatternMatcher.py @@ -0,0 +1,374 @@ +# +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +# + +# +# A tree pattern matching mechanism for ANTLR {@link ParseTree}s. +# +#

Patterns are strings of source input text with special tags representing +# token or rule references such as:

+# +#

{@code = ;}

+# +#

Given a pattern start rule such as {@code statement}, this object constructs +# a {@link ParseTree} with placeholders for the {@code ID} and {@code expr} +# subtree. Then the {@link #match} routines can compare an actual +# {@link ParseTree} from a parse with this pattern. Tag {@code } matches +# any {@code ID} token and tag {@code } references the result of the +# {@code expr} rule (generally an instance of {@code ExprContext}.

+# +#

Pattern {@code x = 0;} is a similar pattern that matches the same pattern +# except that it requires the identifier to be {@code x} and the expression to +# be {@code 0}.

+# +#

The {@link #matches} routines return {@code true} or {@code false} based +# upon a match for the tree rooted at the parameter sent in. The +# {@link #match} routines return a {@link ParseTreeMatch} object that +# contains the parse tree, the parse tree pattern, and a map from tag name to +# matched nodes (more below). A subtree that fails to match, returns with +# {@link ParseTreeMatch#mismatchedNode} set to the first tree node that did not +# match.

+# +#

For efficiency, you can compile a tree pattern in string form to a +# {@link ParseTreePattern} object.

+# +#

See {@code TestParseTreeMatcher} for lots of examples. +# {@link ParseTreePattern} has two static helper methods: +# {@link ParseTreePattern#findAll} and {@link ParseTreePattern#match} that +# are easy to use but not super efficient because they create new +# {@link ParseTreePatternMatcher} objects each time and have to compile the +# pattern in string form before using it.

+# +#

The lexer and parser that you pass into the {@link ParseTreePatternMatcher} +# constructor are used to parse the pattern in string form. The lexer converts +# the {@code = ;} into a sequence of four tokens (assuming lexer +# throws out whitespace or puts it on a hidden channel). Be aware that the +# input stream is reset for the lexer (but not the parser; a +# {@link ParserInterpreter} is created to parse the input.). Any user-defined +# fields you have put into the lexer might get changed when this mechanism asks +# it to scan the pattern string.

+# +#

Normally a parser does not accept token {@code } as a valid +# {@code expr} but, from the parser passed in, we create a special version of +# the underlying grammar representation (an {@link ATN}) that allows imaginary +# tokens representing rules ({@code }) to match entire rules. We call +# these bypass alternatives.

+# +#

Delimiters are {@code <} and {@code >}, with {@code \} as the escape string +# by default, but you can set them to whatever you want using +# {@link #setDelimiters}. You must escape both start and stop strings +# {@code \<} and {@code \>}.

+# +from antlr4.CommonTokenStream import CommonTokenStream +from antlr4.InputStream import InputStream +from antlr4.ParserRuleContext import ParserRuleContext +from antlr4.Lexer import Lexer +from antlr4.ListTokenSource import ListTokenSource +from antlr4.Token import Token +from antlr4.error.ErrorStrategy import BailErrorStrategy +from antlr4.error.Errors import RecognitionException, ParseCancellationException +from antlr4.tree.Chunk import TagChunk, TextChunk +from antlr4.tree.RuleTagToken import RuleTagToken +from antlr4.tree.TokenTagToken import TokenTagToken +from antlr4.tree.Tree import ParseTree, TerminalNode, RuleNode + +# need forward declaration +Parser = None +ParseTreePattern = None + +class CannotInvokeStartRule(Exception): + + def __init__(self, e:Exception): + super().__init__(e) + +class StartRuleDoesNotConsumeFullPattern(Exception): + + pass + + +class ParseTreePatternMatcher(object): + __slots__ = ('lexer', 'parser', 'start', 'stop', 'escape') + + # Constructs a {@link ParseTreePatternMatcher} or from a {@link Lexer} and + # {@link Parser} object. The lexer input stream is altered for tokenizing + # the tree patterns. The parser is used as a convenient mechanism to get + # the grammar name, plus token, rule names. + def __init__(self, lexer:Lexer, parser:Parser): + self.lexer = lexer + self.parser = parser + self.start = "<" + self.stop = ">" + self.escape = "\\" # e.g., \< and \> must escape BOTH! + + # Set the delimiters used for marking rule and token tags within concrete + # syntax used by the tree pattern parser. + # + # @param start The start delimiter. + # @param stop The stop delimiter. + # @param escapeLeft The escape sequence to use for escaping a start or stop delimiter. + # + # @exception IllegalArgumentException if {@code start} is {@code null} or empty. + # @exception IllegalArgumentException if {@code stop} is {@code null} or empty. + # + def setDelimiters(self, start:str, stop:str, escapeLeft:str): + if start is None or len(start)==0: + raise Exception("start cannot be null or empty") + if stop is None or len(stop)==0: + raise Exception("stop cannot be null or empty") + self.start = start + self.stop = stop + self.escape = escapeLeft + + # Does {@code pattern} matched as rule {@code patternRuleIndex} match {@code tree}?# + def matchesRuleIndex(self, tree:ParseTree, pattern:str, patternRuleIndex:int): + p = self.compileTreePattern(pattern, patternRuleIndex) + return self.matches(tree, p) + + # Does {@code pattern} matched as rule patternRuleIndex match tree? Pass in a + # compiled pattern instead of a string representation of a tree pattern. + # + def matchesPattern(self, tree:ParseTree, pattern:ParseTreePattern): + mismatchedNode = self.matchImpl(tree, pattern.patternTree, dict()) + return mismatchedNode is None + + # + # Compare {@code pattern} matched as rule {@code patternRuleIndex} against + # {@code tree} and return a {@link ParseTreeMatch} object that contains the + # matched elements, or the node at which the match failed. + # + def matchRuleIndex(self, tree:ParseTree, pattern:str, patternRuleIndex:int): + p = self.compileTreePattern(pattern, patternRuleIndex) + return self.matchPattern(tree, p) + + # + # Compare {@code pattern} matched against {@code tree} and return a + # {@link ParseTreeMatch} object that contains the matched elements, or the + # node at which the match failed. Pass in a compiled pattern instead of a + # string representation of a tree pattern. + # + def matchPattern(self, tree:ParseTree, pattern:ParseTreePattern): + labels = dict() + mismatchedNode = self.matchImpl(tree, pattern.patternTree, labels) + from antlr4.tree.ParseTreeMatch import ParseTreeMatch + return ParseTreeMatch(tree, pattern, labels, mismatchedNode) + + # + # For repeated use of a tree pattern, compile it to a + # {@link ParseTreePattern} using this method. + # + def compileTreePattern(self, pattern:str, patternRuleIndex:int): + tokenList = self.tokenize(pattern) + tokenSrc = ListTokenSource(tokenList) + tokens = CommonTokenStream(tokenSrc) + from antlr4.ParserInterpreter import ParserInterpreter + parserInterp = ParserInterpreter(self.parser.grammarFileName, self.parser.tokenNames, + self.parser.ruleNames, self.parser.getATNWithBypassAlts(),tokens) + tree = None + try: + parserInterp.setErrorHandler(BailErrorStrategy()) + tree = parserInterp.parse(patternRuleIndex) + except ParseCancellationException as e: + raise e.cause + except RecognitionException as e: + raise e + except Exception as e: + raise CannotInvokeStartRule(e) + + # Make sure tree pattern compilation checks for a complete parse + if tokens.LA(1)!=Token.EOF: + raise StartRuleDoesNotConsumeFullPattern() + + from antlr4.tree.ParseTreePattern import ParseTreePattern + return ParseTreePattern(self, pattern, patternRuleIndex, tree) + + # + # Recursively walk {@code tree} against {@code patternTree}, filling + # {@code match.}{@link ParseTreeMatch#labels labels}. + # + # @return the first node encountered in {@code tree} which does not match + # a corresponding node in {@code patternTree}, or {@code null} if the match + # was successful. The specific node returned depends on the matching + # algorithm used by the implementation, and may be overridden. + # + def matchImpl(self, tree:ParseTree, patternTree:ParseTree, labels:dict): + if tree is None: + raise Exception("tree cannot be null") + if patternTree is None: + raise Exception("patternTree cannot be null") + + # x and , x and y, or x and x; or could be mismatched types + if isinstance(tree, TerminalNode) and isinstance(patternTree, TerminalNode ): + mismatchedNode = None + # both are tokens and they have same type + if tree.symbol.type == patternTree.symbol.type: + if isinstance( patternTree.symbol, TokenTagToken ): # x and + tokenTagToken = patternTree.symbol + # track label->list-of-nodes for both token name and label (if any) + self.map(labels, tokenTagToken.tokenName, tree) + if tokenTagToken.label is not None: + self.map(labels, tokenTagToken.label, tree) + elif tree.getText()==patternTree.getText(): + # x and x + pass + else: + # x and y + if mismatchedNode is None: + mismatchedNode = tree + else: + if mismatchedNode is None: + mismatchedNode = tree + + return mismatchedNode + + if isinstance(tree, ParserRuleContext) and isinstance(patternTree, ParserRuleContext): + mismatchedNode = None + # (expr ...) and + ruleTagToken = self.getRuleTagToken(patternTree) + if ruleTagToken is not None: + m = None + if tree.ruleContext.ruleIndex == patternTree.ruleContext.ruleIndex: + # track label->list-of-nodes for both rule name and label (if any) + self.map(labels, ruleTagToken.ruleName, tree) + if ruleTagToken.label is not None: + self.map(labels, ruleTagToken.label, tree) + else: + if mismatchedNode is None: + mismatchedNode = tree + + return mismatchedNode + + # (expr ...) and (expr ...) + if tree.getChildCount()!=patternTree.getChildCount(): + if mismatchedNode is None: + mismatchedNode = tree + return mismatchedNode + + n = tree.getChildCount() + for i in range(0, n): + childMatch = self.matchImpl(tree.getChild(i), patternTree.getChild(i), labels) + if childMatch is not None: + return childMatch + + return mismatchedNode + + # if nodes aren't both tokens or both rule nodes, can't match + return tree + + def map(self, labels, label, tree): + v = labels.get(label, None) + if v is None: + v = list() + labels[label] = v + v.append(tree) + + # Is {@code t} {@code (expr )} subtree?# + def getRuleTagToken(self, tree:ParseTree): + if isinstance( tree, RuleNode ): + if tree.getChildCount()==1 and isinstance(tree.getChild(0), TerminalNode ): + c = tree.getChild(0) + if isinstance( c.symbol, RuleTagToken ): + return c.symbol + return None + + def tokenize(self, pattern:str): + # split pattern into chunks: sea (raw input) and islands (, ) + chunks = self.split(pattern) + + # create token stream from text and tags + tokens = list() + for chunk in chunks: + if isinstance( chunk, TagChunk ): + # add special rule token or conjure up new token from name + if chunk.tag[0].isupper(): + ttype = self.parser.getTokenType(chunk.tag) + if ttype==Token.INVALID_TYPE: + raise Exception("Unknown token " + str(chunk.tag) + " in pattern: " + pattern) + tokens.append(TokenTagToken(chunk.tag, ttype, chunk.label)) + elif chunk.tag[0].islower(): + ruleIndex = self.parser.getRuleIndex(chunk.tag) + if ruleIndex==-1: + raise Exception("Unknown rule " + str(chunk.tag) + " in pattern: " + pattern) + ruleImaginaryTokenType = self.parser.getATNWithBypassAlts().ruleToTokenType[ruleIndex] + tokens.append(RuleTagToken(chunk.tag, ruleImaginaryTokenType, chunk.label)) + else: + raise Exception("invalid tag: " + str(chunk.tag) + " in pattern: " + pattern) + else: + self.lexer.setInputStream(InputStream(chunk.text)) + t = self.lexer.nextToken() + while t.type!=Token.EOF: + tokens.append(t) + t = self.lexer.nextToken() + return tokens + + # Split {@code = ;} into 4 chunks for tokenizing by {@link #tokenize}.# + def split(self, pattern:str): + p = 0 + n = len(pattern) + chunks = list() + # find all start and stop indexes first, then collect + starts = list() + stops = list() + while p < n : + if p == pattern.find(self.escape + self.start, p): + p += len(self.escape) + len(self.start) + elif p == pattern.find(self.escape + self.stop, p): + p += len(self.escape) + len(self.stop) + elif p == pattern.find(self.start, p): + starts.append(p) + p += len(self.start) + elif p == pattern.find(self.stop, p): + stops.append(p) + p += len(self.stop) + else: + p += 1 + + nt = len(starts) + + if nt > len(stops): + raise Exception("unterminated tag in pattern: " + pattern) + if nt < len(stops): + raise Exception("missing start tag in pattern: " + pattern) + + for i in range(0, nt): + if starts[i] >= stops[i]: + raise Exception("tag delimiters out of order in pattern: " + pattern) + + # collect into chunks now + if nt==0: + chunks.append(TextChunk(pattern)) + + if nt>0 and starts[0]>0: # copy text up to first tag into chunks + text = pattern[0:starts[0]] + chunks.add(TextChunk(text)) + + for i in range(0, nt): + # copy inside of + tag = pattern[starts[i] + len(self.start) : stops[i]] + ruleOrToken = tag + label = None + colon = tag.find(':') + if colon >= 0: + label = tag[0:colon] + ruleOrToken = tag[colon+1 : len(tag)] + chunks.append(TagChunk(label, ruleOrToken)) + if i+1 < len(starts): + # copy from end of to start of next + text = pattern[stops[i] + len(self.stop) : starts[i + 1]] + chunks.append(TextChunk(text)) + + if nt > 0 : + afterLastTag = stops[nt - 1] + len(self.stop) + if afterLastTag < n : # copy text from end of last tag to end + text = pattern[afterLastTag : n] + chunks.append(TextChunk(text)) + + # strip out the escape sequences from text chunks but not tags + for i in range(0, len(chunks)): + c = chunks[i] + if isinstance( c, TextChunk ): + unescaped = c.text.replace(self.escape, "") + if len(unescaped) < len(c.text): + chunks[i] = TextChunk(unescaped) + return chunks diff --git a/.venv/lib/python3.13/site-packages/antlr4/tree/RuleTagToken.py b/.venv/lib/python3.13/site-packages/antlr4/tree/RuleTagToken.py new file mode 100644 index 0000000000000000000000000000000000000000..a198f7da13643d538ce96aeeb6a8ff4f757f1ecd --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/tree/RuleTagToken.py @@ -0,0 +1,50 @@ +# +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +# + +# +# A {@link Token} object representing an entire subtree matched by a parser +# rule; e.g., {@code }. These tokens are created for {@link TagChunk} +# chunks where the tag corresponds to a parser rule. +# +from antlr4.Token import Token + + +class RuleTagToken(Token): + __slots__ = ('label', 'ruleName') + # + # Constructs a new instance of {@link RuleTagToken} with the specified rule + # name, bypass token type, and label. + # + # @param ruleName The name of the parser rule this rule tag matches. + # @param bypassTokenType The bypass token type assigned to the parser rule. + # @param label The label associated with the rule tag, or {@code null} if + # the rule tag is unlabeled. + # + # @exception IllegalArgumentException if {@code ruleName} is {@code null} + # or empty. + + def __init__(self, ruleName:str, bypassTokenType:int, label:str=None): + if ruleName is None or len(ruleName)==0: + raise Exception("ruleName cannot be null or empty.") + self.source = None + self.type = bypassTokenType # token type of the token + self.channel = Token.DEFAULT_CHANNEL # The parser ignores everything not on DEFAULT_CHANNEL + self.start = -1 # optional; return -1 if not implemented. + self.stop = -1 # optional; return -1 if not implemented. + self.tokenIndex = -1 # from 0..n-1 of the token object in the input stream + self.line = 0 # line=1..n of the 1st character + self.column = -1 # beginning of the line at which it occurs, 0..n-1 + self.label = label + self._text = self.getText() # text of the token. + + self.ruleName = ruleName + + + def getText(self): + if self.label is None: + return "<" + self.ruleName + ">" + else: + return "<" + self.label + ":" + self.ruleName + ">" diff --git a/.venv/lib/python3.13/site-packages/antlr4/tree/TokenTagToken.py b/.venv/lib/python3.13/site-packages/antlr4/tree/TokenTagToken.py new file mode 100644 index 0000000000000000000000000000000000000000..b7beeb87684c06606e17053f0f74fcae36876959 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/tree/TokenTagToken.py @@ -0,0 +1,47 @@ +# +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +# + +# +# A {@link Token} object representing a token of a particular type; e.g., +# {@code }. These tokens are created for {@link TagChunk} chunks where the +# tag corresponds to a lexer rule or token type. +# +from antlr4.Token import CommonToken + + +class TokenTagToken(CommonToken): + __slots__ = ('tokenName', 'label') + # Constructs a new instance of {@link TokenTagToken} with the specified + # token name, type, and label. + # + # @param tokenName The token name. + # @param type The token type. + # @param label The label associated with the token tag, or {@code null} if + # the token tag is unlabeled. + # + def __init__(self, tokenName:str, type:int, label:str=None): + super().__init__(type=type) + self.tokenName = tokenName + self.label = label + self._text = self.getText() + + # + # {@inheritDoc} + # + #

The implementation for {@link TokenTagToken} returns the token tag + # formatted with {@code <} and {@code >} delimiters.

+ # + def getText(self): + if self.label is None: + return "<" + self.tokenName + ">" + else: + return "<" + self.label + ":" + self.tokenName + ">" + + #

The implementation for {@link TokenTagToken} returns a string of the form + # {@code tokenName:type}.

+ # + def __str__(self): + return self.tokenName + ":" + str(self.type) diff --git a/.venv/lib/python3.13/site-packages/antlr4/tree/Tree.py b/.venv/lib/python3.13/site-packages/antlr4/tree/Tree.py new file mode 100644 index 0000000000000000000000000000000000000000..812acc96bbee97860bc8a914feedcd0584def050 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/tree/Tree.py @@ -0,0 +1,191 @@ +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +#/ + + +# The basic notion of a tree has a parent, a payload, and a list of children. +# It is the most abstract interface for all the trees used by ANTLR. +#/ +from antlr4.Token import Token + +INVALID_INTERVAL = (-1, -2) + +class Tree(object): + pass + +class SyntaxTree(Tree): + pass + +class ParseTree(SyntaxTree): + pass + +class RuleNode(ParseTree): + pass + +class TerminalNode(ParseTree): + pass + +class ErrorNode(TerminalNode): + pass + +class ParseTreeVisitor(object): + def visit(self, tree): + return tree.accept(self) + + def visitChildren(self, node): + result = self.defaultResult() + n = node.getChildCount() + for i in range(n): + if not self.shouldVisitNextChild(node, result): + return result + + c = node.getChild(i) + childResult = c.accept(self) + result = self.aggregateResult(result, childResult) + + return result + + def visitTerminal(self, node): + return self.defaultResult() + + def visitErrorNode(self, node): + return self.defaultResult() + + def defaultResult(self): + return None + + def aggregateResult(self, aggregate, nextResult): + return nextResult + + def shouldVisitNextChild(self, node, currentResult): + return True + +ParserRuleContext = None + +class ParseTreeListener(object): + + def visitTerminal(self, node:TerminalNode): + pass + + def visitErrorNode(self, node:ErrorNode): + pass + + def enterEveryRule(self, ctx:ParserRuleContext): + pass + + def exitEveryRule(self, ctx:ParserRuleContext): + pass + +del ParserRuleContext + +class TerminalNodeImpl(TerminalNode): + __slots__ = ('parentCtx', 'symbol') + + def __init__(self, symbol:Token): + self.parentCtx = None + self.symbol = symbol + def __setattr__(self, key, value): + super().__setattr__(key, value) + + def getChild(self, i:int): + return None + + def getSymbol(self): + return self.symbol + + def getParent(self): + return self.parentCtx + + def getPayload(self): + return self.symbol + + def getSourceInterval(self): + if self.symbol is None: + return INVALID_INTERVAL + tokenIndex = self.symbol.tokenIndex + return (tokenIndex, tokenIndex) + + def getChildCount(self): + return 0 + + def accept(self, visitor:ParseTreeVisitor): + return visitor.visitTerminal(self) + + def getText(self): + return self.symbol.text + + def __str__(self): + if self.symbol.type == Token.EOF: + return "" + else: + return self.symbol.text + +# Represents a token that was consumed during resynchronization +# rather than during a valid match operation. For example, +# we will create this kind of a node during single token insertion +# and deletion as well as during "consume until error recovery set" +# upon no viable alternative exceptions. + +class ErrorNodeImpl(TerminalNodeImpl,ErrorNode): + + def __init__(self, token:Token): + super().__init__(token) + + def accept(self, visitor:ParseTreeVisitor): + return visitor.visitErrorNode(self) + + +class ParseTreeWalker(object): + + DEFAULT = None + + def walk(self, listener:ParseTreeListener, t:ParseTree): + """ + Performs a walk on the given parse tree starting at the root and going down recursively + with depth-first search. On each node, {@link ParseTreeWalker#enterRule} is called before + recursively walking down into child nodes, then + {@link ParseTreeWalker#exitRule} is called after the recursive call to wind up. + @param listener The listener used by the walker to process grammar rules + @param t The parse tree to be walked on + """ + if isinstance(t, ErrorNode): + listener.visitErrorNode(t) + return + elif isinstance(t, TerminalNode): + listener.visitTerminal(t) + return + self.enterRule(listener, t) + for child in t.getChildren(): + self.walk(listener, child) + self.exitRule(listener, t) + + # + # The discovery of a rule node, involves sending two events: the generic + # {@link ParseTreeListener#enterEveryRule} and a + # {@link RuleContext}-specific event. First we trigger the generic and then + # the rule specific. We to them in reverse order upon finishing the node. + # + def enterRule(self, listener:ParseTreeListener, r:RuleNode): + """ + Enters a grammar rule by first triggering the generic event {@link ParseTreeListener#enterEveryRule} + then by triggering the event specific to the given parse tree node + @param listener The listener responding to the trigger events + @param r The grammar rule containing the rule context + """ + ctx = r.getRuleContext() + listener.enterEveryRule(ctx) + ctx.enterRule(listener) + + def exitRule(self, listener:ParseTreeListener, r:RuleNode): + """ + Exits a grammar rule by first triggering the event specific to the given parse tree node + then by triggering the generic event {@link ParseTreeListener#exitEveryRule} + @param listener The listener responding to the trigger events + @param r The grammar rule containing the rule context + """ + ctx = r.getRuleContext() + ctx.exitRule(listener) + listener.exitEveryRule(ctx) + +ParseTreeWalker.DEFAULT = ParseTreeWalker() diff --git a/.venv/lib/python3.13/site-packages/antlr4/tree/Trees.py b/.venv/lib/python3.13/site-packages/antlr4/tree/Trees.py new file mode 100644 index 0000000000000000000000000000000000000000..686b8cb287b3058c2e0b33dfb1567320299f214e --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/tree/Trees.py @@ -0,0 +1,111 @@ +# +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +# + + +# A set of utility routines useful for all kinds of ANTLR trees.# +from io import StringIO +from antlr4.Token import Token +from antlr4.Utils import escapeWhitespace +from antlr4.tree.Tree import RuleNode, ErrorNode, TerminalNode, Tree, ParseTree + +# need forward declaration +Parser = None + +class Trees(object): + + # Print out a whole tree in LISP form. {@link #getNodeText} is used on the + # node payloads to get the text for the nodes. Detect + # parse trees and extract data appropriately. + @classmethod + def toStringTree(cls, t:Tree, ruleNames:list=None, recog:Parser=None): + if recog is not None: + ruleNames = recog.ruleNames + s = escapeWhitespace(cls.getNodeText(t, ruleNames), False) + if t.getChildCount()==0: + return s + with StringIO() as buf: + buf.write("(") + buf.write(s) + buf.write(' ') + for i in range(0, t.getChildCount()): + if i > 0: + buf.write(' ') + buf.write(cls.toStringTree(t.getChild(i), ruleNames)) + buf.write(")") + return buf.getvalue() + + @classmethod + def getNodeText(cls, t:Tree, ruleNames:list=None, recog:Parser=None): + if recog is not None: + ruleNames = recog.ruleNames + if ruleNames is not None: + if isinstance(t, RuleNode): + if t.getAltNumber()!=0: # should use ATN.INVALID_ALT_NUMBER but won't compile + return ruleNames[t.getRuleIndex()]+":"+str(t.getAltNumber()) + return ruleNames[t.getRuleIndex()] + elif isinstance( t, ErrorNode): + return str(t) + elif isinstance(t, TerminalNode): + if t.symbol is not None: + return t.symbol.text + # no recog for rule names + payload = t.getPayload() + if isinstance(payload, Token ): + return payload.text + return str(t.getPayload()) + + + # Return ordered list of all children of this node + @classmethod + def getChildren(cls, t:Tree): + return [ t.getChild(i) for i in range(0, t.getChildCount()) ] + + # Return a list of all ancestors of this node. The first node of + # list is the root and the last is the parent of this node. + # + @classmethod + def getAncestors(cls, t:Tree): + ancestors = [] + t = t.getParent() + while t is not None: + ancestors.insert(0, t) # insert at start + t = t.getParent() + return ancestors + + @classmethod + def findAllTokenNodes(cls, t:ParseTree, ttype:int): + return cls.findAllNodes(t, ttype, True) + + @classmethod + def findAllRuleNodes(cls, t:ParseTree, ruleIndex:int): + return cls.findAllNodes(t, ruleIndex, False) + + @classmethod + def findAllNodes(cls, t:ParseTree, index:int, findTokens:bool): + nodes = [] + cls._findAllNodes(t, index, findTokens, nodes) + return nodes + + @classmethod + def _findAllNodes(cls, t:ParseTree, index:int, findTokens:bool, nodes:list): + from antlr4.ParserRuleContext import ParserRuleContext + # check this node (the root) first + if findTokens and isinstance(t, TerminalNode): + if t.symbol.type==index: + nodes.append(t) + elif not findTokens and isinstance(t, ParserRuleContext): + if t.ruleIndex == index: + nodes.append(t) + # check children + for i in range(0, t.getChildCount()): + cls._findAllNodes(t.getChild(i), index, findTokens, nodes) + + @classmethod + def descendants(cls, t:ParseTree): + nodes = [t] + for i in range(0, t.getChildCount()): + nodes.extend(cls.descendants(t.getChild(i))) + return nodes diff --git a/.venv/lib/python3.13/site-packages/antlr4/tree/__init__.py b/.venv/lib/python3.13/site-packages/antlr4/tree/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/.venv/lib/python3.13/site-packages/antlr4/tree/__pycache__/Chunk.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/tree/__pycache__/Chunk.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f9dbc7f137beec817bb6ab4f96718904840e86bb Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/tree/__pycache__/Chunk.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/tree/__pycache__/ParseTreePatternMatcher.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/tree/__pycache__/ParseTreePatternMatcher.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8991c98b968b24d44d26254e6906704eac2f604c Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/tree/__pycache__/ParseTreePatternMatcher.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/tree/__pycache__/RuleTagToken.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/tree/__pycache__/RuleTagToken.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3ea511e1c00bd8c5fabd5fc856f28193fd2b3988 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/tree/__pycache__/RuleTagToken.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/tree/__pycache__/TokenTagToken.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/tree/__pycache__/TokenTagToken.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5ee76a99c1bc67e7ab1101b7a7fcc5c94ef76830 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/tree/__pycache__/TokenTagToken.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/tree/__pycache__/Tree.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/tree/__pycache__/Tree.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5c3ffb35b455b0036339668bf4f2a6cb513130fe Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/tree/__pycache__/Tree.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/tree/__pycache__/Trees.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/tree/__pycache__/Trees.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..49e9d5de6e9abfe475331498603eb1c21f189f5a Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/tree/__pycache__/Trees.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/tree/__pycache__/__init__.cpython-313.pyc b/.venv/lib/python3.13/site-packages/antlr4/tree/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5f7d76762294448ae39295caf494db2272ead282 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/antlr4/tree/__pycache__/__init__.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/antlr4/xpath/XPath.py b/.venv/lib/python3.13/site-packages/antlr4/xpath/XPath.py new file mode 100644 index 0000000000000000000000000000000000000000..24029e7cf2bfa9798538211bc7599b49dbb70191 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/xpath/XPath.py @@ -0,0 +1,352 @@ +# +# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. +# Use of this file is governed by the BSD 3-clause license that +# can be found in the LICENSE.txt file in the project root. +# + +# +# Represent a subset of XPath XML path syntax for use in identifying nodes in +# parse trees. +# +#

+# Split path into words and separators {@code /} and {@code //} via ANTLR +# itself then walk path elements from left to right. At each separator-word +# pair, find set of nodes. Next stage uses those as work list.

+# +#

+# The basic interface is +# {@link XPath#findAll ParseTree.findAll}{@code (tree, pathString, parser)}. +# But that is just shorthand for:

+# +#
+# {@link XPath} p = new {@link XPath#XPath XPath}(parser, pathString);
+# return p.{@link #evaluate evaluate}(tree);
+# 
+# +#

+# See {@code org.antlr.v4.test.TestXPath} for descriptions. In short, this +# allows operators:

+# +#
+#
/
root
+#
//
anywhere
+#
!
invert; this must appear directly after root or anywhere +# operator
+#
+# +#

+# and path elements:

+# +#
+#
ID
token name
+#
'string'
any string literal token from the grammar
+#
expr
rule name
+#
*
wildcard matching any node
+#
+# +#

+# Whitespace is not allowed.

+# +from antlr4 import CommonTokenStream, DFA, PredictionContextCache, Lexer, LexerATNSimulator, ParserRuleContext, TerminalNode +from antlr4.InputStream import InputStream +from antlr4.Parser import Parser +from antlr4.RuleContext import RuleContext +from antlr4.Token import Token +from antlr4.atn.ATNDeserializer import ATNDeserializer +from antlr4.error.ErrorListener import ErrorListener +from antlr4.error.Errors import LexerNoViableAltException +from antlr4.tree.Tree import ParseTree +from antlr4.tree.Trees import Trees +from io import StringIO + + +def serializedATN(): + with StringIO() as buf: + buf.write("\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2\n") + buf.write("\64\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t") + buf.write("\7\4\b\t\b\4\t\t\t\3\2\3\2\3\2\3\3\3\3\3\4\3\4\3\5\3\5") + buf.write("\3\6\3\6\7\6\37\n\6\f\6\16\6\"\13\6\3\6\3\6\3\7\3\7\5") + buf.write("\7(\n\7\3\b\3\b\3\t\3\t\7\t.\n\t\f\t\16\t\61\13\t\3\t") + buf.write("\3\t\3/\2\n\3\5\5\6\7\7\t\b\13\t\r\2\17\2\21\n\3\2\4\7") + buf.write("\2\62;aa\u00b9\u00b9\u0302\u0371\u2041\u2042\17\2C\\c") + buf.write("|\u00c2\u00d8\u00da\u00f8\u00fa\u0301\u0372\u037f\u0381") + buf.write("\u2001\u200e\u200f\u2072\u2191\u2c02\u2ff1\u3003\ud801") + buf.write("\uf902\ufdd1\ufdf2\uffff\64\2\3\3\2\2\2\2\5\3\2\2\2\2") + buf.write("\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\21\3\2\2\2\3\23") + buf.write("\3\2\2\2\5\26\3\2\2\2\7\30\3\2\2\2\t\32\3\2\2\2\13\34") + buf.write("\3\2\2\2\r\'\3\2\2\2\17)\3\2\2\2\21+\3\2\2\2\23\24\7\61") + buf.write("\2\2\24\25\7\61\2\2\25\4\3\2\2\2\26\27\7\61\2\2\27\6\3") + buf.write("\2\2\2\30\31\7,\2\2\31\b\3\2\2\2\32\33\7#\2\2\33\n\3\2") + buf.write("\2\2\34 \5\17\b\2\35\37\5\r\7\2\36\35\3\2\2\2\37\"\3\2") + buf.write("\2\2 \36\3\2\2\2 !\3\2\2\2!#\3\2\2\2\" \3\2\2\2#$\b\6") + buf.write("\2\2$\f\3\2\2\2%(\5\17\b\2&(\t\2\2\2\'%\3\2\2\2\'&\3\2") + buf.write("\2\2(\16\3\2\2\2)*\t\3\2\2*\20\3\2\2\2+/\7)\2\2,.\13\2") + buf.write("\2\2-,\3\2\2\2.\61\3\2\2\2/\60\3\2\2\2/-\3\2\2\2\60\62") + buf.write("\3\2\2\2\61/\3\2\2\2\62\63\7)\2\2\63\22\3\2\2\2\6\2 \'") + buf.write("/\3\3\6\2") + return buf.getvalue() + + +class XPathLexer(Lexer): + + atn = ATNDeserializer().deserialize(serializedATN()) + + decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ] + + + TOKEN_REF = 1 + RULE_REF = 2 + ANYWHERE = 3 + ROOT = 4 + WILDCARD = 5 + BANG = 6 + ID = 7 + STRING = 8 + + modeNames = [ "DEFAULT_MODE" ] + + literalNames = [ "", + "'//'", "'/'", "'*'", "'!'" ] + + symbolicNames = [ "", + "TOKEN_REF", "RULE_REF", "ANYWHERE", "ROOT", "WILDCARD", "BANG", + "ID", "STRING" ] + + ruleNames = [ "ANYWHERE", "ROOT", "WILDCARD", "BANG", "ID", "NameChar", + "NameStartChar", "STRING" ] + + grammarFileName = "XPathLexer.g4" + + def __init__(self, input=None): + super().__init__(input) + self.checkVersion("4.9.1") + self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache()) + self._actions = None + self._predicates = None + + + def action(self, localctx:RuleContext, ruleIndex:int, actionIndex:int): + if self._actions is None: + actions = dict() + actions[4] = self.ID_action + self._actions = actions + _action = self._actions.get(ruleIndex, None) + if _action is not None: + _action(localctx, actionIndex) + else: + raise Exception("No registered action for: %d" % ruleIndex) + + def ID_action(self, localctx:RuleContext , actionIndex:int): + if actionIndex == 0: + char = self.text[0] + if char.isupper(): + self.type = XPathLexer.TOKEN_REF + else: + self.type = XPathLexer.RULE_REF + +class XPath(object): + + WILDCARD = "*" # word not operator/separator + NOT = "!" # word for invert operator + + def __init__(self, parser:Parser, path:str): + self.parser = parser + self.path = path + self.elements = self.split(path) + + def split(self, path:str): + input = InputStream(path) + lexer = XPathLexer(input) + def recover(self, e): + raise e + lexer.recover = recover + lexer.removeErrorListeners() + lexer.addErrorListener(ErrorListener()) # XPathErrorListener does no more + tokenStream = CommonTokenStream(lexer) + try: + tokenStream.fill() + except LexerNoViableAltException as e: + pos = lexer.column + msg = "Invalid tokens or characters at index %d in path '%s'" % (pos, path) + raise Exception(msg, e) + + tokens = iter(tokenStream.tokens) + elements = list() + for el in tokens: + invert = False + anywhere = False + # Check for path separators, if none assume root + if el.type in [XPathLexer.ROOT, XPathLexer.ANYWHERE]: + anywhere = el.type == XPathLexer.ANYWHERE + next_el = next(tokens, None) + if not next_el: + raise Exception('Missing element after %s' % el.getText()) + else: + el = next_el + # Check for bangs + if el.type == XPathLexer.BANG: + invert = True + next_el = next(tokens, None) + if not next_el: + raise Exception('Missing element after %s' % el.getText()) + else: + el = next_el + # Add searched element + if el.type in [XPathLexer.TOKEN_REF, XPathLexer.RULE_REF, XPathLexer.WILDCARD, XPathLexer.STRING]: + element = self.getXPathElement(el, anywhere) + element.invert = invert + elements.append(element) + elif el.type==Token.EOF: + break + else: + raise Exception("Unknown path element %s" % lexer.symbolicNames[el.type]) + return elements + + # + # Convert word like {@code#} or {@code ID} or {@code expr} to a path + # element. {@code anywhere} is {@code true} if {@code //} precedes the + # word. + # + def getXPathElement(self, wordToken:Token, anywhere:bool): + if wordToken.type==Token.EOF: + raise Exception("Missing path element at end of path") + + word = wordToken.text + if wordToken.type==XPathLexer.WILDCARD : + return XPathWildcardAnywhereElement() if anywhere else XPathWildcardElement() + + elif wordToken.type in [XPathLexer.TOKEN_REF, XPathLexer.STRING]: + tsource = self.parser.getTokenStream().tokenSource + + ttype = Token.INVALID_TYPE + if wordToken.type == XPathLexer.TOKEN_REF: + if word in tsource.ruleNames: + ttype = tsource.ruleNames.index(word) + 1 + else: + if word in tsource.literalNames: + ttype = tsource.literalNames.index(word) + + if ttype == Token.INVALID_TYPE: + raise Exception("%s at index %d isn't a valid token name" % (word, wordToken.tokenIndex)) + return XPathTokenAnywhereElement(word, ttype) if anywhere else XPathTokenElement(word, ttype) + + else: + ruleIndex = self.parser.ruleNames.index(word) if word in self.parser.ruleNames else -1 + + if ruleIndex == -1: + raise Exception("%s at index %d isn't a valid rule name" % (word, wordToken.tokenIndex)) + return XPathRuleAnywhereElement(word, ruleIndex) if anywhere else XPathRuleElement(word, ruleIndex) + + + @staticmethod + def findAll(tree:ParseTree, xpath:str, parser:Parser): + p = XPath(parser, xpath) + return p.evaluate(tree) + + # + # Return a list of all nodes starting at {@code t} as root that satisfy the + # path. The root {@code /} is relative to the node passed to + # {@link #evaluate}. + # + def evaluate(self, t:ParseTree): + dummyRoot = ParserRuleContext() + dummyRoot.children = [t] # don't set t's parent. + + work = [dummyRoot] + for element in self.elements: + work_next = list() + for node in work: + if not isinstance(node, TerminalNode) and node.children: + # only try to match next element if it has children + # e.g., //func/*/stat might have a token node for which + # we can't go looking for stat nodes. + matching = element.evaluate(node) + + # See issue antlr#370 - Prevents XPath from returning the + # same node multiple times + matching = filter(lambda m: m not in work_next, matching) + + work_next.extend(matching) + work = work_next + + return work + + +class XPathElement(object): + + def __init__(self, nodeName:str): + self.nodeName = nodeName + self.invert = False + + def __str__(self): + return type(self).__name__ + "[" + ("!" if self.invert else "") + self.nodeName + "]" + + + +# +# Either {@code ID} at start of path or {@code ...//ID} in middle of path. +# +class XPathRuleAnywhereElement(XPathElement): + + def __init__(self, ruleName:str, ruleIndex:int): + super().__init__(ruleName) + self.ruleIndex = ruleIndex + + def evaluate(self, t:ParseTree): + # return all ParserRuleContext descendants of t that match ruleIndex (or do not match if inverted) + return filter(lambda c: isinstance(c, ParserRuleContext) and (self.invert ^ (c.getRuleIndex() == self.ruleIndex)), Trees.descendants(t)) + +class XPathRuleElement(XPathElement): + + def __init__(self, ruleName:str, ruleIndex:int): + super().__init__(ruleName) + self.ruleIndex = ruleIndex + + def evaluate(self, t:ParseTree): + # return all ParserRuleContext children of t that match ruleIndex (or do not match if inverted) + return filter(lambda c: isinstance(c, ParserRuleContext) and (self.invert ^ (c.getRuleIndex() == self.ruleIndex)), Trees.getChildren(t)) + +class XPathTokenAnywhereElement(XPathElement): + + def __init__(self, ruleName:str, tokenType:int): + super().__init__(ruleName) + self.tokenType = tokenType + + def evaluate(self, t:ParseTree): + # return all TerminalNode descendants of t that match tokenType (or do not match if inverted) + return filter(lambda c: isinstance(c, TerminalNode) and (self.invert ^ (c.symbol.type == self.tokenType)), Trees.descendants(t)) + +class XPathTokenElement(XPathElement): + + def __init__(self, ruleName:str, tokenType:int): + super().__init__(ruleName) + self.tokenType = tokenType + + def evaluate(self, t:ParseTree): + # return all TerminalNode children of t that match tokenType (or do not match if inverted) + return filter(lambda c: isinstance(c, TerminalNode) and (self.invert ^ (c.symbol.type == self.tokenType)), Trees.getChildren(t)) + + +class XPathWildcardAnywhereElement(XPathElement): + + def __init__(self): + super().__init__(XPath.WILDCARD) + + def evaluate(self, t:ParseTree): + if self.invert: + return list() # !* is weird but valid (empty) + else: + return Trees.descendants(t) + + +class XPathWildcardElement(XPathElement): + + def __init__(self): + super().__init__(XPath.WILDCARD) + + + def evaluate(self, t:ParseTree): + if self.invert: + return list() # !* is weird but valid (empty) + else: + return Trees.getChildren(t) diff --git a/.venv/lib/python3.13/site-packages/antlr4/xpath/__init__.py b/.venv/lib/python3.13/site-packages/antlr4/xpath/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..216c000dc5ffc8e53cc9c596e420c1e67604d1aa --- /dev/null +++ b/.venv/lib/python3.13/site-packages/antlr4/xpath/__init__.py @@ -0,0 +1 @@ +__author__ = 'ericvergnaud' diff --git a/.venv/lib/python3.13/site-packages/botocore/data/aiops/2018-05-10/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/aiops/2018-05-10/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..e880c59ab32d8e259852a40be803e90e5abc898a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/aiops/2018-05-10/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d229652abf2f3e29f9b96c6b5ee460e18eb797f043f891e59b26974a52df9b7 +size 1296 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/aiops/2018-05-10/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/aiops/2018-05-10/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..4360290bfdf6ba6bb2ec4bcd6beedd30f3b74349 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/aiops/2018-05-10/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9ac243190b9dfad6933df00ec3b76da8d2e517a2674013c24d32c4c170cea78c +size 6128 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/amplify/2017-07-25/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/amplify/2017-07-25/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..0882cee1bbb1f40d01873b4cbf18771624aedf38 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/amplify/2017-07-25/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f40a1198693f574140fe804fbd14ace63fd518eeb5b7be57efb5c4c3dc99eb3d +size 17604 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/apigateway/2015-07-09/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/apigateway/2015-07-09/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..ad785ca20df2595daed7b5087f59deaf47ed5233 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/apigateway/2015-07-09/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:84ecca8268d6ceb6b8ba748f8e0ad94e2edd3cc6b424c2e68d9d498759fd5c16 +size 1151 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/apigateway/2015-07-09/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/apigateway/2015-07-09/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..995e3345ef8b0b538de1f56a137610b7ec375450 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/apigateway/2015-07-09/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:16a9e725c4822ce33e247b0edf7faeb0d1f61447da9945e709c270d14ceaaf39 +size 39734 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/apigatewaymanagementapi/2018-11-29/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/apigatewaymanagementapi/2018-11-29/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..7b0814905ef6e457b8a5691bb0a7568210a2bfb7 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/apigatewaymanagementapi/2018-11-29/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e946c073be9b94f39e0d50b673a6db9c6859279f0cb1e97beea9d6b99eb6a6b +size 1151 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/apigatewaymanagementapi/2018-11-29/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/apigatewaymanagementapi/2018-11-29/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..c6e0140f92472a270056dcb8341fd6f1c93fddd9 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/apigatewaymanagementapi/2018-11-29/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c1e1c14a04102eaf57761a2a05af2ac4f88755c148c9d7b65a95dbb7a857641 +size 1444 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/appconfig/2019-10-09/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/appconfig/2019-10-09/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..315a4382810914a5e084a859ce34e5f0efc6f1e0 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/appconfig/2019-10-09/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48580543477e08b8fed894569eaea11d869509324925fd43b8e7f034bed92ec8 +size 1230 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/appconfig/2019-10-09/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/appconfig/2019-10-09/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..64e3c2ecfc1a8e87e375a43adf7e34ed677c3f3a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/appconfig/2019-10-09/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fcc2901a04f25d2b345e17efca6e10e681ad55b728383ee155545f104e339c11 +size 19510 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/appconfigdata/2021-11-11/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/appconfigdata/2021-11-11/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..35b25debca10f040e5d8fb823c752d423de028bc --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/appconfigdata/2021-11-11/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a8d9acbb2a9323437168177f2088ee7105759bea19ba3468506dc91e62764e4 +size 1235 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/appconfigdata/2021-11-11/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/appconfigdata/2021-11-11/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..a81f131d410c12db43be51c23df93ca1120302bf --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/appconfigdata/2021-11-11/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf8e164c805747bdd2d9099bd963160ee5e481967b0ee824214c8962e7994527 +size 3114 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/appflow/2020-08-23/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/appflow/2020-08-23/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..8cabdea9be0e0ec38142e593a9a2cd33e728f91f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/appflow/2020-08-23/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a3866042c01a82656601f2287b61a1d9f942321fcf729bb949b9213fd007bfc +size 1149 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/appflow/2020-08-23/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/appflow/2020-08-23/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..4da1f86624217bdddbeeeaa90816871a7740aacf --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/appflow/2020-08-23/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e75890f4019816aa482abefb22608eed7120b3c9fbdbc0db37bb2ec6d30a2b9 +size 32811 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/application-autoscaling/2016-02-06/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/application-autoscaling/2016-02-06/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..b20b0088ce57053c77561a14a5753ce7f9c45127 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/application-autoscaling/2016-02-06/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6933276d05b2a6a1c51b73889c7a626e1f9b49fd417c7fe0b4ea0b96814cbf01 +size 1244 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/application-autoscaling/2016-02-06/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/application-autoscaling/2016-02-06/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..f4ca8af69398306148194ccee8161679cadeab4b --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/application-autoscaling/2016-02-06/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fbb3f99e6b75fb46bdcfd091d147de0538fcd41fc50a9f71bf65e1f03bd6a22e +size 24469 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/apprunner/2020-05-15/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/apprunner/2020-05-15/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..66da0b49b02550afd20f5bce55c763be94ce7d1a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/apprunner/2020-05-15/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8329295fbb04024a9d0e1cde09445a99eeec5479c395164d50e8dfaa2b79c442 +size 1149 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/apprunner/2020-05-15/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/apprunner/2020-05-15/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..5d696444455d9d997c6f68bc71082cd0b8309ab7 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/apprunner/2020-05-15/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78e9e852132afd684da637ceb03acbbe7d920765d7f28f3a8c5991de6f1afa09 +size 19689 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/appsync/2017-07-25/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/appsync/2017-07-25/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..95a5970d591360b0c2c6658a31dad88c29940b54 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/appsync/2017-07-25/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13a6a1d54aeba3f6d4387324ca1fe2abf3249f21e766f187593353e6aa62ec03 +size 1149 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/appsync/2017-07-25/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/appsync/2017-07-25/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..9162f3d4e0d621227649ffcb5a7f4eb8884d35e3 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/appsync/2017-07-25/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:494acbecd8d7cc0ddf20c4c495394a5e8cb52e4d4c0d4d79ef2f14c22f31270b +size 31441 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/arc-region-switch/2022-07-26/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/arc-region-switch/2022-07-26/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..24b934f47b618831b30dacfeb87bcea7d9c01675 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/arc-region-switch/2022-07-26/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ce29d4f1afa366290301b3b6c3c22fe134ce1afc033c9da865fe13d2267d576 +size 1320 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/arc-region-switch/2022-07-26/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/arc-region-switch/2022-07-26/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..cc118fe16cfed86dd61f80e0a74951998c909173 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/arc-region-switch/2022-07-26/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c16f55a55ab3635c5ca05257050c408dd36a4c804171bc0306bf2507f01feeb9 +size 12595 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/arc-zonal-shift/2022-10-30/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/arc-zonal-shift/2022-10-30/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..2520f51299b236614abd9de569dca4c3ddf6a951 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/arc-zonal-shift/2022-10-30/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:695a2deabeef271760d7d0699f03c02e823faf3644f456516228f042c194ddcc +size 1305 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/arc-zonal-shift/2022-10-30/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/arc-zonal-shift/2022-10-30/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..b7c1f58700b6cbdf374a091c6a160dffb4fa25ea --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/arc-zonal-shift/2022-10-30/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:947f052486e17357bc3378c627d4e62c43bf6812b8b497ad6bc7f81b4373ba95 +size 10676 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/auditmanager/2017-07-25/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/auditmanager/2017-07-25/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..493538f113c6b3b7a260017817e9eae53eef37ae --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/auditmanager/2017-07-25/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ac7e37a9be56289ee1ea5822e92059e334380c1bcdcb71db683f67c72ab4d04 +size 1152 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/auditmanager/2017-07-25/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/auditmanager/2017-07-25/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..45b1ab1c89134e74e22d3157f8699fadaa15991c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/auditmanager/2017-07-25/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8ecc8ee839804bd79cdcff8c6ae0c4a028340046f830f18a77eac944a8cd9a6 +size 27932 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/autoscaling-plans/2018-01-06/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/autoscaling-plans/2018-01-06/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..87853eead6f47f050df20b282dfd9a43f8e38088 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/autoscaling-plans/2018-01-06/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c50b6214dfb40e28efd5d592fcd9fefa2e7e39eac766b71933869f036e0da3f2 +size 1239 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/autoscaling-plans/2018-01-06/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/autoscaling-plans/2018-01-06/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..ec34e676c4d159bdc985966d36ec33746606477e --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/autoscaling-plans/2018-01-06/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da4cdc7ad5d701a17f9075a76a6f886e6301a32ae83b7bd9e1755df1cd6d770b +size 9106 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/autoscaling/2011-01-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/autoscaling/2011-01-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..5b4ce0462f85e7daf030c3c023881bb617cc2b65 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/autoscaling/2011-01-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:249c29fef71745e9008ace8b31ec047b89d04fbc24aa2ffda49b7d01daa7abdc +size 1236 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/autoscaling/2011-01-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/autoscaling/2011-01-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..bd6e3e124796b317aa2cc6bd373b439a9a7a0c56 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/autoscaling/2011-01-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:215a10ca11f9a08203bbd92967da017e16716d52c8119619ac132fc4e1e52544 +size 63462 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/backup-gateway/2021-01-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/backup-gateway/2021-01-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..2d079549dc0f49e70bf0e423d8443d56b8faa237 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/backup-gateway/2021-01-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c396a88448dfd5ea67b0be6d47bd60938b9b108e08277d55a0f14bf99576daa9 +size 1154 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/backup-gateway/2021-01-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/backup-gateway/2021-01-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..e0292d22710395a319beb39579ad1f649c41551e --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/backup-gateway/2021-01-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22e5f07cdc3a18a47d9726302992ab24af7bd91e4a161d9a649e3edb34f1c228 +size 7373 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/backupsearch/2018-05-10/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/backupsearch/2018-05-10/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..60ccff72c59fdc2c1ae0cd545919d4269b54fa28 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/backupsearch/2018-05-10/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b0ce0c6778a4405db5fd254c41189d67ff669e346bfb4e244c345bc75322f700 +size 7506 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/batch/2016-08-10/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/batch/2016-08-10/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..1604373a7bfa093ec4edb69c0123c16c22986930 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/batch/2016-08-10/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b54909398ed94b1ab572c8db1eae6dc0c370478fff615d497c3050484020c0a +size 1266 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/batch/2016-08-10/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/batch/2016-08-10/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..18c72d9c61b5ddc26439ef1e6d06f014368fec7d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/batch/2016-08-10/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:303dec8f0242dbd8c819e484cb5729674a5320336bea6ef661def6be37f43f1b +size 61870 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/bcm-dashboards/2025-08-18/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/bcm-dashboards/2025-08-18/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..3df32a29ddf6e1c15fa9a2ec88cc5907419bb490 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/bcm-dashboards/2025-08-18/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eca69277e30e801eb931fcc6cd70555967303cfe19d3d54f4bd99f22b2b7a2dd +size 903 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/bcm-dashboards/2025-08-18/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/bcm-dashboards/2025-08-18/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..923314817fe5fcfeab830767f883d8f5f0994459 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/bcm-dashboards/2025-08-18/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dcaa1e2d0818b28ddb5c80b28aeea20e1ab9cb7c39ae0bd23a77796f32498e9b +size 6191 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/bcm-pricing-calculator/2024-06-19/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/bcm-pricing-calculator/2024-06-19/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..405ae6d9e9d554fd441c8eb6e75661b24b91b19d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/bcm-pricing-calculator/2024-06-19/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a0d56c9b8fc805c29913a3da5944b8dc9281ad96b556cf4fee1a14521689181 +size 908 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/bcm-pricing-calculator/2024-06-19/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/bcm-pricing-calculator/2024-06-19/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..773a1a024fd5402e80de12204dcad8ee7ac89b03 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/bcm-pricing-calculator/2024-06-19/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:58e34977922daa280df2b42ccc391e3579cd4c278016fdb8dd0284a8e73a21ea +size 13412 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/bcm-recommended-actions/2024-11-14/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/bcm-recommended-actions/2024-11-14/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..1d432bedc1552b2a73f58b87d35d8831ac12498c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/bcm-recommended-actions/2024-11-14/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bfbb76d6583c40d943c2997056e89eab790804dee26e412fc90cb2e72131609d +size 909 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/bcm-recommended-actions/2024-11-14/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/bcm-recommended-actions/2024-11-14/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..caca8b74db1bead3fa2c4201769e81077d8c0c72 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/bcm-recommended-actions/2024-11-14/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13979144dc3673759343755d02aa8d19f4fc745cbc4284edbaec3610862d84e5 +size 2575 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/bedrock-agentcore-control/2023-06-05/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/bedrock-agentcore-control/2023-06-05/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..de8c88ea6b95ffebd331b28fda11093cd2d624f0 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/bedrock-agentcore-control/2023-06-05/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:466fb62b66d7a68e8bc43839ad8318a7e0c71ed5302361ad5ac3001ca378c4ba +size 1312 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/bedrock-agentcore-control/2023-06-05/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/bedrock-agentcore-control/2023-06-05/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..e638640e53a4509eb43ccd49c5be4f81a306388b --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/bedrock-agentcore-control/2023-06-05/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6262facb2a12c52afe4a54e06277423e1768a62858d4ee0657a9e5ea39ec4d86 +size 51693 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/bedrock-agentcore/2024-02-28/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/bedrock-agentcore/2024-02-28/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..8b62aa77898156f6f88ff0a2fcffffaa9d511049 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/bedrock-agentcore/2024-02-28/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43347e60fe972dba1e604f25d58e1a98552b84599c3fd571b70b88dec10cdf92 +size 1306 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/bedrock-agentcore/2024-02-28/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/bedrock-agentcore/2024-02-28/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..69742950b55b813c409456bbb04cf9600eb9eb87 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/bedrock-agentcore/2024-02-28/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61f03e5d76105474bcb916c7ece929f276f5624e171260ae664d7859241f9ce3 +size 22140 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/bedrock-data-automation-runtime/2024-06-13/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/bedrock-data-automation-runtime/2024-06-13/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..23e5394503f88daa98e466e6d69f83e78544e970 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/bedrock-data-automation-runtime/2024-06-13/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8241f0bbc5ab5310194ff58e01e3dcb2da593890611e36a810ca6ab6b53e94bc +size 1317 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/bedrock-data-automation-runtime/2024-06-13/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/bedrock-data-automation-runtime/2024-06-13/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..5ae7f29e49f76790d584902c1a94538aeb63c341 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/bedrock-data-automation-runtime/2024-06-13/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49f51da8c7ffa8342919cf53fddad8cd21b73b2de127fe5617879ab506caee31 +size 3509 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/bedrock/2023-04-20/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/bedrock/2023-04-20/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..76538dff2ad503eebb2765c40ca40d5ea20fb7e5 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/bedrock/2023-04-20/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44dd7291dcf91d250c605ec17329ad6ed19e397e57f44c2f2a0e63d3ca8b41fc +size 1298 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/bedrock/2023-04-20/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/bedrock/2023-04-20/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..94fff1b3325fc07c3b5d319634c98c93e2e8b580 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/bedrock/2023-04-20/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af6acbe8cd6bda05990c28b773dfbf4b4b9767c206b517d1ae722e2ecc1ff46b +size 76287 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/billingconductor/2021-07-30/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/billingconductor/2021-07-30/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..a916987db2268e3cdea316d29d47252fbbdc97ed --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/billingconductor/2021-07-30/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cfc8db3b81037a5ebb70b23ce282bc580de11418e5f6dde60ac7246b87137ca8 +size 1311 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/billingconductor/2021-07-30/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/billingconductor/2021-07-30/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..5e2790d9136105902e82c84c7a04f433e2b49844 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/billingconductor/2021-07-30/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee926c60241196f8b2a212eb1d1bb41a06ca2b7a1d0a92098f32e767287b3d96 +size 16405 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/braket/2019-09-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/braket/2019-09-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..9d91701582b4c851860c9d6b0a05f3faea7ecd1f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/braket/2019-09-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31f73e23496d686613e9bc333b63a29823e8398063522afd741f53898f157f61 +size 1147 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/braket/2019-09-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/braket/2019-09-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..ce5358b7ce8b593dc9a9c73d06d55be3f51d5a8f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/braket/2019-09-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a021bd15ad83dc22cfa95961bfa9fd71e752641fff8892c1e5e59a491c24bf6 +size 11429 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/budgets/2016-10-20/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/budgets/2016-10-20/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..c995c5bc63d3f23085495e66c1aba5a985b48603 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/budgets/2016-10-20/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:85df54d12bdea6826410c39353703e39e57d9d551dbc1c432fc7a72c1280d98b +size 1791 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/budgets/2016-10-20/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/budgets/2016-10-20/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..b489e16aac13d7c5815264fb7d90ce584a234d64 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/budgets/2016-10-20/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0d5851986f9a40e7bc445caa5dd7a2afc1ee5b4661cd1b3fa453fe44fa5861b +size 14621 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/ce/2017-10-25/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/ce/2017-10-25/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..37bdace7d941968f375f1b37198f1ecc5df3b4df --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/ce/2017-10-25/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac5f4afc68951cdc2fb6878271c4cb8314622e934ff83df5881747588b0b0947 +size 1937 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/ce/2017-10-25/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/ce/2017-10-25/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..533b78a7da2f62f3e66e4783cf59b80c56ab4681 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/ce/2017-10-25/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d63b01b8cfd8cdb4b37e80f6790cc6960b91cd900609d896d1a6244da83c431b +size 43836 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/chatbot/2017-10-11/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/chatbot/2017-10-11/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..cc2587ba419a96fe68e5c656d3535105dbffeea3 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/chatbot/2017-10-11/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8fc19b72c4210faa3365230b53f19d5e7feea2d99f7b4574bf48423a8c07092c +size 1295 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/chatbot/2017-10-11/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/chatbot/2017-10-11/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..b459a77badbbb28d78b86e45a10f3ef2e164beb0 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/chatbot/2017-10-11/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f89a040099620a2c361ee5d94afe6c06ca3d5d5adcc201941ddee4356f672da +size 10732 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/chime-sdk-voice/2022-08-03/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/chime-sdk-voice/2022-08-03/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..54d1bcc356d7b4b1567dce35235f1491071e316c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/chime-sdk-voice/2022-08-03/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2aa553a40106b573ae9e82ee506b5221f579faa10082e3dae09e5e373240ce32 +size 1301 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/chime-sdk-voice/2022-08-03/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/chime-sdk-voice/2022-08-03/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..16f7bd2765a6f149e47437e203bb418f786a3766 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/chime-sdk-voice/2022-08-03/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df341666e5d02d6fe3bb137927ac21d10f23b1d84052607f153af5a78cea03a8 +size 23793 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/chime/2018-05-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/chime/2018-05-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..2073e0409788f133ee66cdf7da663bec18f1fb58 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/chime/2018-05-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91fa6dea6581d57f5d1f8c02b5855b5a1f4dd1b119d3fd67f89aabce4ee01893 +size 1303 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/chime/2018-05-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/chime/2018-05-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..55ca1557f2c3b3bf5228bdb440244ff92cc6fa1c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/chime/2018-05-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a0e1ea7a660774789969c7ab824b3f3f7418888426c6c993b317c5030d0989ec +size 15342 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/cloud9/2017-09-23/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/cloud9/2017-09-23/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..83939dc28fa521f0538a68cef7fe63fb01b3e552 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/cloud9/2017-09-23/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad60f0b4edd90881833ccd4d8159978106e4bcc72b9e5080fc1e299580e667e0 +size 1149 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/cloud9/2017-09-23/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/cloud9/2017-09-23/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..521d27cb1cfc064e35e258ffbe9a26cc9c88e663 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/cloud9/2017-09-23/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b07e9391fbfe7ccbbe91b4c529c34dc9177913acfc5edbe8c83f194e5939185c +size 6083 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/cloudsearch/2011-02-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/cloudsearch/2011-02-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..63b7c36771ac6f7f14eeb5a23d4f888e6bd545df --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/cloudsearch/2011-02-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:705e29731f27bbf0fe25a743f8915fdeab297cb89d46c3323bea020020dd8461 +size 1149 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/cloudsearch/2011-02-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/cloudsearch/2011-02-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..88d530384d73d0b8d4326c835d44ed71488e493c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/cloudsearch/2011-02-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a9ab32e5736042c25b92e08a78a85a9fa9a9f52b0b3976392f16cdd104bbb520 +size 9599 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/cloudsearch/2013-01-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/cloudsearch/2013-01-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..677fbc5ba351b4336e65d483dbafafc73d62c9a7 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/cloudsearch/2013-01-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:42c439d6e4feb98a6c550834e4ccdc603fb109f10856049589e98cb4dae01702 +size 1151 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/cloudsearch/2013-01-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/cloudsearch/2013-01-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..beb8f3e587f6cb2bcbaaeb876bb8f4c34a1d21bc --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/cloudsearch/2013-01-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a43d3cb10b0998467e7da3eb19de72fb9119e8872338d0350334b899823eebf +size 12107 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/cloudtrail-data/2021-08-11/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/cloudtrail-data/2021-08-11/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..dbe436b1829b2af78648cdf80ca572d3bcc5776c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/cloudtrail-data/2021-08-11/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57ae20048b276bd6997a130649a30f71e26df1f78e690941dc6f673b0f6879ae +size 1304 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/cloudtrail-data/2021-08-11/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/cloudtrail-data/2021-08-11/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..15741dc0fa5d5b6a25c49069d95d35fb337acb82 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/cloudtrail-data/2021-08-11/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c4635f4000f8d107f856b3f7c7bb0bd6de66a65c2727f93ec688bc88d7ca8598 +size 2165 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/cloudtrail/2013-11-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/cloudtrail/2013-11-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..9b959f554b70a0bea8d837545c50c7ce7d1c9da2 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/cloudtrail/2013-11-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2de784c40fc115dfd6ff32464566fd2be18c9aab3deaa4cafa6274f5a840459 +size 1232 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/cloudtrail/2013-11-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/cloudtrail/2013-11-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..978e8d1fab59b5c1a8ee75fe9badb38a98c9b5a3 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/cloudtrail/2013-11-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d2d5bff80bb351ba39989bda06017605e326ca8f949da4531fe92ab28dd0a55 +size 45143 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/cloudwatch/2010-08-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/cloudwatch/2010-08-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..94dcc81f03d4fa8e6f26defff0f610dbf6b03abe --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/cloudwatch/2010-08-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60bb7c92a6bf9629a28e6aebb7102ae14702315972e396309c18b901e4f4c0cc +size 1415 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/cloudwatch/2010-08-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/cloudwatch/2010-08-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..0660363792cffdc03de3bccbfda0768c270266bb --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/cloudwatch/2010-08-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:394d6488d4b4d2a2882823774630aa55775122519988ef078914887711841e3c +size 41274 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/codeartifact/2018-09-22/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/codeartifact/2018-09-22/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..1bb1b8e392ad14970e0c1f6c1e72b6bcda3df43f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/codeartifact/2018-09-22/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5fc3ceb7f4130d96ce33631f861a3034115e1c39b53e0b7b0ff687047470ab32 +size 23321 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/codebuild/2016-10-06/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/codebuild/2016-10-06/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..4b34706a2ad558b5f9c5fe854c5464892f01cb0d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/codebuild/2016-10-06/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f8391860ec39d8cc45daeb789b92973fb1ae9996eb794ef5db35436c730b0a6 +size 1149 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/codebuild/2016-10-06/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/codebuild/2016-10-06/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..ebaf7c4eced8a2f4cc187e21ed020bb16ebb713f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/codebuild/2016-10-06/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d06c839ae4a633929b2fc8595e2ff9dac77e86f5cf0b1f18f6e0a5fd785d391f +size 48723 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/codeconnections/2023-12-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/codeconnections/2023-12-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..e4b2a955e14a3d3ec2affb8ac152c52327ed5acc --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/codeconnections/2023-12-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a2ef1f5a1478af923f53ce0e7d97b5639bd821531217b15aaa2a854f8e6234b +size 1302 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/codeconnections/2023-12-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/codeconnections/2023-12-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..9c596f333dfa70e23fc8be138310333bfe27b0a9 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/codeconnections/2023-12-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c78e9ded5c948c10b433714bde7e0c3c0096ca8142c97ba1fbc49a78f0348938 +size 10017 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/codestar-connections/2019-12-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/codestar-connections/2019-12-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..1495e167f1d98842c833923f49f2cd2050f6f1ae --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/codestar-connections/2019-12-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b60537175a88e7b958f724418a9b0618665c350524359afd8b5c8a2002b4e9af +size 1154 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/codestar-connections/2019-12-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/codestar-connections/2019-12-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..35b97703595077a848396f4545c9ba6f6327b4b2 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/codestar-connections/2019-12-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c67e26adc77f6e826e1c1a17f1789047de7b16e98520adab27a310b1b490b63a +size 9897 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/codestar-notifications/2019-10-15/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/codestar-notifications/2019-10-15/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..7b78e97e8a6188b14f4196969e97a6bfb622e770 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/codestar-notifications/2019-10-15/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:62555d92445da3ed5ca840611f3c4873b8b07dbce120e602ebf47b7ca46901d9 +size 1157 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/codestar-notifications/2019-10-15/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/codestar-notifications/2019-10-15/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..19dd37a2e4f47f6940fa94f4dac471a4dafc3df7 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/codestar-notifications/2019-10-15/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:39bad962a08a7f35761dfbac6b255d286a6851e02b0aaa20fd335c98afe9ea3f +size 5570 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/cognito-identity/2014-06-30/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/cognito-identity/2014-06-30/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..736e206bc85387d7553ad0dd4733c493fa845639 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/cognito-identity/2014-06-30/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c6ab4d9ca9c691b5166aa5e4da644fa53e2c5d12b87be89ee1c892b7acb0f16 +size 1348 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/cognito-identity/2014-06-30/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/cognito-identity/2014-06-30/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..baf08a251f52c77ab68c936f9281893edc21a1f7 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/cognito-identity/2014-06-30/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb6cc3afa280040988e7d7b65056f8e64ba737b67025310d8fc8ee1c140d4811 +size 10267 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/cognito-sync/2014-06-30/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/cognito-sync/2014-06-30/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..b432b78ee64243767492c48456e7ee7814768436 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/cognito-sync/2014-06-30/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e284ed92429a555b7fccaf4fcce2b845e751784ae374c521dbf590952e11698c +size 1153 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/cognito-sync/2014-06-30/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/cognito-sync/2014-06-30/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..e93821ef5aabec98f476f8b9b4d90d5ed503c60a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/cognito-sync/2014-06-30/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c184739c82b0c8861b3578ceddfa28350f51a6cb461f20e7d3fb067d140f3f4b +size 7342 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/comprehendmedical/2018-10-30/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/comprehendmedical/2018-10-30/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..9a972d8369ebe191deca374100a3c8f1b37570d9 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/comprehendmedical/2018-10-30/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f5fbe403016851eba849d7c232b3f002af0fe422523aa2fdba0d9d11cece9bf +size 1155 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/comprehendmedical/2018-10-30/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/comprehendmedical/2018-10-30/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..71b32b484ae4023485cc345cb4c237b459dde9ba --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/comprehendmedical/2018-10-30/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49842671145b328b36c6b1584ff704b86a77ad65ca09a67e333c8c83e302eee3 +size 10293 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/connectcampaignsv2/2024-04-23/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/connectcampaignsv2/2024-04-23/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..7584c098c2b2a8eb597176d6e90c61f962b41914 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/connectcampaignsv2/2024-04-23/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c278a7275aa660917738d0974f3ba8a916db13920efcf72cb6163504a7eb56b1 +size 1306 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/connectcampaignsv2/2024-04-23/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/connectcampaignsv2/2024-04-23/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..54f9a90fb5a652fee0102e1656886e789f983c1c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/connectcampaignsv2/2024-04-23/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ccd8ec00bc9897494eb51219532bf8c8bd788c62df5d5bdc35f466254df5a50d +size 9361 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/connectparticipant/2018-09-07/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/connectparticipant/2018-09-07/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..af8e1be1f08a223ce507c527dab82b3947c6d443 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/connectparticipant/2018-09-07/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:251df296c43e6e74ef99a996d399a983965f6a55dc87ea607ea5fbe2f257d308 +size 1238 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/connectparticipant/2018-09-07/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/connectparticipant/2018-09-07/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..43d12e63df0258ea705005c9180f0ee9ef8af461 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/connectparticipant/2018-09-07/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db43a2b3564227cb6c519ac94d391e970d0a8d14c9f6b768126fb2d31defb171 +size 8850 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/controltower/2018-05-10/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/controltower/2018-05-10/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..b42b08fb48f6f2b9bfec73cfdabdbfa0699f00d5 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/controltower/2018-05-10/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:29cefb05048ecd0d21f84dfeab44b4a66f9a70b3e4d61f8fdec5587140d31e09 +size 1151 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/controltower/2018-05-10/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/controltower/2018-05-10/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..eaf797030f3494e92a7f732edc2d8b2633bb76c4 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/controltower/2018-05-10/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:710e686320e28a9557e2930fed1fd5ddee6e9227574e1bf64f27d3479b147904 +size 13991 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/customer-profiles/2020-08-15/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/customer-profiles/2020-08-15/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..473a7f920da8ae18819061a71c9fdea547ee1d48 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/customer-profiles/2020-08-15/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9056a72bd3be399b91cdf870e7948765b7491207da2517a9454e3dde986fa911 +size 1148 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/customer-profiles/2020-08-15/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/customer-profiles/2020-08-15/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..6b796acfd813cb1282607e6638925fe35e4d41f0 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/customer-profiles/2020-08-15/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47b11835afe21c58c0be4ed8a68d9d6be5a0753e390d2915048954ece35b8058 +size 53660 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/dax/2017-04-19/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/dax/2017-04-19/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..3cb0e435fbe852566b77b00b0ab95efca17b277e --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/dax/2017-04-19/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f67fe1e2a78a79186a91398d5572e30aed52805c690aeec78f878008029537b +size 1145 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/dax/2017-04-19/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/dax/2017-04-19/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..238d81aa70597ce4a0ddad278ea8e57b01b297be --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/dax/2017-04-19/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3cf7ce8c5ebdb4f4471ed94aade2bdf90a378e87871308a281dbd6563547b7ce +size 10264 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/discovery/2015-11-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/discovery/2015-11-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..3f11a77620bb6bfceb39c286b7e3ed41dcbdc46b --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/discovery/2015-11-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22d00325d8ad1079857130fb2f3901d427d3ad6cd3172b32dbbedbcb5d210913 +size 1150 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/discovery/2015-11-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/discovery/2015-11-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..fc3f71dcf1d59316935a888da867ce40d03f0aaa --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/discovery/2015-11-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:18d4c5b0ea616b3eab1572fc58688e109903cc57336349eb5895fb24f13b9359 +size 19020 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/docdb-elastic/2022-11-28/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/docdb-elastic/2022-11-28/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..33ba32a3371f630de61c1958778d4bb390df5061 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/docdb-elastic/2022-11-28/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b9d616c7ef18c12314ca513ab8a5edea35b1011a09b6c708b056e78b8961fb4 +size 1302 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/docdb-elastic/2022-11-28/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/docdb-elastic/2022-11-28/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..f3bcbb462b1df263a8f4d6f9eb8345784de2167d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/docdb-elastic/2022-11-28/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cab70470586858f7edab761e8587688cb1dc5f7c05e023d42fc39fdb131d18c9 +size 7623 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/docdb/2014-10-31/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/docdb/2014-10-31/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..fb36aeae0f92475c7365fc6f1efaf2fd55a3b41d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/docdb/2014-10-31/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb268cb1408be9e99b5427fbc702089228187d47e1e6044973a473e1fa4ae63c +size 1230 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/docdb/2014-10-31/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/docdb/2014-10-31/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..d8c4c6ece599deeeedd6589955f623b821e14d5d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/docdb/2014-10-31/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e37cd67e0a1aea39eee1abee0b990f7c1a83919fc813321edcc25527ad27a127 +size 35568 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/ds-data/2023-05-31/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/ds-data/2023-05-31/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..0f58c6e3fb51ff8719d2cb14706f82d0d04101c7 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/ds-data/2023-05-31/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c150c5fe59111290ca15200bbf62040d076f77921988fb0f03073bb90a9ee1a +size 1295 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/ds-data/2023-05-31/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/ds-data/2023-05-31/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..ec9e439fdc1df7bb95de08aac4ba2204755a2049 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/ds-data/2023-05-31/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d2967a9246cb8b20335107c53c870bdb8dce1686c21f779791fc7e31d8515742 +size 7833 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/ds/2015-04-16/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/ds/2015-04-16/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..f22604fb935cf7fed03fccca51826e42624aa73c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/ds/2015-04-16/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05c11c9731f23cc85f856c1bed59178f29406eecdb17ab382901178b1c4157da +size 1144 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/ds/2015-04-16/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/ds/2015-04-16/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..511a8102bebd1746c0324bb692d71b082c819cfb --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/ds/2015-04-16/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7fe88d7f5f4cf7f49f2d7ac6df0c045bcc37aea46587084c6e9f4267214987c +size 33084 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/dsql/2018-05-10/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/dsql/2018-05-10/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..2b5726155444f2725801082f7a688221a5d20d4d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/dsql/2018-05-10/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c076192c13fee24eaf0faee9f1bbe33178b2baacf91b3f953e0b6fac916e4d9 +size 831 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/dsql/2018-05-10/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/dsql/2018-05-10/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..df12d44060cc90f58feb0b22cc1e612405750b63 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/dsql/2018-05-10/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8152dbb56b9aaa6bab9d655f531e3c6ecad3d4cf9586128cd0a3b8cdc9f9b943 +size 6436 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/dynamodb/2011-12-05/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/dynamodb/2011-12-05/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..eadfd8cc94a1cea507b400c0e89a5348a2adef0f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/dynamodb/2011-12-05/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:235df03263375a56dac9b6a85383ac5753cb4cd1fd184214efb09927800f9f8d +size 1343 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/dynamodb/2012-08-10/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/dynamodb/2012-08-10/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..2d27c2214c84dba16f60d61e8efc22e4d16eff3e --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/dynamodb/2012-08-10/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6abb91470ef9c38bb8f3bc1edc6dce94013729bb3b1ab3a200138634640b4350 +size 3447 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/dynamodb/2012-08-10/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/dynamodb/2012-08-10/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..ac3bdff1346934a534cca63a1bd848e23a39e7e6 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/dynamodb/2012-08-10/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:badffe39dd64c85b11e3c5ab4df31b169b18c33fb1c862459a930bd0f2966a31 +size 83205 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/ebs/2019-11-02/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/ebs/2019-11-02/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..586b510c717c921fc8c4a253db8ffe7eee7ed920 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/ebs/2019-11-02/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:00c1d21f94a6db8e86ba2632b7592eb3e7cd71223a0a112ea64a10fc5abffbfb +size 1145 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/ebs/2019-11-02/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/ebs/2019-11-02/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..1950bfc7de4cb432de6fcda3fcbdf9375dbf8218 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/ebs/2019-11-02/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1767962d112f465c0238ddc3e569c6a8794ec0c60e2b0d2f8216f739469b2ca3 +size 6402 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/ecr-public/2020-10-30/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/ecr-public/2020-10-30/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..213d65d0868675941739626af6903e4d84ebc0a8 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/ecr-public/2020-10-30/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6259feaeb9094523fd7aec53ffc3f06a418de7741f1fdba6fe4a9c74beff06cf +size 1245 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/ecr-public/2020-10-30/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/ecr-public/2020-10-30/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..a4e1371ec09a96ded8944b09aaef5dfffec28060 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/ecr-public/2020-10-30/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e11485259cb6ff140134ff85d48eb9d3687562ccf138e2389b609f5d6c5705d +size 10719 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/efs/2015-02-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/efs/2015-02-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..e877c2fe5d8b69839f4fb36647250e9492ba94f2 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/efs/2015-02-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3da6fdc6e6449585136dc00f16b3a8bc06919332c4a6802560c792edb6bde6ce +size 1571 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/efs/2015-02-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/efs/2015-02-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..97b09b12d50e2b1a79b9a36c9d7de7b49077d045 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/efs/2015-02-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:125858c846140a25f8b98bf578c479ca22e202fc1607abd595530ab500847d06 +size 23873 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/eks/2017-11-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/eks/2017-11-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..8953f92687d9875e898f292047ea9ba07755e983 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/eks/2017-11-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61e17184593cc8dc06d2ffba7bdccd62663206c626bf204c5c2d03b46e973954 +size 1265 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/eks/2017-11-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/eks/2017-11-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..b66f1d336a61482f13f08017ffff9c7f28f97185 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/eks/2017-11-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67743982a72722db5edeb69282c3430090c350cb551e3deecdc425e3b32dddee +size 56062 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/elasticache/2014-09-30/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/elasticache/2014-09-30/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..8cfb11828e20562ee3c8f0f46af681384ca9cfcf --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/elasticache/2014-09-30/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8ac20c5186d7c6a4752c371c4d8b0b73228c3d7d15d14843a8b132bdef786713 +size 1241 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/elasticache/2014-09-30/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/elasticache/2014-09-30/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..882676296cdc703d1c2a9017e694913876b1f5d7 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/elasticache/2014-09-30/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6278d496cb820731a790bc2e31ce41870d9b97fef7a513e4b9e8cf855f80d1fa +size 22920 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/elasticache/2015-02-02/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/elasticache/2015-02-02/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..d668c435f0a7cce0e52757223c315b5cd189226f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/elasticache/2015-02-02/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d3b26e13f6e6449851ad4ba213044cca62d45bc572d45097842cd83ec878174 +size 1236 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/elasticache/2015-02-02/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/elasticache/2015-02-02/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..ad33745d4a78a7594312ecf8c3d484e42df851d5 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/elasticache/2015-02-02/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:884b8bac1e70364b390d6fb43e10334ddfc1b0d9c068095e4530d4e5b1293ef5 +size 56727 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/evidently/2021-02-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/evidently/2021-02-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..022a08560b511a684f63931807ec2f15a48eb3e0 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/evidently/2021-02-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a63095cac45e845d1db5d343f9b79500fe17503ca165968f076d71d1aa4174a +size 1150 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/evidently/2021-02-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/evidently/2021-02-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..37e650c848dc67f0d4acbe96d09ce914c09057d9 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/evidently/2021-02-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0850cfcfb0ac8a3a0ab4d54ba5d9f4d37a1c6c494e5db67d931a5ef84e917e03 +size 20415 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/evs/2023-07-27/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/evs/2023-07-27/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..9aff40b75d346b0eaea46599936cf24074a4217a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/evs/2023-07-27/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96de0659a48d8c5edeb3d871210e3cff7db93e2bf4f6c12c5486969a2755cbe5 +size 1295 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/evs/2023-07-27/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/evs/2023-07-27/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..0fb3a1d2e474f06a156d38c9833ac6a18bf2fe61 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/evs/2023-07-27/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2fb16145cd342750cbcd67bdf72b9deaaecce2d45b70ccf3e1960bafa843ff8f +size 10841 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/finspace-data/2020-07-13/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/finspace-data/2020-07-13/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..8fa0bcf9e9b6242b96dbf1b9e5c229de71fc6f35 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/finspace-data/2020-07-13/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:25963d8a969b2636fbe93862f07b6e4d1ad0b15474bbb63c05a4f9489110c879 +size 1152 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/finspace-data/2020-07-13/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/finspace-data/2020-07-13/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..6de0318470945f7c9412373a9b9c724b6f2b426c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/finspace-data/2020-07-13/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7df8ca41b448111835013289da1253ecb7016feea68c7748ad26cbab2d940323 +size 14501 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/finspace/2021-03-12/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/finspace/2021-03-12/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..3283f3b55d152068de086b0ecd4bd245dd476591 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/finspace/2021-03-12/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e9c8befccf09e619450e45c4affbf9c2a1474cdf81479928ed9bda0235ef7569 +size 1149 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/finspace/2021-03-12/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/finspace/2021-03-12/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..7bfd5db2dad3452e7c6b56a7c3f133b63226f50a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/finspace/2021-03-12/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e866011718e60e7c7109b7394dac655b7ac7756a87bc8e8b55adf7a830e8d6fa +size 30464 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/fms/2018-01-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/fms/2018-01-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..77830be2be9ed77f9b82e8b232750f1f8fbf10b7 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/fms/2018-01-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cb43e77f9c1afef671a8566734cb9cbf402b1ca54e5498b04d4c639be0de8ba7 +size 34811 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/gamelift/2015-10-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/gamelift/2015-10-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..7ed885760aea22ea2321d36debb16dcddab17abb --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/gamelift/2015-10-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24e257b9ae7c29aff8592f1039b677a07c0e612cc7af6300cfc13fe3011a13ca +size 1149 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/gamelift/2015-10-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/gamelift/2015-10-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..5daf94ab7e7f0e603da9a4ac8270009027783e10 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/gamelift/2015-10-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf2d7e24133ed5098eb7e2cd38c86626999860e9d82d768461f3668eb64f0d84 +size 116835 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/gameliftstreams/2018-05-10/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/gameliftstreams/2018-05-10/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..cd55f197b1fdce2d20f4ad65a7e9031b6e15c914 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/gameliftstreams/2018-05-10/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b5cf9df83e23bd1927b3a14a84c7a9eeb8218381f0c233f37d4afcd7132c170 +size 839 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/gameliftstreams/2018-05-10/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/gameliftstreams/2018-05-10/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..631a0e63a92a352ad05eb720639b2d38b9d56804 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/gameliftstreams/2018-05-10/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17fc1f2623462255d960ccb74fa15f029507b2547b4fe135fba77f62cebb4092 +size 26747 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/geo-maps/2020-11-19/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/geo-maps/2020-11-19/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..b3c79235f14630c92a1843bac184cf1e9021e9df --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/geo-maps/2020-11-19/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:820d289f8fbb7116167bb0822aef7b8228fe00654dfbcd52df2e3c7efe510fe6 +size 1639 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/geo-maps/2020-11-19/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/geo-maps/2020-11-19/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..98fd6bb1962227235b5a5107ca51c832789fce27 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/geo-maps/2020-11-19/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b403f52a9b2576aad45631722813df49741629cd04c4ac28ac4c65ba70d7f349 +size 7612 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/geo-places/2020-11-19/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/geo-places/2020-11-19/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..9ce9af927652d32c7ba37cbc3758df6b93d34ca9 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/geo-places/2020-11-19/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:109738222944e0dc842095c53ca2c3bae4b4fa758416bd535c5abb78c751be78 +size 1640 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/geo-places/2020-11-19/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/geo-places/2020-11-19/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..6c929ca51532ba1dbbe2277b551a1965d33df030 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/geo-places/2020-11-19/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c536f5f962e3d13ec109e37fbaffc9894558939e150524bf4013769e59517065 +size 16133 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/geo-routes/2020-11-19/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/geo-routes/2020-11-19/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..4a410c7f4f8680e42805f74c679340d2b55de14f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/geo-routes/2020-11-19/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a881d5675f2fbb7390afa96013ec24c103d9f379e3c1b2e387cb5906ec841cf +size 1645 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/geo-routes/2020-11-19/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/geo-routes/2020-11-19/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..df78c269e02c9661b02bfd0dd588e4abb49a38cc --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/geo-routes/2020-11-19/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56b8c7d3b150985feca87197d81a994c86f4676c4f2bfcd957b9403a31b90442 +size 34018 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/glacier/2012-06-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/glacier/2012-06-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..3b0da7c89419c600429b543d41592ece5389c144 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/glacier/2012-06-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d3826d017fe2836b5daa866a26211755728a1627f400d83fce680cb697c1d541 +size 1232 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/glacier/2012-06-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/glacier/2012-06-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..5fee6a2269e5d35237d43de4877406765a2f083d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/glacier/2012-06-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48eb59f087a80f54bbfb3563586587f74d53ba62ba5333825afd6de993c5c09d +size 21004 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/glue/2017-03-31/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/glue/2017-03-31/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..cbe1ce5fbce0c3c1c5e820dcf4eac52cb719bd05 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/glue/2017-03-31/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f39d8de31aa18dba3e2d08e9f6e37851b02c00c8e1968f0bee73e1c5db2a885 +size 1146 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/glue/2017-03-31/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/glue/2017-03-31/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..d31247777cac4bc1eae7698f2ea96bcd4bd77238 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/glue/2017-03-31/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9204f726ddaa0f48f91492fdec29e7968c861eeb462eb98bfbc0e39ea5230cd5 +size 170328 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/greengrassv2/2020-11-30/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/greengrassv2/2020-11-30/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..5721618e9aac1a5396f8d01236609615ec8ff42a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/greengrassv2/2020-11-30/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:853a7b53609f7cb85f0ba87ac138abfe86dffb0967b469654bd427805b2b7524 +size 1361 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/greengrassv2/2020-11-30/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/greengrassv2/2020-11-30/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..bb3d301af1873a87182af491866df917c34f2a3d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/greengrassv2/2020-11-30/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:effc537a7da8d88e11924b0f8f3fa8510114a7b3b163c6b660632db90c80a9a9 +size 20272 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/groundstation/2019-05-23/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/groundstation/2019-05-23/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..dad71963a18997ac15639b7c394f5a550b4ff1cd --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/groundstation/2019-05-23/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:311facad15df66b50ff51506653827674ccc420dacde83cba7dcf9b6bea51c3b +size 1151 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/groundstation/2019-05-23/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/groundstation/2019-05-23/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..7430334cb2c12a41edc8c422d192bc4cfd036185 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/groundstation/2019-05-23/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f3c7ddb1eb18c49e54d809c44e11abe910d3a5a16c9e0a53716719d64217c23b +size 18957 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/guardduty/2017-11-28/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/guardduty/2017-11-28/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..6c5b07a99d97845f9029e85560f1369a66b594e9 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/guardduty/2017-11-28/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37d9f4d1dbae39df95031ee80c8d629d2c380d47ea437f835ac6932bca9296fe +size 1235 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/guardduty/2017-11-28/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/guardduty/2017-11-28/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..e5160d7f4e6b7283062cd12068551b95584dd8dd --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/guardduty/2017-11-28/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1fc991050681ab811d96944ccd5ba99a77f1b079ebfd5bef0758c1b6a2051d4e +size 62575 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/inspector/2015-08-18/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/inspector/2015-08-18/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..5e0c683517b508477524b9c645a6e9c458a9bf85 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/inspector/2015-08-18/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:281d5f356d8f3ce89306bb63a20ac23b55473e5d398aaef32e7cd9c5bd20e3dd +size 1147 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/inspector/2015-08-18/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/inspector/2015-08-18/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..170fe14d2e771a383e2bdff99161343d91da7734 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/inspector/2015-08-18/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f0d9a34540d2ab2329dbc491cf6b40414b071207199debe8da1ac2bf28afdad +size 8021 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/inspector/2016-02-16/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/inspector/2016-02-16/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..c07567af79891472cb71db46442edba5a2e8c858 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/inspector/2016-02-16/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:319e61a3572a61f227a99c7fcaf375162b2c0c8b3121fd47a1ed12364716c163 +size 1149 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/inspector/2016-02-16/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/inspector/2016-02-16/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..5d93245d7157cd086f3d6490145b9df92fa2401c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/inspector/2016-02-16/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:773b03d553bb1208ec7bb973dda8b9c11fe0fb47e0b1c936c6fc85611f084439 +size 14162 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/iot-managed-integrations/2025-03-03/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/iot-managed-integrations/2025-03-03/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..b71f20dd6ae91d85de2dd3873a02244cbb3bb0de --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/iot-managed-integrations/2025-03-03/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89b1153cc6028d360d2d54eeac345bd056bce3ba61b809b8a87cc0cd7e46f902 +size 843 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/iot-managed-integrations/2025-03-03/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/iot-managed-integrations/2025-03-03/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..3df1af79b9b0f2c9ae162f9d3b311f438f8294fb --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/iot-managed-integrations/2025-03-03/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:251164e37a4e22c84891500c38cf7e20c2ed8a6f842656723cc7ebb7598537df +size 29487 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/iot/2015-05-28/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/iot/2015-05-28/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..01a2b623de2812604e72d230147c3b610dcee7bd --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/iot/2015-05-28/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5d240369819f1a6022918a99c6f96961f3113ac7b1e9ea78a6bccbd72f589c2 +size 1266 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/iot/2015-05-28/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/iot/2015-05-28/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..f690f30680d0edfeb696a5df6a7175a3ac10f9ee --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/iot/2015-05-28/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b4203bf51b6c71b72690b1dded8fdefbdd9bc0dd24d3a732a42072f6133e703 +size 125599 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/iotevents/2018-07-27/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/iotevents/2018-07-27/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..11048a57aec8f1ff618b9db76b68469aadb0c898 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/iotevents/2018-07-27/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab371f2b254b5515d407e0df91b918c31cd7377d223240015f06b1dd333038a4 +size 1149 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/iotevents/2018-07-27/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/iotevents/2018-07-27/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..8b71872a4f7078984f686611d92211a1a67c1351 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/iotevents/2018-07-27/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea57e2be38a7f3a2f59b626a4c0796c95822aa6f6358b855d6284657681a5ee9 +size 16112 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/iotfleetwise/2021-06-17/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/iotfleetwise/2021-06-17/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..6e846d1eec1a1b22217cbd06d5d22e1c6aa664c8 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/iotfleetwise/2021-06-17/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:502e95e35161cc4dfa3ee3d0b595db49a72f99e9e52169793406a198514a11b7 +size 1151 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/iotfleetwise/2021-06-17/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/iotfleetwise/2021-06-17/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..1cd8b7db3f625e116a84840a1af2f1fe047c889e --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/iotfleetwise/2021-06-17/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f649d102319588ff62aed13256474f433623944c080767b8c8f8ab40b9e066a +size 30396 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/iotsitewise/2019-12-02/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/iotsitewise/2019-12-02/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..fe4b0ec3869cbaafaea26fc99a63840a68650392 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/iotsitewise/2019-12-02/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9db1cb0c7d3784d8f47744beb44e8305129c26995b8f6a8419c979f405b321fb +size 1150 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/iotsitewise/2019-12-02/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/iotsitewise/2019-12-02/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..c45530ac705cef2446ff96474a5b85efbbb42a6f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/iotsitewise/2019-12-02/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:beec0661e0b009504f90ce59b1946f35d6755377278d5b61debd3ebf6e1193cd +size 60542 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/iotwireless/2020-11-22/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/iotwireless/2020-11-22/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..194e03b7cb7d62f4d98fd1f6104013ed2d90f73c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/iotwireless/2020-11-22/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a7dce192acc76b06935d1e1e31861a7a82d0aa2199ba564a7f31ae2699e414e +size 1153 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/iotwireless/2020-11-22/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/iotwireless/2020-11-22/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..5b162ff8d7bee0922f99329169f26bf5b2fbee59 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/iotwireless/2020-11-22/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e562cd8f6bf0ac464da2c5fd043b88a3d9ed7ba59e379449728031761584d13 +size 37304 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/kafka/2018-11-14/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/kafka/2018-11-14/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..0f37b3af8a60e86214f580f6e525920c352fd761 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/kafka/2018-11-14/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c2bc28a9ec8c87e799cb61695e902ffa46545f7ed4f21e95382a7b9c964a8505 +size 1232 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/kafkaconnect/2021-09-14/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/kafkaconnect/2021-09-14/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..f9bf74ca9845e9b92cf7772dce1e72d86ec95f2d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/kafkaconnect/2021-09-14/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dfe51152bf534a0b15959b37ff9c3e3c46cd62ac940b0652f028b8e58e4a2ee3 +size 1417 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/kafkaconnect/2021-09-14/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/kafkaconnect/2021-09-14/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..0cffa7fbad508fc22a8006d1a14ad7dfc22a39c9 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/kafkaconnect/2021-09-14/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87d00a5c2d3aef16ddc282613de7dd7f6c00e67c1bbfdb433b5657eb3193c6d6 +size 8051 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/keyspaces/2022-02-10/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/keyspaces/2022-02-10/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..b06eac36cb21cc88ed55be6ab26a4d6c333c3512 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/keyspaces/2022-02-10/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:644f04f7a1fe2939b286b32d7256ad327c75226deeea0c1ffe3084d1f7ef0afa +size 1235 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/keyspaces/2022-02-10/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/keyspaces/2022-02-10/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..37da32e702beec1a36f2c6ea8513f3478ebef8f9 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/keyspaces/2022-02-10/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b019efdff1c72dbad19caf9dd196977777cd4a70424a58bdc78c9f7e5d7a1545 +size 14542 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/keyspacesstreams/2024-09-09/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/keyspacesstreams/2024-09-09/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..6e49ed54defb902c5b03539bac1feafa7ae51445 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/keyspacesstreams/2024-09-09/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88885e49de0b5a6501582339ff5cb2bc1d18da6150ae10168984e9627bd4af65 +size 840 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/keyspacesstreams/2024-09-09/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/keyspacesstreams/2024-09-09/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..ccffb84cad1174491939268fa0658c61c34c3fdc --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/keyspacesstreams/2024-09-09/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ab2d481e7bab43cbe9d54330595bfacd265e665c0c5464225403e7ca3e299fe +size 6953 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/kinesis-video-archived-media/2017-09-30/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/kinesis-video-archived-media/2017-09-30/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..30a3f77fea4044bf752150210b19e9392b648ef5 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/kinesis-video-archived-media/2017-09-30/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4dff2335673dc76dc4d17b533c613ea327a40aaa5a2fa87d2d982522d761e281 +size 1151 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/kinesis-video-archived-media/2017-09-30/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/kinesis-video-archived-media/2017-09-30/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..81b05ec2ee81da5575ada5d389e8b965706e190d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/kinesis-video-archived-media/2017-09-30/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6b79434754da55cd300813f845394ab51d80df6d982ee4c724fd0a129bb46d9 +size 13543 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/kms/2014-11-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/kms/2014-11-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..d36682e2a5c8585a9f73745eb12866e587242c80 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/kms/2014-11-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0386e71e1809182f4e213ccf228cff898ef6fcb452b41fce700a18093c2b15c4 +size 1145 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/kms/2014-11-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/kms/2014-11-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..5fc84eb572cfb696bd3b96933be642f97ed8f975 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/kms/2014-11-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e1cf57be882e885e2d1de45c954aedd8ecfe4ac8bf81f748e307b542cdbea50f +size 73287 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/lambda/2014-11-11/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/lambda/2014-11-11/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..16a5dbdc2ba5035fb1618af4ecfeab1e0b6ccf31 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/lambda/2014-11-11/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80ff886e1471f4c4537877371a592545b0aa969e52a2d45fbaf41a966ba130d7 +size 1288 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/lambda/2014-11-11/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/lambda/2014-11-11/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..9f6cbc491e60a17f8138f479d305f322e2c75a25 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/lambda/2014-11-11/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a4868496c7b1a0ac124f5c4a3bb746e190b6fe508cd7935c373abbd966ac9643 +size 5528 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/lambda/2015-03-31/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/lambda/2015-03-31/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..59c64ba5cb18acece883e638c271bc3374fc3c1c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/lambda/2015-03-31/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c1685572ada1859e2240a0333bb03862a431123064a330bc4017c1930ac9d690 +size 1148 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/lambda/2015-03-31/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/lambda/2015-03-31/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..d323a99654c5a355c3b6fa13e29d61cee9398dc2 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/lambda/2015-03-31/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59d80743705d5aefe9bd99337a3e4bed7d72a560f2d92a921c21ae7b8b5ae657 +size 65929 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/launch-wizard/2018-05-10/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/launch-wizard/2018-05-10/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..058434fa7e459a717e0c1061fb158cdec76bb09f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/launch-wizard/2018-05-10/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe40783977d80ab9e8d6690f153543d9655f1792a764faddbce502f1a2f5786e +size 1302 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/launch-wizard/2018-05-10/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/launch-wizard/2018-05-10/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..6f229198c7b0bfd0c077d7c0660f79346d73ea79 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/launch-wizard/2018-05-10/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e471b4d8df4456f6ebbcef61514cd2800a64ee6ec557453e8c3a528039475902 +size 4452 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/lex-models/2017-04-19/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/lex-models/2017-04-19/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..2c027289a3859ce13daf47bf6c1e2215ccac6693 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/lex-models/2017-04-19/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3a958c26c6ab98c211709ee12abf75a4aeff26368a7656c501b6f9464df8bf1 +size 1331 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/lex-models/2017-04-19/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/lex-models/2017-04-19/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..ada1e98acfce4e1642c6b50ac7cda73b4415e565 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/lex-models/2017-04-19/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d019b13878ae6ecc55cdea66a7bae02b139b5fd93913441f052d059a99cb7bc7 +size 29522 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/lexv2-models/2020-08-07/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/lexv2-models/2020-08-07/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..0949b879fdbc6f16db41ce97c92de9bb65928a03 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/lexv2-models/2020-08-07/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:284a12e1cc9869c3e732b952fd716c3135320bb4c387ea40e6b0aba081a3e43f +size 78964 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/license-manager-linux-subscriptions/2018-05-10/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/license-manager-linux-subscriptions/2018-05-10/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..f0b52101af1db7bddc140bdde88b1ff2bd236704 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/license-manager-linux-subscriptions/2018-05-10/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c2a254a9baebaa1152fcd88010255b5140fec8c7391dbf4127719ae529d6989f +size 1318 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/license-manager-linux-subscriptions/2018-05-10/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/license-manager-linux-subscriptions/2018-05-10/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..f2badcf89578f719d9368956a97eb559c8d18800 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/license-manager-linux-subscriptions/2018-05-10/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:faff8ade90b5e380b86ee0720e5d8682bf4af3f4ba42f9b1dc0452cd8ce67a04 +size 4790 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/location/2020-11-19/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/location/2020-11-19/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..a73597c06cd70fdec3b0e3223ecd62567750fc4b --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/location/2020-11-19/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:29defc9e7a4a8c5d245005d06bbacd55595ef41d14bdaa2406a0654ff126d21a +size 1145 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/location/2020-11-19/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/location/2020-11-19/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..6f79aabd5dd7d01af5e7b43fbe2b0eb9d0e868ee --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/location/2020-11-19/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:739b84940fa6a8873eb2888bfb2d443d9dfc97fd65668a720ad9b99bf63572f7 +size 44276 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/logs/2014-03-28/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/logs/2014-03-28/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..43e50eda935b76b6a16170b28c1b8c31c7c6f1d5 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/logs/2014-03-28/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6cd83a50db74c600e805c1e10abfa488cd3dda2d3c0094067cbbf10efbff7c1a +size 1230 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/logs/2014-03-28/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/logs/2014-03-28/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..c75d5476036f73f541dbbcc883f9f70354161480 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/logs/2014-03-28/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:afa183e19d86c8aad181f8a6f18a2490d268fec3a82aa875387f53da98b42ab8 +size 79359 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/machinelearning/2014-12-12/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/machinelearning/2014-12-12/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..ad2f4c692ce25ecf0fa3dc5e1b5af9f7b8f850d0 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/machinelearning/2014-12-12/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:21a54991489e93deec457dee35737c908559cd4aa12ce7eb155bc58b5d2f7720 +size 1156 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/machinelearning/2014-12-12/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/machinelearning/2014-12-12/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..90e3c10b3c0f81428a55874ecfad5fba7b4248ab --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/machinelearning/2014-12-12/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e822e8fffdced9257124786622c975a30b7fccec7a5fc216dd9f95f79b648787 +size 21306 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/macie2/2020-01-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/macie2/2020-01-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..f752637fb4db86ed749a6d7bc9c6f05786ffeb9d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/macie2/2020-01-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6fb598d03c698a1138d3f99b5008d6c5c17cf5b4c8cff204c835399c86f8e8d +size 1148 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/macie2/2020-01-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/macie2/2020-01-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..1ce844919c93df1dbaca6270c29843916e891a49 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/macie2/2020-01-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2cfe64688071fad66dd663d2cae41c755134e73182909d78e346678e1c334cd9 +size 59305 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/mailmanager/2023-10-17/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/mailmanager/2023-10-17/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..f0f58b6b847f208bfd29045078c92fbd5f6ef736 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/mailmanager/2023-10-17/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd81297dcb2cd5d736a4de14469f311e039dbf8b840c5cd21ce2e227d0f4fc7c +size 1302 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/mailmanager/2023-10-17/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/mailmanager/2023-10-17/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..e23e88ac750661910e359e9a23564e3f3c11eca2 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/mailmanager/2023-10-17/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2bd96a914f53aecabdad0ed0454897b896c16fa960cbaac4276e2bc05e29a61d +size 22050 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/managedblockchain-query/2023-05-04/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/managedblockchain-query/2023-05-04/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..b1d4eeb2feeb130b688a48370277b1c1937907da --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/managedblockchain-query/2023-05-04/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:944900b6831b58ec30c485fa729989363b46c6f930b8d0d48f88fa720137ee8b +size 1312 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/managedblockchain-query/2023-05-04/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/managedblockchain-query/2023-05-04/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..8530adcb2205b91ef9e0f156bf7e46f6f8c1cf50 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/managedblockchain-query/2023-05-04/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9112fdfb375e06d8355ba43d38aa896733bdb6fc8c0a38b5e991540f4af6add0 +size 7186 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/mgn/2020-02-26/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/mgn/2020-02-26/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..979a16a581e33e4a2e01cf55326d9debab2bfa68 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/mgn/2020-02-26/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:825debc559562053bf12ee433cd029ff0b0c5a3beb6aac3002aa697175c7f65d +size 1145 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/mgn/2020-02-26/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/mgn/2020-02-26/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..3dd4052df6c4c2944d54c8c5f865255429551a66 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/mgn/2020-02-26/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6d2aa434e7a196993b06b00c9ad9dae631bfc0cb2aa8ab569f34a43b01edbb9 +size 20311 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/migration-hub-refactor-spaces/2021-10-26/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/migration-hub-refactor-spaces/2021-10-26/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..c097f7b0c7de0f301643dcb26c3fb9b086e94d0a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/migration-hub-refactor-spaces/2021-10-26/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad1cf18f523f2abefc1171d43af8e03f994823d8f15041a01ce1013bcc5faaaf +size 1154 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/migration-hub-refactor-spaces/2021-10-26/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/migration-hub-refactor-spaces/2021-10-26/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..02548c93475f49732cf8dd8b42048915c8938853 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/migration-hub-refactor-spaces/2021-10-26/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95617c61beaf1fd540a3fa82258cf9c4b50c273ab4d995f046d1068f9838fbab +size 12478 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/migrationhub-config/2019-06-30/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/migrationhub-config/2019-06-30/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..a399d22b6016fca2cd426b34ece4da54f4f64052 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/migrationhub-config/2019-06-30/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be2c880f3ae50dfc673e435a362b908a47731243095119705429a34564081a65 +size 1156 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/migrationhub-config/2019-06-30/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/migrationhub-config/2019-06-30/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..e31702169a819976867058eacead214d97029be3 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/migrationhub-config/2019-06-30/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f9d54dbdfaa8bc2a3e09119cf83457fbfa94421727f7cf63e008d64b11d3278 +size 2737 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/migrationhuborchestrator/2021-08-28/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/migrationhuborchestrator/2021-08-28/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..6f2ef48a25eb873d0d87557e0f0f2aad4ddf8af1 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/migrationhuborchestrator/2021-08-28/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de49c0d37c02245ef6a8e2cf573e6263d9cbdad562215510201cbe1f8d07eb41 +size 1308 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/migrationhuborchestrator/2021-08-28/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/migrationhuborchestrator/2021-08-28/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..5d5cbeb02c3bbb29374685955557fbb6f3c7b1cc --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/migrationhuborchestrator/2021-08-28/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a1d1eda9bd031aef3e594925e6630085e16c29a688b9c821514c0af06291886 +size 8432 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/mpa/2022-07-26/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/mpa/2022-07-26/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..774d8c589a7bf486cedcf23009b6a0b772db4972 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/mpa/2022-07-26/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff903101befe328739477f390864440b360a0372a50f26467ecb19bf6123a548 +size 830 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/mpa/2022-07-26/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/mpa/2022-07-26/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..e29dbefc0a376dcd4f6f361248098ab9fe911650 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/mpa/2022-07-26/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09d85704280c66221379d7907ef3a59ca87a1c42079677be7c8f0fbccb529dab +size 9296 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/mturk/2017-01-17/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/mturk/2017-01-17/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..7113339a367dc9dd89bb3f5f0e1b6aa2dfa69876 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/mturk/2017-01-17/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4fdcb9db0eda38f334b6475889d458ddc34f130ddf946ce743175a0ebcfc331 +size 1217 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/mturk/2017-01-17/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/mturk/2017-01-17/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..9362655f435990868c0aabd5d7cb98e657f0960d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/mturk/2017-01-17/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a707a5334db73011a6c72bce29e5a11111bf48cbd398cd8872a2ea6fb5c463b +size 19770 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/mwaa-serverless/2024-07-26/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/mwaa-serverless/2024-07-26/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..d8b373f7fd8762544fa2d3114c384222c9cc6b73 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/mwaa-serverless/2024-07-26/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:acc1b4f92d27e9f6d6c7f1519794ece13b9656caeb4ad59a97c6f58976df7450 +size 841 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/mwaa-serverless/2024-07-26/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/mwaa-serverless/2024-07-26/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..22c1903a76df55de270a64e103549aa5332e6c05 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/mwaa-serverless/2024-07-26/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c4a2a0489b0839674f67453e5c508b906adfed41e56c9d0f6721e73125cae186 +size 10217 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/neptune-graph/2023-11-29/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/neptune-graph/2023-11-29/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..757b46547753c97b0eb07146e9f58e8faeaae404 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/neptune-graph/2023-11-29/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae3e894082b9149dea340e1f7efbfb9e3a71f6142e475652bede78246abdd675 +size 1408 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/neptune-graph/2023-11-29/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/neptune-graph/2023-11-29/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..975aee56e0b88df72d9990073a3cd7672260588d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/neptune-graph/2023-11-29/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f507ad4974f5653d297793bf00a5051cd81c73db24581359b49b360b3f3b0778 +size 15138 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/neptunedata/2023-08-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/neptunedata/2023-08-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..7fd9df7feee5720862b9cc68a012656e12906f52 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/neptunedata/2023-08-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cbeeff70994df188d5a8eb58815d587c5effaa7f284c7ac0012058466f284a95 +size 1297 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/neptunedata/2023-08-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/neptunedata/2023-08-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..2f0989fa3a0ad5fa92fe001e7fad2094cb458c42 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/neptunedata/2023-08-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:903e96b24ff92e1a4699ad7eedd4d253c590f1201b99a9ac4bbd6ecb84893540 +size 23576 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/network-firewall/2020-11-12/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/network-firewall/2020-11-12/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..0d24b4ad6fe552748238b09ea89af3ba926f7994 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/network-firewall/2020-11-12/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61f09078911cb8c063bd2612609c9baf08092310273659a85b0948919d0726e9 +size 1155 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/networkflowmonitor/2023-04-19/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/networkflowmonitor/2023-04-19/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..29a86675629a4e706289d6fb56a043be3c9bf41f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/networkflowmonitor/2023-04-19/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c839f9955b361082fc46e4a234fb3b7ce262f915be97e158283781d7da4394b8 +size 840 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/networkflowmonitor/2023-04-19/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/networkflowmonitor/2023-04-19/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..6ce63d9caa491fdd80015646de4d1e9ebc5751da --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/networkflowmonitor/2023-04-19/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6995a7b025e0ba3d25b9c572c037925f8a032c2e3648ffa8c69b4bbf1caa3141 +size 10353 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/networkmanager/2019-07-05/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/networkmanager/2019-07-05/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..842b656414b4366e41731ed68d4849b2efe26c87 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/networkmanager/2019-07-05/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e0be5b331061da5ea031b8da257a8d1bf0bd38ab27fc69b04c44263f08dc81f +size 1732 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/networkmanager/2019-07-05/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/networkmanager/2019-07-05/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..e0e2c562408f509b0551307d48c3a28a4b72728f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/networkmanager/2019-07-05/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d783167722fb96e851589afdf53c6af6dcaffb1d699b67fab927deb06db5376 +size 26467 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/notifications/2018-05-10/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/notifications/2018-05-10/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..b9c7179c96a3128dd44e4148ac8d57b00b2f118e --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/notifications/2018-05-10/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8d543b93b3375468126616b77743991aeda3e15ff37eda210f9db19e619dc10f +size 836 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/notifications/2018-05-10/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/notifications/2018-05-10/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..d3f012ac44f3c1f551eefb815ae6166935c8f8f0 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/notifications/2018-05-10/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a491ba6b4b79c531b2d7bfa0a04c20adee248dc5b24033f03127888c3ef4ec9 +size 16071 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/notificationscontacts/2018-05-10/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/notificationscontacts/2018-05-10/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..c5772b1ce333f75d0f99c10926fe76e8588c2b8d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/notificationscontacts/2018-05-10/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:743cfbd21c97674a027685611eb19f926a6d4fa04649cd25fea065bf05e50ab4 +size 907 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/notificationscontacts/2018-05-10/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/notificationscontacts/2018-05-10/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..c4f47558f6e7954e234b17cedd577856106ea44c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/notificationscontacts/2018-05-10/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44833f12152469cfdc51cc8e09f34018eaa1c0cdee52a3e84629573dc9bfcb1a +size 3777 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/nova-act/2025-08-22/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/nova-act/2025-08-22/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..8d23247d60fee25ce19da62537c9b561811a591a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/nova-act/2025-08-22/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:15eb3429ab292093b4ac80c1da909d84ce977ea72fa59d68a3f877f33648a196 +size 1278 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/nova-act/2025-08-22/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/nova-act/2025-08-22/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..a1a24a86779b07f19ad62a06196f3aa9248af044 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/nova-act/2025-08-22/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:575ec9b0b9027fa921f38979dc6416fa40928d11269e7b736983f4690f28ae14 +size 7110 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/observabilityadmin/2018-05-10/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/observabilityadmin/2018-05-10/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..2edd797ffbd3040cdf0769322ee6ec1be437cd2f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/observabilityadmin/2018-05-10/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:965b54519bca74a9ae44917444923daf48b93af1c2597c165c318ec9f63d7232 +size 1307 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/observabilityadmin/2018-05-10/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/observabilityadmin/2018-05-10/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..94d0dd963d9db3959626de72cc220d4d64531959 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/observabilityadmin/2018-05-10/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:857015120834bf1f252a9fe262c07748684771b1cdadc55518c919507dd4cc64 +size 15582 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/opensearch/2021-01-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/opensearch/2021-01-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..ebb9f744e69332bd03f61a7e6e0162fd7ca1449b --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/opensearch/2021-01-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c24b55f024cde1cde996eecbee08a9430593eecd844098736a3b821f7ad9bf1b +size 1311 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/opensearch/2021-01-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/opensearch/2021-01-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..f6d2df4071fcbc719b0f98934bfe3903692c01ca --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/opensearch/2021-01-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47193f25ba5eaa171994af27b89df98fc0d6fe68052810e33cd13d7e8fedf6b8 +size 49228 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/panorama/2019-07-24/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/panorama/2019-07-24/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..6fb81ace95a39364c6303f82d8d33b93cff55b81 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/panorama/2019-07-24/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e0fd187319c9d187df6d340cd7e87a43946e34b2fb918466e89ba5f772970cd +size 1149 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/panorama/2019-07-24/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/panorama/2019-07-24/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..635105b110dc94e88d22a5b35f31699aa9d37897 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/panorama/2019-07-24/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:41b71043e5fcd5e5606a20ce1f15d5a5fbb2cbba7636f08bf06a100283a34906 +size 11986 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/partnercentral-channel/2024-03-18/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/partnercentral-channel/2024-03-18/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..cb1e0692fd7f232ccaac51df954d02a8e68e53fc --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/partnercentral-channel/2024-03-18/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4269a564bd8fde5b12b1932e93961ce314734b4c72903282a3ecff3fe799b12a +size 1121 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/partnercentral-channel/2024-03-18/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/partnercentral-channel/2024-03-18/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..9ab3c91c7186bf59e8c39e685c15f6e97374c8f6 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/partnercentral-channel/2024-03-18/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:934a6f2b76e5ce79f9d7d34e628a15cd0bd0fcaa70f3811730d8dd194863480b +size 6726 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/personalize-events/2018-03-22/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/personalize-events/2018-03-22/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..8b945b4071595670785d52fcec19b85bc689c4df --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/personalize-events/2018-03-22/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:233ad86644c45523394663b2603f77d87f1bbb95438ceda50d2da70a2664011a +size 1158 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/personalize-events/2018-03-22/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/personalize-events/2018-03-22/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..ec4546efd5e5894dbe5c07a5d26c220ce5761d1b --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/personalize-events/2018-03-22/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:335753113801a5e6b5429b5cf7b24ffe03fea6bcd99d910fb3eb2065a4fda4d7 +size 3891 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/personalize/2018-05-22/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/personalize/2018-05-22/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..5ea517b1a24b12de368d64c7067fc6fb492f0480 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/personalize/2018-05-22/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22570ea3319fd49ff430f561c50e4e6f2c390650db25d8448aba15d4a9306bf2 +size 1153 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/personalize/2018-05-22/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/personalize/2018-05-22/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..002dd079753e8f92454743dd904a2e196aab8c18 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/personalize/2018-05-22/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d8a4a6a7e0e227a74578420b111a72040703640864fd2f2f40e4d9b5e85b464 +size 31275 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/pi/2018-02-27/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/pi/2018-02-27/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..abb85cef16b9f1d639dbac765e3161a13de0e46e --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/pi/2018-02-27/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d3daa50e7bde4820402f88ac3033ab297572a0375ec1d67b7b5d3013ac58028 +size 1144 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/pi/2018-02-27/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/pi/2018-02-27/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..fa23f3e8c9974f59263d8f26f47ca6941f9c1d6b --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/pi/2018-02-27/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a5c8d802228a84fcc2fafdc06d58b4cbd5104f51593dc6d3c292d3a6fa078de +size 12024 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/pinpoint-sms-voice/2018-09-05/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/pinpoint-sms-voice/2018-09-05/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..9a22b44dadf3f5a2f810a49c8b099e4bd5eef4de --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/pinpoint-sms-voice/2018-09-05/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2eb19e8b05eb96b29fd738feeaf19f9b4188e84bf10098f216b512cb68516de +size 1305 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/pinpoint-sms-voice/2018-09-05/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/pinpoint-sms-voice/2018-09-05/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..effa02495f14973dac300cdd53d29d4e4221359d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/pinpoint-sms-voice/2018-09-05/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8cfc7f92471c287e2381ee9fa5bae11e2923c6597713ba45524b1da072d0eaba +size 3344 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/pipes/2015-10-07/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/pipes/2015-10-07/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..8789f091ae8dce3e63e487050e58e74d0e2b1d30 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/pipes/2015-10-07/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4fce5e5ca4ff9b9eb21c9ddcfdbfcc7e25a73a7693c6794a5d02aeb636cf9762 +size 23040 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/pricing/2017-10-15/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/pricing/2017-10-15/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..b69517860b570d747a8bbb3e0b0b82497c1d3779 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/pricing/2017-10-15/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:961c8ede8013c32215ec2829c7c5c5f12a5c65279e70119544d33e20f750f4af +size 1217 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/pricing/2017-10-15/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/pricing/2017-10-15/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..ec8f493416b95884cc92197951bc9a349ff276db --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/pricing/2017-10-15/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c5c882eb612271cc0b5fba6b2ed6b1fbcaf1aa08d7950811be08d653ba99a088 +size 4542 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/proton/2020-07-20/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/proton/2020-07-20/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..9eda6e1d188ca96d225ed29777ce2eb13c7ae3e2 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/proton/2020-07-20/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e6cd277adeba96259e8d8a2bab85cb1abb605937914e6c88f980c661cd33d82f +size 1148 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/proton/2020-07-20/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/proton/2020-07-20/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..fd3b4d72ef2a9c9fd976011f529da9d0d09a2071 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/proton/2020-07-20/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:29e0633b31c0340318dd1f73907c99a6829f19df056ce9a5cfc964cda7566ada +size 28216 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/qapps/2023-11-27/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/qapps/2023-11-27/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..9f0ef14909b2848e02b6b0e7b332e8a896468151 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/qapps/2023-11-27/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af3eff16bb7896b9cdd46104b6f7c7041b6e41985728c4e001c4a58b9813d474 +size 1300 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/qapps/2023-11-27/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/qapps/2023-11-27/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..191ce431691c357821f9e5536c524e555d7a484d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/qapps/2023-11-27/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca5b1a701c30a7ae4c7c4c7bc810e91857c51f59125ad2df884a470bfdb8dc8f +size 13950 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/quicksight/2018-04-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/quicksight/2018-04-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..497710744a1ad4df4914f69f94b46cf7d4226f13 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/quicksight/2018-04-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6617823024b813e07ec6838b3d612153d7294f6158d7f9162198bc11751c3c9d +size 1152 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/quicksight/2018-04-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/quicksight/2018-04-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..47a4b9432969929180c10ecd628acc40857f25a4 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/quicksight/2018-04-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:395234dcdd3f2e6400a59d1977986fbacf7d11cc98c088336af7d6fb93c03694 +size 210313 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/ram/2018-01-04/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/ram/2018-01-04/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..a738474c426b55b45bfc18a4a5613d0be00beb6c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/ram/2018-01-04/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e85ac13b9b87311d41abf3345cb0a28a75a1936ffecb4f6e2fa43f4e5dd5bcab +size 1230 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/ram/2018-01-04/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/ram/2018-01-04/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..927ad18ed00cd94bf06be48873efa07a44f579c9 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/ram/2018-01-04/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b76690d3bdc2b004cc30360b20e01289eb813ec0d3e51d7b0538f2a21afda646 +size 18021 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/rbin/2021-06-15/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/rbin/2021-06-15/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..a98df7d1e7545e0514cdedb9730a508ac6988438 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/rbin/2021-06-15/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0b48568094e069458494a575751b67da2b6fd89df75c12d745b557d21d3c80e +size 1146 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/rbin/2021-06-15/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/rbin/2021-06-15/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..b9a428e867c9fdf60041dcccdae21ac13544729f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/rbin/2021-06-15/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e73e223317e10e60767c4b5a30bcfca98d7192e904ff718d5894ca247096cca3 +size 4962 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/rds/2014-09-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/rds/2014-09-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..0cef10fdc5625515cd85f4b93a9d014b39a57c41 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/rds/2014-09-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:81778d073beef05a40620d9641aaa74bd3a9461deeec5912f9f234b253ff9f8b +size 1234 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/rds/2014-09-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/rds/2014-09-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..49ce27d663d9da14604e4229d6d503dd21a74139 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/rds/2014-09-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b986b0945eefe66306b8ca421d6b34437558ee97f46a82c3cdc660503c4288fd +size 37839 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/rds/2014-10-31/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/rds/2014-10-31/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..fb36aeae0f92475c7365fc6f1efaf2fd55a3b41d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/rds/2014-10-31/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb268cb1408be9e99b5427fbc702089228187d47e1e6044973a473e1fa4ae63c +size 1230 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/rds/2014-10-31/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/rds/2014-10-31/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..77648724b855d85a45b9d15bc7ca77e612fb970a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/rds/2014-10-31/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22d0ace0e87a7c47d8a1d8787411a63e70b85a997304a158ab16d203c6610e26 +size 168716 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/redshift-data/2019-12-20/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/redshift-data/2019-12-20/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..832a07da32a37ecbc9c5cbdb89e64c1a64196ae9 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/redshift-data/2019-12-20/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c4a11ff6f98ce454fb43dbf0e64b9c8e1b591ad220abd170f33aeb50eb6f8e6 +size 1152 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/redshift-data/2019-12-20/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/redshift-data/2019-12-20/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..6ae76d2acfa968a8a42616a04621230d743230d4 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/redshift-data/2019-12-20/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a43bb7c15d43fb2acaa95b6a6482e8241d95b1de7819582a81ae6cb338b4d7c9 +size 8044 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/redshift-serverless/2021-04-21/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/redshift-serverless/2021-04-21/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..6d38f33a86d501893c6f106f9e5b164e858bf63e --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/redshift-serverless/2021-04-21/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:68213c6ece38ab0730c7aac15c76bf39b346c3e27196eb37f3299972e9a8aa1b +size 1156 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/redshift-serverless/2021-04-21/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/redshift-serverless/2021-04-21/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..fffb9dfda940e3a271acf0e2e2ccdfee2ec04444 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/redshift-serverless/2021-04-21/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee2b65b131ef88494c1f3fc578777e0a3bcc4f0de9409e748bb0d6e94c32e872 +size 22461 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/redshift/2012-12-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/redshift/2012-12-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..5b4d011ecb0d028e14d5f2968aa015fb54e06c58 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/redshift/2012-12-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b81a3d524de62cce0def3d508900857b3094ea45dc6456a37c4be04bc0ecc88 +size 1234 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/repostspace/2022-05-13/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/repostspace/2022-05-13/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..a9fa27caf482035126b4076d3caf0eaf401ff623 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/repostspace/2022-05-13/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:814a6f3880fb8ac9f48df4ffe592ce11b1c66146d9d0ad2716964cb9bcbba505 +size 1300 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/repostspace/2022-05-13/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/repostspace/2022-05-13/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..c5061692c9cbb03f7f910e5b344c50ce9650a6f9 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/repostspace/2022-05-13/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:27b038971a5002c52638f15e84e7f92a068dcdd08aa64dbc717f5c1eea05e579 +size 5946 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/resiliencehub/2020-04-30/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/resiliencehub/2020-04-30/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..7d905de8cb09c1f1d64a99baa7bc9404875e56e7 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/resiliencehub/2020-04-30/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07ae02341b2cc64246c2368641d39d9a29c12cf7ececfee2ebce7ae971a61ac0 +size 1152 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/resiliencehub/2020-04-30/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/resiliencehub/2020-04-30/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..6bc93fda0b0a06c59dbcdc79eefb782eca893dc8 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/resiliencehub/2020-04-30/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:037e04e45818b409915ad0e01be0292bc368fecd70f394ab43b32c047acbee1e +size 29858 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/resource-groups/2017-11-27/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/resource-groups/2017-11-27/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..d6b24a8247772d7c68110204647706517260bb2b --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/resource-groups/2017-11-27/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a51d6e57bc5691b14bd25aaf3293e22bdbfa144afb6f80f9911f8959b15b03a3 +size 1239 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/resource-groups/2017-11-27/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/resource-groups/2017-11-27/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..620250d30c4fe9a5bfe7656e32d767460d6cb6ea --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/resource-groups/2017-11-27/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c277097c52c3ea1e0d18a04994f833e259f295e16d7e6d1aabe7ae209a4d777b +size 14326 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/resourcegroupstaggingapi/2017-01-26/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/resourcegroupstaggingapi/2017-01-26/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..ca35669938a5eee2683353582219770e52b8b164 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/resourcegroupstaggingapi/2017-01-26/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d89b0593e52964d053307bbe512a3e78b3ee16c0b4db1afd74667b23a6024107 +size 1149 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/resourcegroupstaggingapi/2017-01-26/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/resourcegroupstaggingapi/2017-01-26/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..f519f4c689135a0f388ccc364371f5cad0a3c9eb --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/resourcegroupstaggingapi/2017-01-26/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:41abb03852382629e422bb9902d708af4f103a35030a8604400177ce00e67686 +size 8919 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/route53/2013-04-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/route53/2013-04-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..8e2e6dc830a0bdcf22f0904d69e6882148813b1d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/route53/2013-04-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dab79a4b12cb3faf57fc194110c01a4f8382065a94700d3c2e6d939302109e79 +size 2244 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/route53/2013-04-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/route53/2013-04-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..e085621645eda2283ca69634a612806bc126b989 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/route53/2013-04-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da471451fae433a5d2aa1f0ab91bed08ebdb1b3edd05274832a72b81be95be15 +size 64381 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/route53domains/2014-05-15/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/route53domains/2014-05-15/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..269e46a1de09606bc07dec02fa436e80f46c3795 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/route53domains/2014-05-15/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1775ba2b3d0d3ac5888227e575d92ba08eb28120fb0db64687289b887b7b9375 +size 1155 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/route53domains/2014-05-15/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/route53domains/2014-05-15/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..8e862b462e1fa758c187d51d81bb7d6c79c88109 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/route53domains/2014-05-15/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9422643e09c6d76adacbf6c85a4df59826b8ed9dbd33d1666c7ce8d759ef1df1 +size 21376 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/route53globalresolver/2022-09-27/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/route53globalresolver/2022-09-27/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..4227dd982446bb6149e5ca076d0d74a2bb5fb984 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/route53globalresolver/2022-09-27/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a4612526df9e38dc0e17bdc85751e9954d66f6dbc7553b1d5503f5502d583ef +size 845 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/route53globalresolver/2022-09-27/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/route53globalresolver/2022-09-27/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..b9962b2666c2c6bc4ceec7eb478a2e337743ed92 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/route53globalresolver/2022-09-27/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8916249816b8e04e2915bc23692eacf46850e300239852c7bbec6cba837183df +size 16643 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/rtbfabric/2023-05-15/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/rtbfabric/2023-05-15/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..2043f12a5bc5fb6934990bc7dc3cf2d181a0b8e6 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/rtbfabric/2023-05-15/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7646536b13ef4d11b456a361bec0156cf44c3e4895b8727c4f53485da2180928 +size 1279 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/rtbfabric/2023-05-15/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/rtbfabric/2023-05-15/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..caa1c2a4d354481f3ab9c5cbe79fb81a1ba7e39f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/rtbfabric/2023-05-15/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8609118ffdb2295b17bf234b9f4ccbffa8b1f79110699a3ccddf0fe889bf4e78 +size 8002 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/s3/2006-03-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/s3/2006-03-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..163d92f955a42c19b14061a025caba5605f09409 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/s3/2006-03-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b58680e409be0fe870d1b29e2cb0e04d559a6b51ebb688fb4b7ea45e99bd389a +size 23123 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/s3/2006-03-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/s3/2006-03-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..c461606ee8e9a7665c05c275ad8662fdb1541eee --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/s3/2006-03-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:330125b336b51a5b7d10c94ecb10d2cbe91dc5b08f0b5ebdbf4bc5c6c64aefe3 +size 170127 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/s3control/2018-08-20/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/s3control/2018-08-20/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..8cadb2325f9c719f788550928f6d0de2ef604d92 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/s3control/2018-08-20/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e60d145415c2b1f0dfd2190914aaf8fb8b9d6f112775b879524b159b1d5f45b8 +size 9127 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/s3control/2018-08-20/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/s3control/2018-08-20/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..4c0e2fdd2f6aaf991603c0d6f9633200f557c4ce --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/s3control/2018-08-20/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e28be07c1a516cc14a540ff36b33f08b093053872d24a2a67d631b9b425dc35 +size 66285 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/s3tables/2018-05-10/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/s3tables/2018-05-10/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..85293028a76045cdf21f4654377e20e1a1c4317d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/s3tables/2018-05-10/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c4eaa2fc59600e895a22ceb59e11f060bf88e30172ca428f616eee5863bff85b +size 1298 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/s3tables/2018-05-10/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/s3tables/2018-05-10/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..69cf51787c7c72005e4ef223b4285f0d0ff1d139 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/s3tables/2018-05-10/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37307585614723e9ded708ef0d54b3d7261c45b16ce85d6a63e64683f6b2f71f +size 13189 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/sagemaker-a2i-runtime/2019-11-07/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/sagemaker-a2i-runtime/2019-11-07/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..891823dc84a5e8ec9dd047a7db1d045499086278 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/sagemaker-a2i-runtime/2019-11-07/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c1782b8198fc577eefa60d4e37dbba7e93f66f300f251b8aa24eadafe3fe6af +size 1159 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/sagemaker-a2i-runtime/2019-11-07/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/sagemaker-a2i-runtime/2019-11-07/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..ec787cd442e132dba2ecf2a687e439028ff00e7c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/sagemaker-a2i-runtime/2019-11-07/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c9e7897b2c30db95a5716ddfd17f4ecc3458822ff5212f07253f6e12c0c9cd1d +size 3798 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/sagemaker-featurestore-runtime/2020-07-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/sagemaker-featurestore-runtime/2020-07-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..4402e064c8bc68ceeef37c7f2c08b71fe15a1ca9 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/sagemaker-featurestore-runtime/2020-07-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:682a61209e6343d666de69bb39ef7b1b4a1860c08c0331ba46ef8993d6f4f3d0 +size 1168 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/sagemaker-featurestore-runtime/2020-07-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/sagemaker-featurestore-runtime/2020-07-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..9a79c0927c49029430e9aaef736ef22fdab11905 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/sagemaker-featurestore-runtime/2020-07-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48e8ad8065c9ef1bc42aadf3f3fdaab07fe4634425a793e5ddaf894bc6de7012 +size 4151 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/secretsmanager/2017-10-17/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/secretsmanager/2017-10-17/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..331ca3c7527d4025fbd3444c132c5a0764a22d50 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/secretsmanager/2017-10-17/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed4dab0db10d38346c0b6ef9af1b3599786483d0c9f43fbd9035089c44178a8f +size 1351 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/security-ir/2018-05-10/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/security-ir/2018-05-10/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..edc4045b499dbc844e8c111b63746a95b345b23c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/security-ir/2018-05-10/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a8e6c322d05212b5cb1367c2d5b6adfcd5b947e348ab0b327e59be4eb6f57a8 +size 835 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/security-ir/2018-05-10/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/security-ir/2018-05-10/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..930814f197632903bc592d826fcd83837dc4e5d9 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/security-ir/2018-05-10/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77f405fd32c3769fe237e66e512d7d9b95fb6ee25546de43c0368c2b83d0c9dd +size 12359 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/servicecatalog-appregistry/2020-06-24/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/servicecatalog-appregistry/2020-06-24/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..38af473fc11a1bcf02300a2c529258e292b324e0 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/servicecatalog-appregistry/2020-06-24/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88309e7322c2e348b4e21c0993c759e38f0c4eba420175d601607080d3bacadd +size 1247 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/servicecatalog-appregistry/2020-06-24/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/servicecatalog-appregistry/2020-06-24/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..57d495cbcd2a0cc8791028c64427497bbd105f4e --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/servicecatalog-appregistry/2020-06-24/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:06bc40b3bbfc060dc1d5a3b1bd43cd230ec496f967df0a3d852bb83a8c69950b +size 7868 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/servicecatalog/2015-12-10/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/servicecatalog/2015-12-10/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..02ed0cdb3f39a04386fd4483b9ab322dfb5f2335 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/servicecatalog/2015-12-10/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dafb9a4acf89e9d864d8ee6296b0b9ca9396f107c297869cf4b10ce81aed11ea +size 1153 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/servicecatalog/2015-12-10/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/servicecatalog/2015-12-10/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..0911f6603e9ccb14ea0189579c57b91dacd3fd6c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/servicecatalog/2015-12-10/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dbbeb7bf58c7dd1416d9b5beecf8bf83245f8e589c150408673a9e26f0c40a29 +size 37405 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/ses/2010-12-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/ses/2010-12-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..3c671161b0397ff3718b13fe3106f4723e93e19a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/ses/2010-12-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db3a2d205c5d8e0d78ca7c12c2be29d027c312bbea0e4b8fe8cbb4a556bb57da +size 1146 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/ses/2010-12-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/ses/2010-12-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..8ecba2aa78adcc9f77a6e108cbee5519f9420a6b --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/ses/2010-12-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f769f5ae1d744690a7e08b2827a5d0d6280a1689e741a9a2da40666127249f6 +size 36439 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/sqs/2012-11-05/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/sqs/2012-11-05/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..6256d4355429686ff1399c442f1607cdf4eb9693 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/sqs/2012-11-05/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f32c4bc7979f5e0bca7db05e96452a57819d7393289cf54a3c0cd3cb1d65a3f1 +size 1230 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/sqs/2012-11-05/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/sqs/2012-11-05/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..ef62367a2d9d26ffbbb465328aaca1b07b078f99 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/sqs/2012-11-05/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:730544343252880e58e15b3e847a1628f83fd37cb18a2194029cd7b578e07e12 +size 24462 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/ssm/2014-11-06/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/ssm/2014-11-06/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..994dde158ed1a9af6e857779182040a29c0fc52a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/ssm/2014-11-06/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:719721096349bf17ac1f90aa258868cbae7057e8472454d4d3f9b1f83d97d134 +size 1230 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/ssm/2014-11-06/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/ssm/2014-11-06/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..c073982949c0071e748a1adec6580f227a678d82 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/ssm/2014-11-06/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b3cab07c75ffbe4f2c36ee3db221e25df9eb4597d46cd877a1ac8be6f47c00a2 +size 134833 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/sso-oidc/2019-06-10/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/sso-oidc/2019-06-10/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..9ce83b72e38ec06ee347795d622333a353090270 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/sso-oidc/2019-06-10/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e900c9658c76f74029259c42ff7f9b8bd0bb291aeee0b0046a4fced13f4c2163 +size 1231 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/sso-oidc/2019-06-10/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/sso-oidc/2019-06-10/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..05d81a7f9213b9d32ed7ccac65addd07842bc7dc --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/sso-oidc/2019-06-10/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae004429ae4e1e305178989bec61a9d737673011f118ad805b89bc7a1ea29d10 +size 6085 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/support/2013-04-15/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/support/2013-04-15/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..808c74c0a75bdce9fce7ac6c05a23e5a87952013 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/support/2013-04-15/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fee80193369baa6278d92d7b633d66f6f65382d90414440506834ef7cbabdccb +size 1557 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/support/2013-04-15/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/support/2013-04-15/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..8407396f20544826d3bb00a7c0393a3b34e638c2 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/support/2013-04-15/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8604a4101cc630e4137fdfc2d33dbe527af1f9b4600569562d77e9179d3ecbc7 +size 11901 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/synthetics/2017-10-11/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/synthetics/2017-10-11/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..deabde72029399c10e1b71b7b422426690cd72f7 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/synthetics/2017-10-11/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:01873edcc65f78ce029efaad767a7c93dc98570e37c73a3bd315734f0b41f57d +size 1150 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/synthetics/2017-10-11/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/synthetics/2017-10-11/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..a073316ffee5692064e66650d9e10442f5ae187e --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/synthetics/2017-10-11/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:655f11f5444c6d4dd98c42a5c7d78cd8e484cfc5efd645db8c1c77606b875915 +size 18363 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/timestream-influxdb/2023-01-27/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/timestream-influxdb/2023-01-27/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..190c1ea66ca187a23d150e516cad3fe83c8eefe7 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/timestream-influxdb/2023-01-27/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:715d56453b11a53941232400ce9375b1d7e9c285615b066613222be3168e2b36 +size 1307 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/timestream-influxdb/2023-01-27/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/timestream-influxdb/2023-01-27/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..84fa856c034740a5b764d52c14598ead00604388 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/timestream-influxdb/2023-01-27/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad44900acb8ce263b5f0997bdae114055fdadf357bb59a22f87ec21c087faa18 +size 14484 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/timestream-write/2018-11-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/timestream-write/2018-11-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..dc63b90ba8b6277a2754b10f4ecf20ac4750fb45 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/timestream-write/2018-11-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc8d6bd8c6f33caa483aa6552efb008bcf313372690aea9c4e88e03b6d13a3dd +size 1374 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/timestream-write/2018-11-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/timestream-write/2018-11-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..ab216272d0f7b002eb7d575e35705c2574b1cde5 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/timestream-write/2018-11-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:36c6a15e5f3db251d3c5019f55eccdf6c223ef73e18cb3682d916c8781289d01 +size 12148 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/verifiedpermissions/2021-12-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/verifiedpermissions/2021-12-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..01aa98038adf4d49c42be944fb0f40ba48c09040 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/verifiedpermissions/2021-12-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:29015ad784932d6f4fc71fa5aca8f60975046e4830c0d6cd8a88becfafade3f4 +size 1306 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/verifiedpermissions/2021-12-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/verifiedpermissions/2021-12-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..04017b9089abd2cf1a93de7062ce8eca471b1e8b --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/verifiedpermissions/2021-12-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a914e26326a5e8aa4e359448348ccd61db4c474093e2e66e8ee5db275067654 +size 25931 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/voice-id/2021-09-27/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/voice-id/2021-09-27/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..7a2c84b01cc2f85a1f330490fd6970b45086a8c9 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/voice-id/2021-09-27/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0965316063cd57bf9d24ced4868e632f2875ad306878cafaa37fd12843ee6337 +size 1148 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/voice-id/2021-09-27/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/voice-id/2021-09-27/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..950d6610294f4be493d573b38e737b0c27949666 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/voice-id/2021-09-27/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c88886983d8d0e676e6ce7530988a7c95eeffb44013cfbb7af780674b99c20c1 +size 11875 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/wafv2/2019-07-29/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/wafv2/2019-07-29/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..74cd0aa009e187070834ea46b152dcb551747cfa --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/wafv2/2019-07-29/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:94ea52233b6051821d58374a9767aecf3309508872fdcb4c1140785ff4d69c92 +size 1148 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/wafv2/2019-07-29/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/wafv2/2019-07-29/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..ae97aca0a013883410221fd5c0e2ef47af963128 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/wafv2/2019-07-29/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8ddee1fb0f4b14d7d2feea3bc1db389e32ee14d4f1b2eeb0dd1c90bb6b0e6d8c +size 78520 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/wellarchitected/2020-03-31/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/wellarchitected/2020-03-31/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..c39debd571be533b250254a15d0fb0c27ad8aa38 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/wellarchitected/2020-03-31/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b13fb2b9dfc0ccabe1508cdcb52e43ae53ec8ca8cdd0f0ee7e5d07ec877d3560 +size 1154 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/wellarchitected/2020-03-31/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/wellarchitected/2020-03-31/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..80855e93a0320f8eadcf69f0e7e308f5c866355d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/wellarchitected/2020-03-31/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95f5f2037125c6ff0492e6b3c11864fd124b9043adefa493d1ac4ab81f1c5dec +size 21152 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/wickr/2024-02-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/wickr/2024-02-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..f6ef7d0e3ce9978626ef3d7cb15fdfe6faf5a4b3 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/wickr/2024-02-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2905d7866ca9819ce038d4edd5ae01aa1578646df5a1f80266887aa1ef327a22 +size 1302 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/wickr/2024-02-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/wickr/2024-02-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..d6b9504e15b6dffaf0fbfc55b48b5977fc375412 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/wickr/2024-02-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f1c671228d7884e845b5b8bb65ab9e89148ff4e93498b22148f4c2bb99fe424b +size 20363 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/workmail/2017-10-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/workmail/2017-10-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..749759c777dd1bb2db88803961ba2a72c5b55b2a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/workmail/2017-10-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3c2ac7657b61f8239b111d7cf3e995780cfb06e12c5e73c381fc3ea021271344 +size 1150 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/workmail/2017-10-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/workmail/2017-10-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..51be1d33afaa5007d40bb3a3bb3bd084ee10611b --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/workmail/2017-10-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9757b8089b4b035c69b3bcae9a99976310e047810c4efb78e218bc78cb6ba48c +size 27947 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/workmailmessageflow/2019-05-01/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/workmailmessageflow/2019-05-01/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..eea04c10054560903c743026d5b73eb832e2a1d1 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/workmailmessageflow/2019-05-01/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:19a89065337901704af30bdd3c5236caff8a069733877e5dbef9c181b5e9ef6d +size 1158 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/workmailmessageflow/2019-05-01/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/workmailmessageflow/2019-05-01/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..b7eed31dbf3687a97703d2d21e217a87f53b4129 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/workmailmessageflow/2019-05-01/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:58a8b61d8713aeb0940da0634496eedd574742d74d199e39fbb4b8d08fe5b123 +size 2293 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/workspaces-thin-client/2023-08-22/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/workspaces-thin-client/2023-08-22/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..860e896b74bd5f551f57a313ba760eddfb94e49a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/workspaces-thin-client/2023-08-22/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6317b18104cb4e8067dc6e7d6322c897a6d284a888e581d36233c8329d062b8 +size 1297 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/workspaces-thin-client/2023-08-22/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/workspaces-thin-client/2023-08-22/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..34ae598289613730180cd4e1221c203d95c6a8d6 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/workspaces-thin-client/2023-08-22/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9aa04d2ff161a72ba82a56bd4eb354069d6511e17bfa156ddd7530fdaa00358f +size 6460 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/xray/2016-04-12/endpoint-rule-set-1.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/xray/2016-04-12/endpoint-rule-set-1.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..185b05afe52f1d5799f9915babee8f29b21e2385 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/xray/2016-04-12/endpoint-rule-set-1.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45dfb6fe3dd18640430af24e72b8d43cbe2840fb481957b560660c787bc4fde6 +size 1146 diff --git a/.venv/lib/python3.13/site-packages/botocore/data/xray/2016-04-12/service-2.json.gz b/.venv/lib/python3.13/site-packages/botocore/data/xray/2016-04-12/service-2.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..403516c74520ee25cead0a93f99dbf3544dc83b0 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/botocore/data/xray/2016-04-12/service-2.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28f431876dfd30aa3b3883bfd6fc46ba2d805caab67e718fa59732ec1643253a +size 21603 diff --git a/.venv/lib/python3.13/site-packages/charset_normalizer-3.4.4.dist-info/licenses/LICENSE b/.venv/lib/python3.13/site-packages/charset_normalizer-3.4.4.dist-info/licenses/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..9725772c7967075d97dc78d60f3735435eccba63 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/charset_normalizer-3.4.4.dist-info/licenses/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 TAHRI Ahmed R. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.venv/lib/python3.13/site-packages/docker-7.1.0.dist-info/licenses/LICENSE b/.venv/lib/python3.13/site-packages/docker-7.1.0.dist-info/licenses/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..75191a4dc711fe86bcdcae49cdfbde424190659b --- /dev/null +++ b/.venv/lib/python3.13/site-packages/docker-7.1.0.dist-info/licenses/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2016 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/__init__.py b/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3db87ae34841af0cb850c63c92ee54e3923ab256 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/__init__.py @@ -0,0 +1,43 @@ +from typing import Any + +from .acl_mixin import AclCommandsMixin +from .bitmap_mixin import BitmapCommandsMixin +from .connection_mixin import ConnectionCommandsMixin +from .generic_mixin import GenericCommandsMixin +from .geo_mixin import GeoCommandsMixin +from .hash_mixin import HashCommandsMixin +from .list_mixin import ListCommandsMixin +from .pubsub_mixin import PubSubCommandsMixin +from .server_mixin import ServerCommandsMixin +from .set_mixin import SetCommandsMixin +from .streams_mixin import StreamsCommandsMixin +from .string_mixin import StringCommandsMixin +from .transactions_mixin import TransactionsCommandsMixin + +try: + from .scripting_mixin import ScriptingCommandsMixin +except ImportError: + + class ScriptingCommandsMixin: # type: ignore # noqa: E303 + def __init__(self, *args: Any, **kwargs: Any) -> None: + kwargs.pop("lua_modules", None) + self.server_supports_lua_scripts = False + super(ScriptingCommandsMixin, self).__init__(*args, **kwargs) # type: ignore + + +__all__ = [ + "BitmapCommandsMixin", + "ConnectionCommandsMixin", + "GenericCommandsMixin", + "GeoCommandsMixin", + "HashCommandsMixin", + "ListCommandsMixin", + "PubSubCommandsMixin", + "ScriptingCommandsMixin", + "TransactionsCommandsMixin", + "ServerCommandsMixin", + "SetCommandsMixin", + "StreamsCommandsMixin", + "StringCommandsMixin", + "AclCommandsMixin", +] diff --git a/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/acl_mixin.py b/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/acl_mixin.py new file mode 100644 index 0000000000000000000000000000000000000000..bdf98d9dfdc0e26839399e3c9875ec78dea61919 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/acl_mixin.py @@ -0,0 +1,187 @@ +import secrets +from typing import Any, List, Dict, Optional, Union + +from fakeredis import _msgs as msgs +from fakeredis._commands import command, Int +from fakeredis._helpers import SimpleError, OK, casematch, SimpleString +from fakeredis._typing import VersionType +from fakeredis._server import FakeServer +from fakeredis.model import AccessControlList, ClientInfo, get_categories, get_commands_by_category + + +class AclCommandsMixin: + def __init(self, *args: Any, **kwargs: Any) -> None: + super(AclCommandsMixin, self).__init__(*args, **kwargs) + self.version: VersionType + self._server: FakeServer + self._client_info: ClientInfo + + @property + def _server_config(self) -> Dict[bytes, bytes]: + return self._server.config + + @property + def _acl(self) -> AccessControlList: + return self._server.acl + + def _check_user_password(self, username: bytes, password: Optional[bytes]) -> bool: + return self._acl.get_user_acl(username).check_password(password) + + def _set_user_acl(self, username: bytes, *args: bytes) -> None: + user_acl = self._acl.get_user_acl(username) + for arg in args: + if casematch(arg, b"resetchannels"): + user_acl.reset_channels_patterns() + continue + elif casematch(arg, b"resetkeys"): + user_acl.reset_key_patterns() + continue + elif casematch(arg, b"on"): + user_acl.enabled = True + continue + elif casematch(arg, b"off"): + user_acl.enabled = False + continue + elif casematch(arg, b"nopass"): + user_acl.set_nopass() + continue + elif casematch(arg, b"reset"): + user_acl.reset() + continue + elif casematch(arg, b"nocommands"): + arg = b"-@all" + elif casematch(arg, b"allcommands"): + arg = b"+@all" + elif casematch(arg, b"allkeys"): + arg = b"~*" + elif casematch(arg, b"allchannels"): + arg = b"&*" + elif arg[0] == ord("(") and arg[-1] == ord(")"): + user_acl.add_selector(arg[1:-1]) + continue + + prefix = arg[0] + if prefix == ord(">"): + user_acl.add_password(arg[1:]) + elif prefix == ord("<"): + user_acl.remove_password(arg[1:]) + elif prefix == ord("#"): + user_acl.add_password_hex(arg[1:]) + elif prefix == ord("!"): + user_acl.remove_password_hex(arg[1:]) + elif prefix == ord("+") or prefix == ord("-"): + user_acl.add_command_or_category(arg) + elif prefix == ord("~"): + user_acl.add_key_pattern(arg[1:]) + elif prefix == ord("&"): + user_acl.add_channel_pattern(arg[1:]) + + @command(name="CONFIG SET", fixed=(bytes, bytes), repeat=(bytes, bytes)) + def config_set(self, *args: bytes) -> SimpleString: + if len(args) % 2 != 0: + raise SimpleError(msgs.WRONG_ARGS_MSG6.format("CONFIG SET")) + for i in range(0, len(args), 2): + self._server_config[args[i]] = args[i + 1] + return OK + + @command(name="AUTH", fixed=(), repeat=(bytes,)) + def _auth(self, *args: bytes) -> SimpleString: + if not 1 <= len(args) <= 2: + raise SimpleError(msgs.WRONG_ARGS_MSG6.format("AUTH")) + username = None if len(args) == 1 else args[0] + password = args[1] if len(args) == 2 else args[0] + if (username is None or username == b"default") and (password == self._server_config.get(b"requirepass", b"")): + self._client_info["user"] = "default" + return OK + username = username or b"default" + if len(args) >= 1 and self._check_user_password(username, password): + self._client_info["user"] = username.decode() + return OK + self._acl.add_log_record(b"auth", b"auth", b"AUTH", username, self._client_info.as_bytes()) + raise SimpleError(msgs.AUTH_FAILURE) + + @command(name="ACL CAT", fixed=(), repeat=(bytes,)) + def acl_cat(self, *category: bytes) -> List[bytes]: + if len(category) == 0: + res = get_categories() + else: + res = get_commands_by_category(category[0]) + res = [cmd.replace(b" ", b"|") for cmd in res] + return res + + @command(name="ACL GENPASS", fixed=(), repeat=(bytes,)) + def acl_genpass(self, *args: bytes) -> bytes: + bits = Int.decode(args[0]) if len(args) > 0 else 256 + bits = bits + bits % 4 # Round to 4 + nbytes: int = bits // 8 + return secrets.token_hex(nbytes).encode() + + @command(name="ACL SETUSER", fixed=(bytes,), repeat=(bytes,)) + def acl_setuser(self, username: bytes, *args: bytes) -> SimpleString: + self._set_user_acl(username, *args) + return OK + + @command(name="ACL LIST", fixed=(), repeat=()) + def acl_list(self) -> List[bytes]: + return self._acl.as_rules() + + @command(name="ACL DELUSER", fixed=(bytes,), repeat=()) + def acl_deluser(self, username: bytes) -> SimpleString: + self._acl.del_user(username) + return OK + + @command(name="ACL GETUSER", fixed=(bytes,), repeat=()) + def acl_getuser(self, username: bytes) -> List[Union[bytes, List[bytes]]]: + res = self._acl.get_user_acl(username).as_array() + return res + + @command(name="ACL USERS", fixed=(), repeat=()) + def acl_users(self) -> List[bytes]: + res = self._acl.get_users() + return res + + @command(name="ACL WHOAMI", fixed=(), repeat=()) + def acl_whoami(self) -> bytes: + return self._client_info.user + + @command(name="ACL SAVE", fixed=(), repeat=()) + def acl_save(self) -> SimpleString: + if b"aclfile" not in self._server_config: + raise SimpleError(msgs.MISSING_ACLFILE_CONFIG) + acl_filename = self._server_config[b"aclfile"] + with open(acl_filename, "wb") as f: + f.write(b"\n".join(self._acl.as_rules())) + return OK + + @command(name="ACL LOAD", fixed=(), repeat=()) + def acl_load(self) -> SimpleString: + if b"aclfile" not in self._server_config: + raise SimpleError(msgs.MISSING_ACLFILE_CONFIG) + acl_filename = self._server_config[b"aclfile"] + with open(acl_filename, "rb") as f: + rules_list = f.readlines() + for rule in rules_list: + if not rule.startswith(b"user "): + continue + splitted = rule.split(b" ") + components = [] + i = 1 + while i < len(splitted): + current_component = splitted[i] + if current_component.startswith(b"("): + while not current_component.endswith(b")"): + i += 1 + current_component += b" " + splitted[i] + components.append(current_component) + i += 1 + + self._set_user_acl(components[0], *components[1:]) + return OK + + @command(name="ACL LOG", fixed=(), repeat=(bytes,)) + def acl_log(self, *args: bytes) -> Union[SimpleString, List[Dict[str, str]]]: + if len(args) == 1 and casematch(args[0], b"RESET"): + self._acl.reset_log() + return OK + count = Int.decode(args[0]) if len(args) == 1 else 0 + return self._acl.log(count) diff --git a/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/bitmap_mixin.py b/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/bitmap_mixin.py new file mode 100644 index 0000000000000000000000000000000000000000..8b55f6c5a506c3727f07f5989694a82836323e87 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/bitmap_mixin.py @@ -0,0 +1,272 @@ +import re +from typing import Any, Callable, List, Optional + +from fakeredis import _msgs as msgs +from fakeredis._commands import ( + command, + Key, + Int, + BitOffset, + BitValue, + fix_range_string, + fix_range, + CommandItem, +) +from fakeredis._helpers import SimpleError, casematch +from fakeredis._typing import VersionType + + +class BitfieldEncoding: + signed: bool + size: int + + def __init__(self, encoding: bytes) -> None: + match = re.match(rb"^([ui])(\d+)$", encoding) + if match is None: + raise SimpleError(msgs.INVALID_BITFIELD_TYPE) + + self.signed = match[1] == b"i" + self.size = int(match[2]) + + if self.size < 1 or self.size > (64 if self.signed else 63): + raise SimpleError(msgs.INVALID_BITFIELD_TYPE) + + +class BitmapCommandsMixin: + def __init(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.version: VersionType + + @staticmethod + def _bytes_as_bin_string(value: bytes) -> str: + return "".join([bin(i).lstrip("0b").rjust(8, "0") for i in value]) + + @command((Key(bytes), Int), (bytes,), flags=msgs.FLAG_DO_NOT_CREATE) + def bitpos(self, key: CommandItem, bit: int, *args: bytes) -> int: + if bit != 0 and bit != 1: + raise SimpleError(msgs.BIT_ARG_MUST_BE_ZERO_OR_ONE) + if len(args) > 3: + raise SimpleError(msgs.SYNTAX_ERROR_MSG) + if len(args) == 3 and self.version < (7,): + raise SimpleError(msgs.SYNTAX_ERROR_MSG) + bit_mode = False + if len(args) == 3 and self.version >= (7,): + bit_mode = casematch(args[2], b"bit") + if not bit_mode and not casematch(args[2], b"byte"): + raise SimpleError(msgs.SYNTAX_ERROR_MSG) + + if key.value is None: + # The first clear bit is at 0, the first set bit is not found (-1). + return -1 if bit == 1 else 0 + + start = 0 if len(args) == 0 else Int.decode(args[0]) + source_value = self._bytes_as_bin_string(key.value) if bit_mode else key.value + end = len(source_value) if len(args) <= 1 else Int.decode(args[1]) + length = len(source_value) + start, end = fix_range(start, end, length) + if start == end == -1: + return -1 + source_value = source_value[start:end] if bit_mode else self._bytes_as_bin_string(source_value[start:end]) + + result = source_value.find(str(bit)) + if result != -1: + result += start if bit_mode else (start * 8) + elif bit == 0 and len(args) <= 1: + # Redis treats the value as padded with zero bytes to an infinity + # if the user is looking for the first clear bit and no end is set. + result = len(key.value) * 8 + return result + + @command(name="BITCOUNT", fixed=(Key(bytes),), repeat=(bytes,), flags=msgs.FLAG_DO_NOT_CREATE) + def bitcount(self, key: CommandItem, *args: bytes) -> int: + # Redis checks the argument count before decoding integers. That's why + # we can't declare them as Int. + if len(args) == 0: + if key.value is None: + return 0 + return bin(int.from_bytes(key.value, "little")).count("1") + + if not 2 <= len(args) <= 3: + raise SimpleError(msgs.SYNTAX_ERROR_MSG) + try: + start = Int.decode(args[0]) + end = Int.decode(args[1]) + except SimpleError as e: + if self.version >= (7, 4): + raise e + return 0 + bit_mode = False + if len(args) == 3 and self.version < (7,): + raise SimpleError(msgs.SYNTAX_ERROR_MSG) + if len(args) == 3 and self.version >= (7,): + bit_mode = casematch(args[2], b"bit") + if not bit_mode and not casematch(args[2], b"byte"): + raise SimpleError(msgs.SYNTAX_ERROR_MSG) + + if key.value is None: + return 0 + if bit_mode: + value = self._bytes_as_bin_string(key.value if key.value else b"") + start, end = fix_range_string(start, end, len(value)) + res: int = value.count("1", start, end) + return res + start, end = fix_range_string(start, end, len(key.value)) + value = key.value[start:end] + + return bin(int.from_bytes(value, "little")).count("1") + + @command(fixed=(Key(bytes), BitOffset)) + def getbit(self, key: CommandItem, offset: int) -> int: + value = key.get(b"") + byte = offset // 8 + remaining = offset % 8 + actual_bitoffset = 7 - remaining + try: + actual_val = value[byte] + except IndexError: + return 0 + return 1 if (1 << actual_bitoffset) & actual_val else 0 + + @command((Key(bytes), BitOffset, BitValue)) + def setbit(self, key: CommandItem, offset: int, value: int) -> int: + val = key.value if key.value is not None else b"\x00" + byte = offset // 8 + remaining = offset % 8 + actual_bitoffset = 7 - remaining + if len(val) - 1 < byte: + # We need to expand val so that we can set the appropriate + # bit. + needed = byte - (len(val) - 1) + val += b"\x00" * needed + old_byte = val[byte] + if value == 1: + new_byte = old_byte | (1 << actual_bitoffset) + else: + new_byte = old_byte & ~(1 << actual_bitoffset) + old_value = value if old_byte == new_byte else 1 - value + reconstructed = bytearray(val) + reconstructed[byte] = new_byte + if bytes(reconstructed) != key.value or (self.version == (6,) and old_byte != new_byte): + key.update(bytes(reconstructed)) + return old_value + + @staticmethod + def _bitop(op: Callable[[Any, Any], Any], *keys: CommandItem) -> Any: + value = keys[0].value + ans = keys[0].value + i = 1 + while i < len(keys): + value = keys[i].value if keys[i].value is not None else b"" + ans = bytes(op(a, b) for a, b in zip(ans, value)) + i += 1 + return ans + + @command((bytes, Key()), (Key(bytes),)) + def bitop(self, op_name: bytes, dst: CommandItem, *keys: CommandItem) -> int: + if len(keys) == 0: + raise SimpleError(msgs.WRONG_ARGS_MSG6.format("bitop")) + if casematch(op_name, b"and"): + res = self._bitop(lambda a, b: a & b, *keys) + elif casematch(op_name, b"or"): + res = self._bitop(lambda a, b: a | b, *keys) + elif casematch(op_name, b"xor"): + res = self._bitop(lambda a, b: a ^ b, *keys) + elif casematch(op_name, b"not"): + if len(keys) != 1: + raise SimpleError(msgs.BITOP_NOT_ONE_KEY_ONLY) + val = keys[0].value + res = bytes([((1 << 8) - 1 - val[i]) for i in range(len(val))]) + else: + raise SimpleError(msgs.WRONG_ARGS_MSG6.format("bitop")) + dst.value = res + return len(dst.value) + + def _bitfield_get(self, key: CommandItem, encoding: BitfieldEncoding, offset: int) -> int: + ans = 0 + for i in range(0, encoding.size): + ans <<= 1 + if self.getbit(key, offset + i): + ans += -1 if encoding.signed and i == 0 else 1 + return ans + + def _bitfield_set( + self, + key: CommandItem, + encoding: BitfieldEncoding, + offset: int, + overflow: bytes, + value: Optional[int] = None, + incr: int = 0, + ) -> Optional[int]: + if encoding.signed: + min_value = -(1 << (encoding.size - 1)) + max_value = (1 << (encoding.size - 1)) - 1 + else: + min_value = 0 + max_value = (1 << encoding.size) - 1 + + ans = self._bitfield_get(key, encoding, offset) + new_value = ans if value is None else value + if not encoding.signed: + new_value &= (1 << 64) - 1 # force cast to uint64_t + + if overflow == b"FAIL" and not (min_value <= new_value + incr <= max_value): + return None # yes, failing in this context is not writing the value + elif overflow == b"SAT": + if new_value + incr > max_value: + new_value, incr = max_value, 0 + # REDIS only checks for unsigned underflow on negative incr: + if (encoding.signed or incr < 0) and new_value + incr < min_value: + new_value, incr = min_value, 0 + + new_value += incr + new_value &= (1 << encoding.size) - 1 + # normalize signed number by changing the sign associated to higher bit: + if encoding.signed and new_value > max_value: + new_value -= 1 << encoding.size + + for i in range(0, encoding.size): + bit = (new_value >> (encoding.size - i - 1)) & 1 + self.setbit(key, offset + i, bit) + return new_value if value is None else ans + + @command(fixed=(Key(bytes),), repeat=(bytes,)) + def bitfield(self, key: CommandItem, *args: bytes) -> List[Optional[int]]: + overflow = b"WRAP" + results: List[Optional[int]] = [] + i = 0 + while i < len(args): + if casematch(args[i], b"overflow") and i + 1 < len(args): + overflow = args[i + 1].upper() + if overflow not in (b"WRAP", b"SAT", b"FAIL"): + raise SimpleError(msgs.INVALID_OVERFLOW_TYPE) + i += 2 + elif casematch(args[i], b"get") and i + 2 < len(args): + encoding = BitfieldEncoding(args[i + 1]) + offset = BitOffset.decode(args[i + 2]) + results.append(self._bitfield_get(key, encoding, offset)) + i += 3 + elif casematch(args[i], b"set") and i + 3 < len(args): + old_value = self._bitfield_set( + key=key, + encoding=BitfieldEncoding(args[i + 1]), + offset=BitOffset.decode(args[i + 2]), + value=Int.decode(args[i + 3]), + overflow=overflow, + ) + results.append(old_value) + i += 4 + elif casematch(args[i], b"incrby") and i + 3 < len(args): + old_value = self._bitfield_set( + key=key, + encoding=BitfieldEncoding(args[i + 1]), + offset=BitOffset.decode(args[i + 2]), + incr=Int.decode(args[i + 3]), + overflow=overflow, + ) + results.append(old_value) + i += 4 + else: + raise SimpleError(msgs.SYNTAX_ERROR_MSG) + + return results diff --git a/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/connection_mixin.py b/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/connection_mixin.py new file mode 100644 index 0000000000000000000000000000000000000000..973dfa8d2effb2809053d1bedad51ff909fd5908 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/connection_mixin.py @@ -0,0 +1,116 @@ +from typing import Any, List, Union, Dict + +import fakeredis +from fakeredis import _msgs as msgs +from fakeredis._commands import command, DbIndex, Int +from fakeredis._helpers import SimpleError, OK, SimpleString, Database, casematch +from fakeredis.model import ClientInfo + +PONG = SimpleString(b"PONG") + + +class ConnectionCommandsMixin: + def __init__(self, *args: Any, **kwargs: Any) -> None: + super(ConnectionCommandsMixin, self).__init__(*args, **kwargs) + self._db: Database + self._db_num: int + self._pubsub: int + self._client_info: ClientInfo + self._server: Any + + @command((bytes,)) + def echo(self, message: bytes) -> bytes: + return message + + @command((), (bytes,)) + def ping(self, *args: bytes) -> Union[List[bytes], bytes, SimpleString]: + if len(args) > 1: + msg = msgs.WRONG_ARGS_MSG6.format("ping") + raise SimpleError(msg) + if self._pubsub and self._client_info.protocol_version == 2: + return [b"pong", args[0] if args else b""] + else: + return args[0] if args else PONG + + @command(name="SELECT", fixed=(DbIndex,)) + def select(self, index: DbIndex) -> SimpleString: + self._db = self._server.dbs[index] + self._db_num = index # type: ignore + return OK + + @command(name="CLIENT SETINFO", fixed=(bytes, bytes), repeat=()) + def client_setinfo(self, lib_data: bytes, value: bytes) -> SimpleString: + if casematch(lib_data, b"LIB-NAME"): + self._client_info["lib-name"] = value.decode("utf-8") + return OK + if casematch(lib_data, b"LIB-VER"): + self._client_info["lib-ver"] = value.decode("utf-8") + return OK + raise SimpleError(msgs.SYNTAX_ERROR_MSG) + + @command(name="CLIENT SETNAME", fixed=(bytes,), repeat=()) + def client_setname(self, value: bytes) -> SimpleString: + self._client_info["name"] = value.decode("utf-8") + return OK + + @command(name="CLIENT GETNAME", fixed=(), repeat=()) + def client_getname(self) -> bytes: + return self._client_info.get("name", "").encode("utf-8") + + @command(name="CLIENT ID", fixed=(), repeat=()) + def client_getid(self) -> int: + return self._client_info.get("id", 1) + + @command(name="CLIENT INFO", fixed=(), repeat=()) + def client_info_cmd(self) -> bytes: + return self._client_info.as_bytes() + + @command(name="CLIENT LIST", fixed=(), repeat=(bytes,)) + def client_list_cmd(self, *args: bytes) -> bytes: + sockets = self._server.sockets.copy() + i = 0 + filter_ids = set() + while i < len(args): + if casematch(args[i], b"TYPE") and i + 1 < len(args): + i += 2 + if casematch(args[i], b"ID") and i + 1 < len(args): + i += 1 + while i < len(args): + filter_ids.add(Int.decode(args[i])) + i += 1 + else: + raise SimpleError(msgs.SYNTAX_ERROR_MSG) + if len(filter_ids) > 0: + sockets = [sock for sock in sockets if sock._client_info["id"] in filter_ids] + res = [item._client_info.as_bytes() for item in sockets] + return b"\n".join(res) + + @command(name="HELLO", fixed=(), repeat=(bytes,)) + def hello(self, *args: bytes) -> Dict[str, str]: + self._client_info["resp"] = 2 if len(args) == 0 else Int.decode(args[0]) + i = 1 + while i < len(args): + if args[i] == b"SETNAME" and i + 1 < len(args): + self._client_info["name"] = args[i + 1].decode("utf-8") + i += 2 + elif args[i] == b"AUTH" and i + 2 < len(args): + user = args[i + 1] + password = args[i + 2] + self._server._acl.get_user_acl(user).check_password(password) + i += 3 + else: + raise SimpleError(msgs.SYNTAX_ERROR_MSG) + data = { + "server": "fakeredis", + "version": fakeredis.__version__, + "proto": self._client_info["resp"], + "id": self._client_info.get("id", 1), + "mode": "standalone", + "role": "master", + "modules": [], + } + return data + + @command(name="CLIENT MAINT_NOTIFICATIONS", fixed=(), repeat=(bytes,)) + def client_maint_notifications(self, *args: bytes) -> SimpleString: + pass diff --git a/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/generic_mixin.py b/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/generic_mixin.py new file mode 100644 index 0000000000000000000000000000000000000000..1df0fcb5383e513173e8dc82a641bff47fb5400d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/generic_mixin.py @@ -0,0 +1,412 @@ +import hashlib +import pickle +import random +from typing import Tuple, Any, Callable, List, Optional, Union, Sequence + +from fakeredis import _msgs as msgs +from fakeredis._command_args_parsing import extract_args +from fakeredis._commands import ( + command, + Key, + Int, + DbIndex, + BeforeAny, + CommandItem, + SortFloat, + delete_keys, +) +from fakeredis._helpers import compile_pattern, SimpleError, OK, casematch, Database, SimpleString +from fakeredis._typing import VersionType +from fakeredis.model import ZSet, Hash, ExpiringMembersSet + + +class GenericCommandsMixin: + _ttl: Callable[[CommandItem, float], int] + _scan: Callable[[Sequence[bytes], int, bytes], List[Union[bytes, List[bytes]]]] + _key_value_type: Callable[[CommandItem], SimpleString] + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super(GenericCommandsMixin, self).__init__(*args, **kwargs) + self.version: VersionType + self._server: Any + self._db: Database + self._db_num: int + + def _lookup_key(self, key: bytes, pattern: bytes) -> Optional[bytes]: + """Python implementation of lookupKeyByPattern from redis""" + if pattern == b"#": + return key + p = pattern.find(b"*") + if p == -1: + return None + prefix = pattern[:p] + suffix = pattern[p + 1 :] + arrow = suffix.find(b"->", 0, -1) + if arrow != -1: + field = suffix[arrow + 2 :] + suffix = suffix[:arrow] + else: + field = None + new_key = prefix + key + suffix + item = CommandItem(new_key, self._db, item=self._db.get(new_key)) + if item.value is None: + return None + if field is not None: + if not isinstance(item.value, Hash): + return None + return item.value.get(field) # type: ignore + else: + if not isinstance(item.value, bytes): + return None + return item.value + + def _expireat(self, key: CommandItem, timestamp: float, *args: bytes) -> int: + ( + ( + nx, + xx, + gt, + lt, + ), + _, + ) = extract_args( + args, + ( + "nx", + "xx", + "gt", + "lt", + ), + exception=msgs.EXPIRE_UNSUPPORTED_OPTION, + ) + if self.version < (7,) and any((nx, xx, gt, lt)): + raise SimpleError(msgs.WRONG_ARGS_MSG6.format("expire")) + counter = (nx, gt, lt).count(True) + if (counter > 1) or (nx and xx): + raise SimpleError(msgs.NX_XX_GT_LT_ERROR_MSG) + if ( + not key + or (xx and key.expireat is None) + or (nx and key.expireat is not None) + or (gt and key.expireat is not None and timestamp < key.expireat) + or (lt and key.expireat is not None and timestamp > key.expireat) + ): + return 0 + key.expireat = timestamp + return 1 + + @command(name="DEL", fixed=(Key(),), repeat=(Key(),)) + def del_(self, *keys: CommandItem) -> int: + return delete_keys(*keys) + + @command(name="DUMP", fixed=(Key(missing_return=None),)) + def dump(self, key: CommandItem) -> Optional[bytes]: + value = pickle.dumps(key.value) + checksum = hashlib.sha1(value).digest() + return checksum + value + + @command(name="EXISTS", fixed=(Key(),), repeat=(Key(),)) + def exists(self, *keys) -> int: + ret = 0 + for key in keys: + if key: + ret += 1 + return ret + + @command(name="EXPIRE", fixed=(Key(), Int), repeat=(bytes,)) + def expire(self, key: CommandItem, seconds: int, *args: bytes) -> int: + res = self._expireat(key, self._db.time + seconds, *args) + return res + + @command(name="EXPIREAT", fixed=(Key(), Int), repeat=(bytes,)) + def expireat(self, key: CommandItem, timestamp: int, *args: bytes) -> int: + return self._expireat(key, float(timestamp), *args) + + @command(name="KEYS", fixed=(bytes,)) + def keys(self, pattern: bytes) -> List[bytes]: + if pattern == b"*": + return list(self._db) + else: + regex = compile_pattern(pattern) + return [key for key in self._db if regex.match(key)] + + @command(name="MOVE", fixed=(Key(), DbIndex)) + def move(self, key: CommandItem, db: int) -> int: + if db == self._db_num: + raise SimpleError(msgs.SRC_DST_SAME_MSG) + if not key or key.key in self._server.dbs[db]: + return 0 + # TODO: what is the interaction with expiry? + self._server.dbs[db][key.key] = self._server.dbs[self._db_num][key.key] + key.value = None # Causes deletion + return 1 + + @command(name="PERSIST", fixed=(Key(),)) + def persist(self, key: CommandItem) -> int: + if key.expireat is None: + return 0 + key.expireat = None + return 1 + + @command(name="PEXPIRE", fixed=(Key(), Int), repeat=(bytes,)) + def pexpire(self, key: CommandItem, ms: int, *args: bytes) -> int: + return self._expireat(key, self._db.time + ms / 1000.0, *args) + + @command(name="PEXPIREAT", fixed=(Key(), Int), repeat=(bytes,)) + def pexpireat(self, key: CommandItem, ms_timestamp: int, *args: bytes) -> int: + return self._expireat(key, ms_timestamp / 1000.0, *args) + + @command(name="PTTL", fixed=(Key(),)) + def pttl(self, key: CommandItem) -> int: + return self._ttl(key, 1000.0) + + @command(name="EXPIRETIME", fixed=(Key(),)) + def expiretime(self, key: CommandItem) -> int: + if key.value is None: + return -2 + if key.expireat is None: + return -1 + return int(key.expireat) + + @command(name="PEXPIRETIME", fixed=(Key(),)) + def pexpiretime(self, key: CommandItem) -> int: + if key.value is None: + return -2 + if key.expireat is None: + return -1 + return int(key.expireat * 1000) + + @command(name="RANDOMKEY", fixed=()) + def randomkey(self) -> Optional[bytes]: + keys = list(self._db.keys()) + if not keys: + return None + return random.choice(keys) + + @command(name="RENAME", fixed=(Key(), Key())) + def rename(self, key: CommandItem, newkey: CommandItem) -> SimpleString: + if not key: + raise SimpleError(msgs.NO_KEY_MSG) + # TODO: check interaction with WATCH + if newkey.key != key.key: + newkey.value = key.value + newkey.expireat = key.expireat + key.value = None + return OK + + @command(name="RENAMENX", fixed=(Key(), Key())) + def renamenx(self, key: CommandItem, newkey: CommandItem) -> int: + if not key: + raise SimpleError(msgs.NO_KEY_MSG) + if newkey: + return 0 + self.rename(key, newkey) + return 1 + + @command(name="RESTORE", fixed=(Key(), Int, bytes), repeat=(bytes,)) + def restore(self, key: CommandItem, ttl: int, value: bytes, *args: bytes) -> str: + (replace,), _ = extract_args(args, ("replace",)) + if key and not replace: + raise SimpleError(msgs.RESTORE_KEY_EXISTS) + checksum, value = value[:20], value[20:] + if hashlib.sha1(value).digest() != checksum: + raise SimpleError(msgs.RESTORE_INVALID_CHECKSUM_MSG) + if ttl < 0: + raise SimpleError(msgs.RESTORE_INVALID_TTL_MSG) + if ttl == 0: + expireat = None + else: + expireat = self._db.time + ttl / 1000.0 + key.value = pickle.loads(value) + key.expireat = expireat + return OK + + @command(name="SCAN", fixed=(Int,), repeat=(bytes, bytes)) + def scan(self, cursor, *args) -> List[Union[bytes, List[bytes]]]: + return self._scan(list(self._db), cursor, *args) + + @command(name="SORT", fixed=(Key(),), repeat=(bytes,)) + def sort(self, key: CommandItem, *args: bytes) -> List[bytes]: + if key.value is not None and not isinstance(key.value, (ExpiringMembersSet, list, ZSet)): + raise SimpleError(msgs.WRONGTYPE_MSG) + ( + ( + asc, + desc, + alpha, + store, + sortby, + (limit_start, limit_count), + ), + left_args, + ) = extract_args( + args, + ("asc", "desc", "alpha", "*store", "*by", "++limit"), + error_on_unexpected=False, + left_from_first_unexpected=False, + ) + limit_start = limit_start or 0 + limit_count = -1 if limit_count is None else limit_count + dontsort = sortby is not None and b"*" not in sortby + + i = 0 + get = [] + while i < len(left_args): + if casematch(left_args[i], b"get") and i + 1 < len(left_args): + get.append(left_args[i + 1]) + i += 2 + else: + raise SimpleError(msgs.SYNTAX_ERROR_MSG) + + # TODO: force sorting if the object is a set and either in Lua or + # storing to a key, to match redis behaviour. + items = list(key.value) if key.value is not None else [] + + # These transformations are based on the redis implementation, but + # changed to produce a half-open range. + start = max(limit_start, 0) + end = len(items) if limit_count < 0 else start + limit_count + if start >= len(items): + start = end = len(items) - 1 + end = min(end, len(items)) + + if not get: + get.append(b"#") + if sortby is None: + sortby = b"#" + + if not dontsort: + + def sort_key(val: bytes) -> bytes: + byval = self._lookup_key(val, sortby) + # TODO: use locale.strxfrm when not storing? But then need to decode too. + if byval is None: + byval = BeforeAny() + return byval + + def sort_key_score(val: bytes) -> Tuple[float, bytes]: + byval = self._lookup_key(val, sortby) + score = SortFloat.decode(byval) if byval is not None else 0.0 + return score, val + + sort_func = sort_key if alpha else sort_key_score + items.sort(key=sort_func, reverse=desc) + elif isinstance(key.value, (list, ZSet)): + items.reverse() + + out = [] + for row in items[start:end]: + for g in get: + v = self._lookup_key(row, g) + if store is not None and v is None: + v = b"" + out.append(v) + if store is not None: + item = CommandItem(store, self._db, item=self._db.get(store)) + item.value = out + item.writeback() + return len(out) + else: + return out + + @command(name="SORT_RO", fixed=(Key(),), repeat=(bytes,)) + def sort_ro(self, key: CommandItem, *args: bytes) -> List[bytes]: + if key.value is not None and not isinstance(key.value, (set, list, ZSet)): + raise SimpleError(msgs.WRONGTYPE_MSG) + ( + ( + asc, + desc, + alpha, + sortby, + (limit_start, limit_count), + ), + left_args, + ) = extract_args( + args, + ("asc", "desc", "alpha", "*by", "++limit"), + error_on_unexpected=False, + left_from_first_unexpected=False, + ) + limit_start = limit_start or 0 + limit_count = -1 if limit_count is None else limit_count + dontsort = sortby is not None and b"*" not in sortby + + i = 0 + get = [] + while i < len(left_args): + if casematch(left_args[i], b"get") and i + 1 < len(left_args): + get.append(left_args[i + 1]) + i += 2 + else: + raise SimpleError(msgs.SYNTAX_ERROR_MSG) + + # TODO: force sorting if the object is a set and either in Lua or + # storing to a key, to match redis behaviour. + items = list(key.value) if key.value is not None else [] + + # These transformations are based on the redis implementation, but + # changed to produce a half-open range. + start = max(limit_start, 0) + end = len(items) if limit_count < 0 else start + limit_count + if start >= len(items): + start = end = len(items) - 1 + end = min(end, len(items)) + + if not get: + get.append(b"#") + if sortby is None: + sortby = b"#" + + if not dontsort: + + def sort_key(val: bytes) -> Union[bytes, BeforeAny]: + byval = self._lookup_key(val, sortby) + # TODO: use locale.strxfrm when not storing? But then need to decode too. + if byval is None: + byval = BeforeAny() + return byval + + def sort_key_score(val: bytes) -> Tuple[float, bytes]: + byval = self._lookup_key(val, sortby) + score = SortFloat.decode(byval) if byval is not None else 0.0 + return score, val + + sort_func = sort_key if alpha else sort_key_score + items.sort(key=sort_func, reverse=desc) + elif isinstance(key.value, (list, ZSet)): + items.reverse() + + out: List[bytes] = [] + for row in items[start:end]: + for g in get: + v = self._lookup_key(row, g) + out.append(v) + return out + + @command(name="TTL", fixed=(Key(),)) + def ttl(self, key: CommandItem) -> int: + return self._ttl(key, 1.0) + + @command(name="TYPE", fixed=(Key(),)) + def type_cmd(self, key: CommandItem) -> SimpleString: + return self._key_value_type(key) + + @command(name="UNLINK", fixed=(Key(),), repeat=(Key(),)) + def unlink(self, *keys: CommandItem) -> int: + return delete_keys(*keys) + + @command(name="COPY", fixed=(Key(), Key()), repeat=(bytes,)) + def copy(self, key: CommandItem, newkey: CommandItem, *args: bytes) -> int: + (db_num, replace), _ = extract_args(args, ("+db", "replace")) + db_num = db_num or self._db_num + if key.key == newkey.key and db_num == self._db_num: + raise SimpleError(msgs.SRC_DST_SAME_MSG) + if (newkey.key in self._server.dbs[db_num] and not replace) or (key.key not in self._server.dbs[self._db_num]): + return 0 + + newkey.value = key.value + newkey.expireat = key.expireat + self._server.dbs[db_num][newkey.key] = key + newkey.db = self._server.dbs[db_num] + return 1 diff --git a/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/geo_mixin.py b/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/geo_mixin.py new file mode 100644 index 0000000000000000000000000000000000000000..8dc4a353a21570092c411fb9d04bca69b42099d7 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/geo_mixin.py @@ -0,0 +1,243 @@ +import sys +from collections import namedtuple +from typing import List, Any, Optional, Union + +from fakeredis import _msgs as msgs +from fakeredis._command_args_parsing import extract_args +from fakeredis._commands import command, Key, Float, CommandItem +from fakeredis._helpers import SimpleError, Database +from fakeredis.geo import distance, geo_encode, geo_decode +from fakeredis.model import ZSet + +UNIT_TO_M = {"km": 0.001, "mi": 0.000621371, "ft": 3.28084, "m": 1} + + +def translate_meters_to_unit(unit_arg: bytes) -> float: + """number of meters in a unit. + :param unit_arg: unit name (km, mi, ft, m) + :returns: number of meters in unit + """ + unit = UNIT_TO_M.get(unit_arg.decode().lower()) + if unit is None: + raise SimpleError(msgs.GEO_UNSUPPORTED_UNIT) + return unit + + +GeoResult = namedtuple("GeoResult", "name long lat hash distance") + + +def _parse_results(items: List[GeoResult], withcoord: bool, withdist: bool) -> List[Any]: + """Parse list of GeoResults to redis response + :param withcoord: include coordinates in response + :param withdist: include distance in response + :returns: Parsed list + """ + res = [] + for item in items: + new_item = [item.name] + if withdist: + new_item.append(Float.encode(item.distance, False)) + if withcoord: + new_item.append([Float.encode(item.long, False), Float.encode(item.lat, False)]) + if len(new_item) == 1: + new_item = new_item[0] + res.append(new_item) + return res + + +def _find_near( + zset: ZSet, + lat: float, + long: float, + radius: float, + conv: float, + count: int, + count_any: bool, + desc: bool, +) -> List[GeoResult]: + """Find items within area (lat,long)+radius + :param zset: list of items to check + :param lat: latitude + :param long: longitude + :param radius: radius in whatever units + :param conv: conversion of radius to meters + :param count: number of results to give + :param count_any: should we return any results that match? (vs. sorted) + :param desc: should results be sorted descending order? + :returns: List of GeoResults + """ + results = [] + for name, _hash in zset.items(): + p_lat, p_long, _, _ = geo_decode(_hash) + dist = distance((p_lat, p_long), (lat, long)) * conv + if dist < radius: + results.append(GeoResult(name, p_long, p_lat, _hash, dist)) + if count_any and len(results) >= count: + break + results = sorted(results, key=lambda x: x.distance, reverse=desc) + if count: + results = results[:count] + return results + + +class GeoCommandsMixin: + def __init__(self, *args: Any, **kwargs: Any) -> None: + super(GeoCommandsMixin, self).__init__(*args, **kwargs) + self._db: Database + + def _store_geo_results(self, item_name: bytes, geo_results: List[GeoResult], scoredist: bool) -> int: + db_item = CommandItem(item_name, self._db, item=self._db.get(item_name), default=ZSet()) + db_item.value = ZSet() + for item in geo_results: + val = item.distance if scoredist else item.hash + db_item.value.add(item.name, val) + db_item.writeback() + return len(geo_results) + + def _georadius( + self, key: CommandItem, long: float, lat: float, radius: float, *args: bytes + ) -> Union[List[bytes], int]: + (withcoord, withdist, withhash, count, count_any, desc, store, storedist), left_args = extract_args( + args, + ("withcoord", "withdist", "withhash", "+count", "any", "desc", "*store", "*storedist"), + error_on_unexpected=False, + left_from_first_unexpected=False, + ) + count = count or sys.maxsize + conv = translate_meters_to_unit(args[0]) if len(args) >= 1 else 1 + geo_results: List[GeoResult] = _find_near(key.value, lat, long, radius, conv, count, count_any, desc) + + if store: + self._store_geo_results(store, geo_results, scoredist=False) + return len(geo_results) + if storedist: + self._store_geo_results(storedist, geo_results, scoredist=True) + return len(geo_results) + return _parse_results(geo_results, withcoord, withdist) + + @command(name="GEOADD", fixed=(Key(ZSet),), repeat=(bytes,)) + def geoadd(self, key: CommandItem, *args: bytes) -> int: + (xx, nx, ch), data = extract_args( + args, + ("nx", "xx", "ch"), + error_on_unexpected=False, + left_from_first_unexpected=True, + ) + if xx and nx: + raise SimpleError(msgs.NX_XX_GT_LT_ERROR_MSG) + if len(data) == 0 or len(data) % 3 != 0: + raise SimpleError(msgs.SYNTAX_ERROR_MSG) + zset = key.value + old_len, changed_items = len(zset), 0 + for i in range(0, len(data), 3): + long, lat, name = ( + Float.decode(data[i + 0]), + Float.decode(data[i + 1]), + data[i + 2], + ) + if (name in zset and not xx) or (name not in zset and not nx): + if zset.add(name, geo_encode(lat, long, 10)): + changed_items += 1 + if changed_items: + key.updated() + if ch: + return changed_items + return len(zset) - old_len + + @command(name="GEOHASH", fixed=(Key(ZSet), bytes), repeat=(bytes,)) + def geohash(self, key: CommandItem, *members: bytes) -> List[Union[bytes, None]]: + hashes = map(key.value.get, members) + geohash_list: List[Union[bytes, None]] = [((x + "0").encode() if x is not None else x) for x in hashes] + return geohash_list + + @command(name="GEOPOS", fixed=(Key(ZSet), bytes), repeat=(bytes,)) + def geopos(self, key: CommandItem, *members: bytes) -> List[Optional[List[float]]]: + gospositions = (geo_decode(x) if x is not None else x for x in map(key.value.get, members)) + res = [([x[1], x[0]] if x is not None else None) for x in gospositions] + return res + + @command(name="GEODIST", fixed=(Key(ZSet), bytes, bytes), repeat=(bytes,)) + def geodist(self, key: CommandItem, m1: bytes, m2: bytes, *args: bytes) -> Optional[float]: + geohashes = [key.value.get(m1), key.value.get(m2)] + if any(elem is None for elem in geohashes): + return None + geo_locs = [geo_decode(x) for x in geohashes] + res = distance((geo_locs[0][0], geo_locs[0][1]), (geo_locs[1][0], geo_locs[1][1])) + unit = translate_meters_to_unit(args[0]) if len(args) == 1 else 1 + return res * unit + + @command(name="GEORADIUS_RO", fixed=(Key(ZSet), Float, Float, Float), repeat=(bytes,)) + def georadius_ro(self, key: CommandItem, long: float, lat: float, radius: float, *args: bytes) -> List[Any]: + (withcoord, withdist, withhash, count, count_any, desc), left_args = extract_args( + args, + ("withcoord", "withdist", "withhash", "+count", "any", "desc"), + error_on_unexpected=False, + left_from_first_unexpected=False, + ) + count = count or sys.maxsize + conv: float = translate_meters_to_unit(args[0]) if len(args) >= 1 else 1.0 + geo_results = _find_near(key.value, lat, long, radius, conv, count, count_any, desc) + + ret = _parse_results(geo_results, withcoord, withdist) + return ret + + @command(name="GEORADIUS", fixed=(Key(ZSet), Float, Float, Float), repeat=(bytes,)) + def georadius( + self, key: CommandItem, long: float, lat: float, radius: float, *args: bytes + ) -> Union[List[Any], int]: + return self._georadius(key, long, lat, radius, *args) + + @command(name="GEORADIUSBYMEMBER", fixed=(Key(ZSet), bytes, Float), repeat=(bytes,)) + def georadiusbymember(self, key: CommandItem, member_name: bytes, radius: float, *args: bytes) -> List[Any]: + member_score = key.value.get(member_name) + lat, long, _, _ = geo_decode(member_score) + return self._georadius(key, long, lat, radius, *args) + + @command(name="GEORADIUSBYMEMBER_RO", fixed=(Key(ZSet), bytes, Float), repeat=(bytes,)) + def georadiusbymember_ro(self, key: CommandItem, member_name: bytes, radius: float, *args: float) -> List[Any]: + member_score = key.value.get(member_name) + lat, long, _, _ = geo_decode(member_score) + return self.georadius_ro(key, long, lat, radius, *args) + + @command(name="GEOSEARCH", fixed=(Key(ZSet),), repeat=(bytes,)) + def geosearch(self, key: CommandItem, *args: bytes) -> List[Any]: + (frommember, (long, lat), radius), left_args = extract_args( + args, + ("*frommember", "..fromlonlat", ".byradius"), + error_on_unexpected=False, + left_from_first_unexpected=False, + ) + if frommember is None and long is None: + raise SimpleError(msgs.SYNTAX_ERROR_MSG) + if frommember is not None and long is not None: + raise SimpleError(msgs.SYNTAX_ERROR_MSG) + if frommember: + return self.georadiusbymember_ro(key, frommember, radius, *left_args) + else: + return self.georadius_ro(key, long, lat, radius, *left_args) # type: ignore + + @command( + name="GEOSEARCHSTORE", + fixed=( + bytes, + Key(ZSet), + ), + repeat=(bytes,), + ) + def geosearchstore(self, dst: bytes, src: CommandItem, *args: bytes) -> List[Any]: + (frommember, (long, lat), radius, storedist), left_args = extract_args( + args, + ("*frommember", "..fromlonlat", ".byradius", "storedist"), + error_on_unexpected=False, + left_from_first_unexpected=False, + ) + if frommember is None and long is None: + raise SimpleError(msgs.SYNTAX_ERROR_MSG) + if frommember is not None and long is not None: + raise SimpleError(msgs.SYNTAX_ERROR_MSG) + additional = [b"storedist", dst] if storedist else [b"store", dst] + + if frommember: + return self.georadiusbymember(src, frommember, radius, *left_args, *additional) + else: + return self._georadius(src, long, lat, radius, *left_args, *additional) # type: ignore diff --git a/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/hash_mixin.py b/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/hash_mixin.py new file mode 100644 index 0000000000000000000000000000000000000000..9c1b37ef93dd9a02f8b988ce33947e6414f4aead --- /dev/null +++ b/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/hash_mixin.py @@ -0,0 +1,343 @@ +import random +from typing import Callable, List, Any, Optional, Sequence, Union, Mapping + +import math + +from fakeredis import _msgs as msgs +from fakeredis._command_args_parsing import extract_args +from fakeredis._commands import command, Key, Int, Float, CommandItem +from fakeredis._helpers import SimpleError, OK, casematch, SimpleString +from fakeredis._helpers import current_time +from fakeredis.model import Hash, ClientInfo + + +class HashCommandsMixin: + _encodeint: Callable[ + [ + int, + ], + bytes, + ] + _encodefloat: Callable[[float, bool], bytes] + _scan: Callable[[Sequence[bytes], int, bytes], List[Union[bytes, List[bytes]]]] + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super(HashCommandsMixin, self).__init__(*args, **kwargs) + self._client_info: ClientInfo + + def _hset(self, key: CommandItem, *args: bytes) -> int: + h = key.value + previous_keys_count = len(h.keys()) + h.update(dict(zip(*[iter(args)] * 2)), clear_expiration=True) # type: ignore # https://stackoverflow.com/a/12739974/1056460 + created = len(h.keys()) - previous_keys_count + + key.updated() + return created + + @command((Key(Hash), bytes), (bytes,)) + def hdel(self, key: CommandItem, *fields: bytes) -> int: + h = key.value + rem = 0 + for field in fields: + if field in h: + del h[field] + key.updated() + rem += 1 + return rem + + @command((Key(Hash), bytes)) + def hexists(self, key: CommandItem, field: bytes) -> int: + return int(field in key.value) + + @command((Key(Hash), bytes)) + def hget(self, key: CommandItem, field: bytes) -> Any: + return key.value.get(field) + + @command((Key(Hash),)) + def hgetall(self, key: CommandItem) -> Mapping[str, str]: + return key.value.getall() + + @command(fixed=(Key(Hash), bytes, bytes)) + def hincrby(self, key: CommandItem, field: bytes, amount_bytes: bytes) -> int: + amount = Int.decode(amount_bytes) + field_value = Int.decode(key.value.get(field, b"0"), decode_error=msgs.INVALID_HASH_MSG) + c = field_value + amount + key.value.update({field: self._encodeint(c)}, clear_expiration=False) + key.updated() + return c + + @command((Key(Hash), bytes, bytes)) + def hincrbyfloat(self, key: CommandItem, field: bytes, amount: bytes) -> bytes: + c = Float.decode(key.value.get(field, b"0")) + Float.decode(amount) + if not math.isfinite(c): + raise SimpleError(msgs.NONFINITE_MSG) + encoded = self._encodefloat(c, True) + key.value.update({field: encoded}, clear_expiration=False) + key.updated() + return encoded + + @command((Key(Hash),)) + def hkeys(self, key: CommandItem) -> List[bytes]: + return list(key.value.keys()) + + @command((Key(Hash),)) + def hlen(self, key: CommandItem) -> int: + return len(key.value) + + @command((Key(Hash), bytes), (bytes,)) + def hmget(self, key: CommandItem, *fields: bytes) -> List[bytes]: + return [key.value.get(field) for field in fields] + + @command((Key(Hash), bytes, bytes), (bytes, bytes)) + def hmset(self, key: CommandItem, *args: bytes) -> SimpleString: + self.hset(key, *args) + return OK + + @command((Key(Hash), Int), (bytes,)) + def hscan(self, key: CommandItem, cursor: int, *args: bytes) -> List[Any]: + no_values = any(casematch(arg, b"novalues") for arg in args) + if no_values: + args = [arg for arg in args if not casematch(arg, b"novalues")] + cursor, keys = self._scan(key.value, cursor, *args) + keys = [k.encode("utf-8") for k in keys if isinstance(k, str)] + if no_values: + return [cursor, keys] + items = [] + for k in keys: + items.append(k) + items.append(key.value[k]) + return [cursor, items] + + @command((Key(Hash), bytes, bytes), (bytes, bytes)) + def hset(self, key: CommandItem, *args: bytes) -> int: + return self._hset(key, *args) + + @command((Key(Hash), bytes, bytes)) + def hsetnx(self, key: CommandItem, field: bytes, value: bytes) -> int: + if field in key.value: + return 0 + return self._hset(key, field, value) + + @command((Key(Hash), bytes)) + def hstrlen(self, key: CommandItem, field: bytes) -> int: + return len(key.value.get(field, b"")) + + @command((Key(Hash),)) + def hvals(self, key: CommandItem) -> List[bytes]: + return list(key.value.values()) + + @command(name="HRANDFIELD", fixed=(Key(Hash),), repeat=(bytes,)) + def hrandfield(self, key: CommandItem, *args: bytes) -> Union[List[List[str]], List[str], None]: + if len(args) > 2: + raise SimpleError(msgs.SYNTAX_ERROR_MSG) + if key.value is None or len(key.value) == 0: + return None + count = min(Int.decode(args[0]) if len(args) >= 1 else 1, len(key.value)) + withvalues = casematch(args[1], b"withvalues") if len(args) >= 2 else False + if count == 0: + return {} + + if count < 0: # Allow repetitions + res = random.choices(sorted(key.value.items()), k=-count) + else: # Unique values from hash + res = random.sample(sorted(key.value.items()), count) + + if withvalues: + if self._client_info.protocol_version == 2: + res = [item for t in res for item in t] + else: + res = [list(t) for t in res] + else: + res = [t[0] for t in res] + return res + + def _hexpire(self, key: CommandItem, when_ms: int, *args: bytes) -> List[int]: + # Deal with input arguments + (nx, xx, gt, lt), left_args = extract_args( + args, ("nx", "xx", "gt", "lt"), left_from_first_unexpected=True, error_on_unexpected=False + ) + if (nx, xx, gt, lt).count(True) > 1: + raise SimpleError(msgs.NX_XX_GT_LT_ERROR_MSG) + fields = _get_fields(left_args) + hash_val: Hash = key.value + if hash_val is None: + return [-2] * len(fields) + # process command + res = [] + for field in fields: + if field not in hash_val: + res.append(-2) + continue + current_expiration = hash_val.get_key_expireat(field) + if ( + (nx and current_expiration is not None) + or (xx and current_expiration is None) + or (gt and (current_expiration is None or when_ms <= current_expiration)) + or (lt and current_expiration is not None and when_ms >= current_expiration) + ): + res.append(0) + continue + res.append(hash_val.set_key_expireat(field, when_ms)) + return res + + def _get_expireat(self, command: bytes, key: CommandItem, *args: bytes) -> List[int]: + fields = _get_fields(args) + hash_val: Hash = key.value + if hash_val is None: + return [-2] * len(fields) + res = [] + for field in fields: + if field not in hash_val: + res.append(-2) + continue + when_ms = hash_val.get_key_expireat(field) + if when_ms is None: + res.append(-1) + else: + res.append(when_ms) + return res + + @command(name="HEXPIRE", fixed=(Key(Hash), Int), repeat=(bytes,)) + def hexpire(self, key: CommandItem, seconds: int, *args: bytes) -> List[int]: + when_ms = current_time() + seconds * 1000 + return self._hexpire(key, when_ms, *args) + + @command(name="HPEXPIRE", fixed=(Key(Hash), Int), repeat=(bytes,)) + def hpexpire(self, key: CommandItem, milliseconds: int, *args: bytes) -> List[int]: + when_ms = current_time() + milliseconds + return self._hexpire(key, when_ms, *args) + + @command(name="HEXPIREAT", fixed=(Key(Hash), Int), repeat=(bytes,)) + def hexpireat(self, key: CommandItem, unix_time_seconds: int, *args: bytes) -> List[int]: + when_ms = unix_time_seconds * 1000 + return self._hexpire(key, when_ms, *args) + + @command(name="HPEXPIREAT", fixed=(Key(Hash), Int), repeat=(bytes,)) + def hpexpireat(self, key: CommandItem, unix_time_ms: int, *args: bytes) -> List[int]: + return self._hexpire(key, unix_time_ms, *args) + + @command(name="HPERSIST", fixed=(Key(Hash),), repeat=(bytes,)) + def hpersist(self, key: CommandItem, *args: bytes) -> List[int]: + fields = _get_fields(args) + hash_val: Hash = key.value + res = [] + for field in fields: + if field not in hash_val: + res.append(-2) + continue + if hash_val.clear_key_expireat(field): + res.append(1) + else: + res.append(-1) + return res + + @command( + name="HEXPIRETIME", fixed=(Key(Hash),), repeat=(bytes,), flags=msgs.FLAG_DO_NOT_CREATE, server_types=("redis",) + ) + def hexpiretime(self, key: CommandItem, *args: bytes) -> List[int]: + res = self._get_expireat(b"HEXPIRETIME", key, *args) + return [(i // 1000 if i > 0 else i) for i in res] + + @command(name="HPEXPIRETIME", fixed=(Key(Hash),), repeat=(bytes,), server_types=("redis",)) + def hpexpiretime(self, key: CommandItem, *args: bytes) -> List[float]: + res = self._get_expireat(b"HPEXPIRETIME", key, *args) + return res + + @command(name="HTTL", fixed=(Key(Hash),), repeat=(bytes,), server_types=("redis",)) + def httl(self, key: CommandItem, *args: bytes) -> List[int]: + curr_expireat_ms = self._get_expireat(b"HTTL", key, *args) + curr_time_ms = current_time() + return [((i - curr_time_ms) // 1000) if i > 0 else i for i in curr_expireat_ms] + + @command(name="HPTTL", fixed=(Key(Hash),), repeat=(bytes,), server_types=("redis",)) + def hpttl(self, key: CommandItem, *args: bytes) -> List[int]: + curr_expireat_ms = self._get_expireat(b"HPTTL", key, *args) + curr_time_ms = current_time() + return [(i - curr_time_ms) if i > 0 else i for i in curr_expireat_ms] + + @command(name="HGETDEL", fixed=(Key(Hash),), repeat=(bytes,), server_types=("redis",)) + def hgetdel(self, key: CommandItem, *args: bytes) -> List[Any]: + fields = _get_fields(args) + hash_val: Hash = key.value + res = [hash_val.pop(field) for field in fields] + return res + + @command(name="HGETEX", fixed=(Key(Hash),), repeat=(bytes,), server_types=("redis",)) + def hgetex(self, key: CommandItem, *args: bytes) -> Any: + (ex, px, exat, pxat, persist), left_args = extract_args( + args, + ("+ex", "+px", "+exat", "+pxat", "persist"), + left_from_first_unexpected=True, + error_on_unexpected=False, + ) + if (ex is not None, px is not None, exat is not None, pxat is not None, persist).count(True) > 1: + raise SimpleError("Only one of EX, PX, EXAT, PXAT or PERSIST arguments can be specified") + fields = _get_fields(left_args) + hash_val: Hash = key.value + + when_ms = _get_when_ms(ex, px, exat, pxat) + res = [] + for field in fields: + res.append(hash_val.get(field)) + if persist: + hash_val.clear_key_expireat(field) + elif when_ms is not None: + hash_val.set_key_expireat(field, when_ms) + return res + + @command(name="HSETEX", fixed=(Key(Hash),), repeat=(bytes,), server_types=("redis",)) + def hsetex(self, key: CommandItem, *args: bytes) -> Any: + (ex, px, exat, pxat, keepttl, fnx, fxx), left_args = extract_args( + args, + ("+ex", "+px", "+exat", "+pxat", "keepttl", "fnx", "fxx"), + left_from_first_unexpected=True, + error_on_unexpected=False, + ) + if (ex is not None, px is not None, exat is not None, pxat is not None, keepttl).count(True) > 1: + raise SimpleError("Only one of EX, PX, EXAT, PXAT or KEEPTTL arguments can be specified") + if (fnx, fxx).count(True) > 1: + raise SimpleError("Only one of FNX or FXX arguments can be specified") + field_vals = _get_fields(left_args, with_values=True) + hash_val: Hash = key.value + when_ms = _get_when_ms(ex, px, exat, pxat) + + field_keys = set(field_vals[::2]) + if fxx and len(field_keys - hash_val.getall().keys()) > 0: + return 0 + if fnx and len(field_keys - hash_val.getall().keys()) < len(field_keys): + return 0 + res = 0 + for i in range(0, len(field_vals), 2): + field, value = field_vals[i], field_vals[i + 1] + hash_val[field] = value + res = 1 + if not keepttl and when_ms is not None: + hash_val.set_key_expireat(field, when_ms) + key.updated() + return res + + +def _get_fields(args: Sequence[bytes], with_values: bool = False) -> Sequence[bytes]: + if len(args) < 3 or not casematch(args[0], b"fields"): + raise SimpleError(msgs.WRONG_ARGS_MSG6.format(command)) + num_fields = Int.decode(args[1]) + if not with_values and num_fields != len(args) - 2: + raise SimpleError(msgs.HEXPIRE_NUMFIELDS_DIFFERENT) + if with_values and num_fields * 2 != len(args) - 2: + raise SimpleError(msgs.HEXPIRE_NUMFIELDS_DIFFERENT) + fields = args[2:] + return fields + + +def _get_when_ms(ex: Optional[int], px: Optional[int], exat: Optional[int], pxat: Optional[int]) -> Optional[int]: + if ex is not None: + when_ms = current_time() + ex * 1000 + elif px is not None: + when_ms = current_time() + px + elif exat is not None: + when_ms = exat * 1000 + elif pxat is not None: + when_ms = pxat + else: + when_ms = None + return when_ms diff --git a/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/list_mixin.py b/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/list_mixin.py new file mode 100644 index 0000000000000000000000000000000000000000..19964658e166d641abba93e464599be7618c8679 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/list_mixin.py @@ -0,0 +1,315 @@ +import functools +from typing import Callable, List, Optional, Union, Any + +from fakeredis import _msgs as msgs +from fakeredis._command_args_parsing import extract_args +from fakeredis._commands import Key, command, Int, CommandItem, Timeout, fix_range +from fakeredis._helpers import OK, SimpleError, SimpleString, casematch, Database + + +def _list_pop_count(get_slice, key, count): + if not key: + return None + elif type(key.value) is not list: + raise SimpleError(msgs.WRONGTYPE_MSG) + slc = get_slice(count) + ret = key.value[slc] + del key.value[slc] + key.updated() + return ret + + +def _list_pop(get_slice, key, *args): + """Implements lpop and rpop. + + `get_slice` must take a count and return a slice expression for the range to pop. + """ + # This implementation is somewhat contorted to match the odd + # behaviours described in https://github.com/redis/redis/issues/9680. + count = 1 + if len(args) > 1: + raise SimpleError(msgs.SYNTAX_ERROR_MSG) + elif len(args) == 1: + count = Int.decode(args[0], msgs.INDEX_NEGATIVE_ERROR_MSG) + if count < 0: + raise SimpleError(msgs.INDEX_NEGATIVE_ERROR_MSG) + ret = _list_pop_count(get_slice, key, count) + if ret and not args: + ret = ret[0] + return ret + + +class ListCommandsMixin: + _blocking: Callable[[Optional[Union[float, int]], Callable[[bool], Any]], Any] + + def __init__(self, *args, **kwargs): + super(ListCommandsMixin, self).__init__(*args, **kwargs) + self._db: Database + + def _bpop_pass(self, keys, op, first_pass): + for key in keys: + item = CommandItem(key, self._db, item=self._db.get(key), default=[]) + if not isinstance(item.value, list): + if first_pass: + raise SimpleError(msgs.WRONGTYPE_MSG) + else: + continue + if item.value: + ret = op(item.value) + item.updated() + item.writeback() + return [key, ret] + return None + + def _bpop(self, args, op): + keys = args[:-1] + timeout = Timeout.decode(args[-1]) + return self._blocking(timeout, functools.partial(self._bpop_pass, keys, op)) + + @command((bytes, bytes), (bytes,), flags=msgs.FLAG_NO_SCRIPT) + def blpop(self, *args): + return self._bpop(args, lambda lst: lst.pop(0)) + + @command((bytes, bytes), (bytes,), flags=msgs.FLAG_NO_SCRIPT) + def brpop(self, *args): + return self._bpop(args, lambda lst: lst.pop()) + + def _brpoplpush_pass(self, source, destination, first_pass): + src = CommandItem(source, self._db, item=self._db.get(source), default=[]) + if not isinstance(src.value, list): + if first_pass: + raise SimpleError(msgs.WRONGTYPE_MSG) + else: + return None + if not src.value: + return None # Empty list + dst = CommandItem(destination, self._db, item=self._db.get(destination), default=[]) + if not isinstance(dst.value, list): + raise SimpleError(msgs.WRONGTYPE_MSG) + el = src.value.pop() + dst.value.insert(0, el) + src.updated() + src.writeback() + if destination != source: + # Ensure writeback only happens once + dst.updated() + dst.writeback() + return el + + @command(name="BRPOPLPUSH", fixed=(bytes, bytes, Timeout), flags=msgs.FLAG_NO_SCRIPT) + def brpoplpush(self, source, destination, timeout): + return self._blocking(timeout, functools.partial(self._brpoplpush_pass, source, destination)) + + @command((Key(list, None), Int)) + def lindex(self, key, index): + try: + return key.value[index] + except IndexError: + return None + + @command((Key(list), bytes, bytes, bytes)) + def linsert(self, key, where, pivot, value): + if not casematch(where, b"before") and not casematch(where, b"after"): + raise SimpleError(msgs.SYNTAX_ERROR_MSG) + if not key: + return 0 + else: + try: + index = key.value.index(pivot) + except ValueError: + return -1 + if casematch(where, b"after"): + index += 1 + key.value.insert(index, value) + key.updated() + return len(key.value) + + @command((Key(list),)) + def llen(self, key): + return len(key.value) + + def _lmove(self, first_list, second_list, src, dst, first_pass): + if (not casematch(src, b"left") and not casematch(src, b"right")) or ( + not casematch(dst, b"left") and not casematch(dst, b"right") + ): + raise SimpleError(msgs.SYNTAX_ERROR_MSG) + + el = self.rpop(first_list) if casematch(src, b"RIGHT") else self.lpop(first_list) + self.lpush(second_list, el) if casematch(dst, b"LEFT") else self.rpush(second_list, el) + return el + + @command((Key(list, None), Key(list), SimpleString, SimpleString)) + def lmove(self, first_list, second_list, src, dst): + return self._lmove(first_list, second_list, src, dst, False) + + @command((Key(list, None), Key(list), SimpleString, SimpleString, Timeout)) + def blmove(self, first_list, second_list, src, dst, timeout): + return self._blocking(timeout, functools.partial(self._lmove, first_list, second_list, src, dst)) + + @command(fixed=(Key(),), repeat=(bytes,)) + def lpop(self, key, *args): + return _list_pop(lambda count: slice(None, count), key, *args) + + def _lmpop(self, keys, count, direction_left, first_pass): + if direction_left: + op = lambda count: slice(None, count) # noqa:E731 + else: + op = lambda count: slice(None, -count - 1, -1) # noqa:E731 + + for key in keys: + item = CommandItem(key, self._db, item=self._db.get(key), default=[]) + res = _list_pop_count(op, item, count) + if res: + return [key, res] + return None + + @command(fixed=(Int,), repeat=(bytes,)) + def lmpop(self, numkeys, *args): + if numkeys <= 0: + raise SimpleError(msgs.NUMKEYS_GREATER_THAN_ZERO_MSG) + if casematch(args[-2], b"count"): + count = Int.decode(args[-1]) + args = args[:-2] + else: + count = 1 + if len(args) != numkeys + 1 or (not casematch(args[-1], b"left") and not casematch(args[-1], b"right")): + raise SimpleError(msgs.SYNTAX_ERROR_MSG) + + return self._lmpop(args[:-1], count, casematch(args[-1], b"left"), False) + + @command(fixed=(Timeout, Int), repeat=(bytes,)) + def blmpop(self, timeout, numkeys, *args): + if numkeys <= 0: + raise SimpleError(msgs.NUMKEYS_GREATER_THAN_ZERO_MSG) + if casematch(args[-2], b"count"): + count = Int.decode(args[-1]) + args = args[:-2] + else: + count = 1 + if len(args) != numkeys + 1 or (not casematch(args[-1], b"left") and not casematch(args[-1], b"right")): + raise SimpleError(msgs.SYNTAX_ERROR_MSG) + + return self._blocking( + timeout, + functools.partial(self._lmpop, args[:-1], count, casematch(args[-1], b"left")), + ) + + @command((Key(list), bytes), (bytes,)) + def lpush(self, key, *values): + for value in values: + key.value.insert(0, value) + key.updated() + return len(key.value) + + @command((Key(list), bytes), (bytes,)) + def lpushx(self, key, *values): + if not key: + return 0 + return self.lpush(key, *values) + + @command((Key(list), Int, Int)) + def lrange(self, key, start, stop): + start, stop = fix_range(start, stop, len(key.value)) + return key.value[start:stop] + + @command((Key(list), Int, bytes)) + def lrem(self, key, count, value): + a_list = key.value + found = [] + for i, el in enumerate(a_list): + if el == value: + found.append(i) + if count > 0: + indices_to_remove = found[:count] + elif count < 0: + indices_to_remove = found[count:] + else: + indices_to_remove = found + # Iterating in reverse order to ensure the indices + # remain valid during deletion. + for index in reversed(indices_to_remove): + del a_list[index] + if indices_to_remove: + key.updated() + return len(indices_to_remove) + + @command((Key(list), bytes, bytes)) + def lset(self, key, index, value): + if not key: + raise SimpleError(msgs.NO_KEY_MSG) + index = Int.decode(index) + try: + key.value[index] = value + key.updated() + except IndexError: + raise SimpleError(msgs.INDEX_ERROR_MSG) + return OK + + @command((Key(list), Int, Int)) + def ltrim(self, key, start, stop): + if key: + if stop == -1: + stop = None + else: + stop += 1 + new_value = key.value[start:stop] + # TODO: check if this should actually be conditional + if len(new_value) != len(key.value): + key.update(new_value) + return OK + + @command(fixed=(Key(),), repeat=(bytes,)) + def rpop(self, key, *args): + return _list_pop(lambda count: slice(None, -count - 1, -1), key, *args) + + @command((Key(list, None), Key(list))) + def rpoplpush(self, src, dst): + el = self.rpop(src) + self.lpush(dst, el) + return el + + @command((Key(list), bytes), (bytes,)) + def rpush(self, key, *values): + for value in values: + key.value.append(value) + key.updated() + return len(key.value) + + @command((Key(list), bytes), (bytes,)) + def rpushx(self, key, *values): + if not key: + return 0 + return self.rpush(key, *values) + + @command(fixed=(Key(list), bytes), repeat=(bytes,)) + def lpos(self, key, elem, *args): + (rank, count, maxlen), _ = extract_args( + args, + ( + "+rank", + "+count", + "+maxlen", + ), + ) + if rank == 0: + raise SimpleError(msgs.LPOS_RANK_CAN_NOT_BE_ZERO) + rank = rank or 1 + ind, direction = (0, 1) if rank > 0 else (len(key.value) - 1, -1) + rank = abs(rank) + parse_count = len(key.value) if count == 0 else (count or 1) + maxlen = maxlen or len(key.value) + res: List[int] = [] + comparisons = 0 + while 0 <= ind <= len(key.value) - 1 and len(res) < parse_count and comparisons < maxlen: + comparisons += 1 + if key.value[ind] == elem: + if rank > 1: + rank -= 1 + else: + res.append(ind) + ind += direction + if len(res) == 0 and count is None: + return None + if len(res) == 1 and count is None: + return res[0] + return res diff --git a/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/pubsub_mixin.py b/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/pubsub_mixin.py new file mode 100644 index 0000000000000000000000000000000000000000..58aad7603e89a293ca8c4d3a27d9a9a44cf964a2 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/pubsub_mixin.py @@ -0,0 +1,170 @@ +from typing import Any, Dict, Callable, List, Iterable + +from fakeredis import _msgs as msgs +from fakeredis._commands import command +from fakeredis._helpers import NoResponse, compile_pattern, SimpleError +from fakeredis._typing import VersionType + + +class PubSubCommandsMixin: + put_response: Callable[[Any], None] + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super(PubSubCommandsMixin, self).__init__(*args, **kwargs) + self._pubsub = 0 # Count of subscriptions + self._server: Any + self.version: VersionType + + def _subscribe(self, channels: Iterable[bytes], subscribers: Dict[bytes, Any], mtype: bytes) -> NoResponse: + for channel in channels: + subs = subscribers[channel] + if self not in subs: + subs.add(self) + self._pubsub += 1 + msg = [mtype, channel, self._pubsub] + self.put_response(msg) + return NoResponse() + + def _unsubscribe(self, channels: Iterable[bytes], subscribers: Dict[bytes, Any], mtype: bytes) -> NoResponse: + if not channels: + channels = [] + for channel, subs in subscribers.items(): + if self in subs: + channels.append(channel) + for channel in channels: + subs = subscribers.get(channel, set()) + if self in subs: + subs.remove(self) + if not subs: + del subscribers[channel] + self._pubsub -= 1 + msg = [mtype, channel, self._pubsub] + self.put_response(msg) + return NoResponse() + + def _numsub(self, subscribers: Dict[bytes, Any], *channels: bytes) -> List[Any]: + tuples_list = [(ch, len(subscribers.get(ch, []))) for ch in channels] + return [item for sublist in tuples_list for item in sublist] + + @command((bytes,), (bytes,), flags=msgs.FLAG_NO_SCRIPT) + def psubscribe(self, *patterns: bytes) -> NoResponse: + return self._subscribe(patterns, self._server.psubscribers, b"psubscribe") + + @command((bytes,), (bytes,), flags=msgs.FLAG_NO_SCRIPT) + def subscribe(self, *channels: bytes) -> NoResponse: + return self._subscribe(channels, self._server.subscribers, b"subscribe") + + @command((bytes,), (bytes,), flags=msgs.FLAG_NO_SCRIPT) + def ssubscribe(self, *channels: bytes) -> NoResponse: + return self._subscribe(channels, self._server.ssubscribers, b"ssubscribe") + + @command((), (bytes,), flags=msgs.FLAG_NO_SCRIPT) + def punsubscribe(self, *patterns: bytes) -> NoResponse: + return self._unsubscribe(patterns, self._server.psubscribers, b"punsubscribe") + + @command((), (bytes,), flags=msgs.FLAG_NO_SCRIPT) + def unsubscribe(self, *channels: bytes) -> NoResponse: + return self._unsubscribe(channels, self._server.subscribers, b"unsubscribe") + + @command(fixed=(), repeat=(bytes,), flags=msgs.FLAG_NO_SCRIPT) + def sunsubscribe(self, *channels: bytes) -> NoResponse: + return self._unsubscribe(channels, self._server.ssubscribers, b"sunsubscribe") + + @command((bytes, bytes)) + def publish(self, channel: bytes, message: bytes) -> int: + receivers = 0 + msg = [b"message", channel, message] + subs = self._server.subscribers.get(channel, set()) + for sock in subs: + sock.put_response(msg) + receivers += 1 + for pattern, socks in self._server.psubscribers.items(): + regex = compile_pattern(pattern) + if regex.match(channel): + msg = [b"pmessage", pattern, channel, message] + for sock in socks: + sock.put_response(msg) + receivers += 1 + return receivers + + @command((bytes, bytes)) + def spublish(self, channel: bytes, message: bytes) -> int: + receivers = 0 + msg = [b"smessage", channel, message] + subs = self._server.ssubscribers.get(channel, set()) + for sock in subs: + sock.put_response(msg) + receivers += 1 + for pattern, socks in self._server.psubscribers.items(): + regex = compile_pattern(pattern) + if regex.match(channel): + msg = [b"pmessage", pattern, channel, message] + for sock in socks: + sock.put_response(msg) + receivers += 1 + return receivers + + @command(name="PUBSUB NUMPAT", fixed=(), repeat=()) + def pubsub_numpat(self, *_: Any) -> int: + return len(self._server.psubscribers) + + def _channels(self, subscribers_dict: Dict[bytes, Any], *patterns: bytes) -> List[bytes]: + channels = list(subscribers_dict.keys()) + if len(patterns) > 0: + regex = compile_pattern(patterns[0]) + channels = [ch for ch in channels if regex.match(ch)] + return channels + + @command(name="PUBSUB CHANNELS", fixed=(), repeat=(bytes,)) + def pubsub_channels(self, *args: bytes) -> List[bytes]: + return self._channels(self._server.subscribers, *args) + + @command(name="PUBSUB SHARDCHANNELS", fixed=(), repeat=(bytes,)) + def pubsub_shardchannels(self, *args: bytes) -> List[bytes]: + return self._channels(self._server.ssubscribers, *args) + + @command(name="PUBSUB NUMSUB", fixed=(), repeat=(bytes,)) + def pubsub_numsub(self, *args: bytes) -> List[Any]: + return self._numsub(self._server.subscribers, *args) + + @command(name="PUBSUB SHARDNUMSUB", fixed=(), repeat=(bytes,)) + def pubsub_shardnumsub(self, *args: bytes) -> List[Any]: + return self._numsub(self._server.ssubscribers, *args) + + @command(name="PUBSUB", fixed=()) + def pubsub(self, *args: Any) -> None: + raise SimpleError(msgs.WRONG_ARGS_MSG6.format("pubsub")) + + @command(name="PUBSUB HELP", fixed=()) + def pubsub_help(self, *args: Any) -> List[bytes]: + if self.version >= (7,): + help_strings = [ + "PUBSUB [ [value] [opt] ...]. Subcommands are:", + "CHANNELS []", + " Return the currently active channels matching a (default: '*').", + "NUMPAT", + " Return number of subscriptions to patterns.", + "NUMSUB [ ...]", + " Return the number of subscribers for the specified channels, excluding", + " pattern subscriptions(default: no channels).", + "SHARDCHANNELS []", + " Return the currently active shard level channels matching a (default: '*').", + "SHARDNUMSUB [ ...]", + " Return the number of subscribers for the specified shard level channel(s)", + "HELP", + (" Prints this help." if self.version < (7, 1) else " Print this help."), + ] + else: + help_strings = [ + "PUBSUB [ [value] [opt] ...]. Subcommands are:", + "CHANNELS []", + " Return the currently active channels matching a (default: '*').", + "NUMPAT", + " Return number of subscriptions to patterns.", + "NUMSUB [ ...]", + " Return the number of subscribers for the specified channels, excluding", + " pattern subscriptions(default: no channels).", + "HELP", + " Prints this help.", + ] + return [s.encode() for s in help_strings] diff --git a/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/scripting_mixin.py b/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/scripting_mixin.py new file mode 100644 index 0000000000000000000000000000000000000000..d29ecdae638d84fec2e815417d00a4216effa677 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/fakeredis/commands_mixins/scripting_mixin.py @@ -0,0 +1,353 @@ +import functools +import hashlib +import importlib +import itertools +import json +import logging +import os +from typing import Callable, AnyStr, Set, Any, Tuple, List, Optional + +import lupa + +from fakeredis import _msgs as msgs +from fakeredis._commands import command, Int, Signature, Float +from fakeredis._helpers import ( + SimpleError, + SimpleString, + null_terminate, + OK, + decode_command_bytes, +) +from fakeredis._typing import VersionType + +__LUA_RUNTIMES_MAP = { + "5.1": "lupa.lua51", + "5.2": "lupa.lua52", + "5.3": "lupa.lua53", + "5.4": "lupa.lua54", +} +LUA_VERSION = os.getenv("FAKEREDIS_LUA_VERSION", "5.1") + +with lupa.allow_lua_module_loading(): + LUA_MODULE = importlib.import_module(__LUA_RUNTIMES_MAP[LUA_VERSION]) + +LOGGER = logging.getLogger("fakeredis") +REDIS_LOG_LEVELS = { + b"LOG_DEBUG": 0, + b"LOG_VERBOSE": 1, + b"LOG_NOTICE": 2, + b"LOG_WARNING": 3, +} +REDIS_LOG_LEVELS_TO_LOGGING = { + 0: logging.DEBUG, + 1: logging.INFO, + 2: logging.INFO, + 3: logging.WARNING, +} + + +def _ensure_str(s: AnyStr, encoding: str, replaceerr: str) -> str: + if isinstance(s, bytes): + res = s.decode(encoding=encoding, errors=replaceerr) + else: + res = str(s) + return res + + +def _check_for_lua_globals(lua_runtime: LUA_MODULE.LuaRuntime, expected_globals: Set[Any]) -> None: + unexpected_globals = set(lua_runtime.globals().keys()) - expected_globals + if len(unexpected_globals) > 0: + unexpected = [_ensure_str(var, "utf-8", "replace") for var in unexpected_globals] + raise SimpleError(msgs.GLOBAL_VARIABLE_MSG.format(", ".join(unexpected))) + + +def _lua_redis_log(lua_runtime: LUA_MODULE.LuaRuntime, expected_globals: Set[Any], lvl: int, *args: Any) -> None: + _check_for_lua_globals(lua_runtime, expected_globals) + if len(args) < 1: + raise SimpleError(msgs.REQUIRES_MORE_ARGS_MSG.format("redis.log()", "two")) + if lvl not in REDIS_LOG_LEVELS_TO_LOGGING.keys(): + raise SimpleError(msgs.LOG_INVALID_DEBUG_LEVEL_MSG) + msg = " ".join([x.decode("utf-8") if isinstance(x, bytes) else str(x) for x in args if not isinstance(x, bool)]) + LOGGER.log(REDIS_LOG_LEVELS_TO_LOGGING[lvl], msg) + + +_lua_cjson_null = object() # sentinel value + + +def _cjson_python_to_lua(obj: Any) -> Any: + """Convert a pure python object obtained after JSON deserialization into a usable object in the lua runtime.""" + if obj is None: + return _lua_cjson_null + if isinstance(obj, str): + return obj.encode() + if isinstance(obj, list): + return [_cjson_python_to_lua(item) for item in obj] + if isinstance(obj, dict): + return {_cjson_python_to_lua(key): _cjson_python_to_lua(value) for key, value in obj.items()} + return obj + + +def _cjson_lua_to_python(obj: Any) -> Any: + """Convert a passed lua runtime object obtained before JSON serialization into a pure python object.""" + if obj is _lua_cjson_null: + return None + if isinstance(obj, bytes): + return obj.decode() + + lua_type = LUA_MODULE.lua_type(obj) + if lua_type != "table": + return obj + + # Check for array-like structure: integer keys from 1 to len(items) + # (this check matches what cjson does, e.g. tables like {"a", "b", c=3} are treated as dicts + # with int keys for the array-like parts) + keys = list(obj.keys()) + is_array = all(isinstance(k, int) for k in keys) and sorted(keys) == list(range(1, len(keys) + 1)) + + if is_array: + return [_cjson_lua_to_python(item) for item in obj.values()] + + # We're working with a dict + d = dict(obj) + return {_cjson_lua_to_python(key): _cjson_lua_to_python(value) for key, value in d.items()} + + +def _lua_cjson_encode(lua_runtime: LUA_MODULE.LuaRuntime, expected_globals: Set[Any], value: Any) -> bytes: + _check_for_lua_globals(lua_runtime, expected_globals) + value = _cjson_lua_to_python(value) + return json.dumps(value, separators=(",", ":")).encode() + + +def _lua_cjson_decode(lua_runtime: LUA_MODULE.LuaRuntime, expected_globals: Set[Any], json_str: str) -> Any: + _check_for_lua_globals(lua_runtime, expected_globals) + json_obj = json.loads(json_str) + json_obj = _cjson_python_to_lua(json_obj) + if isinstance(json_obj, (dict, list)): + json_obj = lua_runtime.table_from(json_obj, recursive=True) + return json_obj + + +class ScriptingCommandsMixin: + _name_to_func: Callable[[str], Tuple[Optional[Callable[..., Any]], Signature]] + _run_command: Callable[[Callable[..., Any], Signature, List[Any], bool], Any] + + def __init__(self, *args: Any, **kwargs: Any): + self.version: VersionType + self.load_lua_modules = set() + lua_modules_set: Set[str] = kwargs.pop("lua_modules", None) or set() + if len(lua_modules_set) > 0: + lua_runtime: LUA_MODULE.LuaRuntime = LUA_MODULE.LuaRuntime(encoding=None, unpack_returned_tuples=True) + for module in lua_modules_set: + try: + lua_runtime.require(module.encode()) + self.load_lua_modules.add(module) + except LUA_MODULE.LuaError as ex: + LOGGER.error(f'Failed to load LUA module "{module}", make sure it is installed: {ex}') + + super(ScriptingCommandsMixin, self).__init__(*args, **kwargs) + + def _convert_redis_arg(self, lua_runtime: LUA_MODULE.LuaRuntime, value: Any) -> bytes: + # Type checks are exact to avoid issues like bool being a subclass of int. + if type(value) is bytes: + return value + elif type(value) in {int, float}: + return "{:.17g}".format(value).encode() + else: + raise SimpleError(msgs.LUA_COMMAND_ARG_MSG) + + def _convert_redis_result(self, lua_runtime: LUA_MODULE.LuaRuntime, result: Any) -> Any: + if isinstance(result, (bytes, int)): + return result + if isinstance(result, float): + return Float.encode(result, humanfriendly=False) + elif isinstance(result, SimpleString): + return lua_runtime.table_from({b"ok": result.value}) + elif result is None: + return False + elif isinstance(result, list): + converted = [self._convert_redis_result(lua_runtime, item) for item in result] + return lua_runtime.table_from(converted) + if isinstance(result, dict): + result = list(itertools.chain(*result.items())) + converted = [self._convert_redis_result(lua_runtime, item) for item in result] + return lua_runtime.table_from(converted) + elif isinstance(result, SimpleError): + if result.value.startswith("ERR wrong number of arguments"): + raise SimpleError(msgs.WRONG_ARGS_MSG7) + raise result + else: + raise RuntimeError("Unexpected return type from redis: {}".format(type(result))) + + def _convert_lua_result(self, result: Any, nested: bool = True) -> Any: + if LUA_MODULE.lua_type(result) == "table": + for key in (b"ok", b"err"): + if key in result: + msg = self._convert_lua_result(result[key]) + if not isinstance(msg, bytes): + raise SimpleError(msgs.LUA_WRONG_NUMBER_ARGS_MSG) + if key == b"ok": + return SimpleString(msg) + elif nested: + return SimpleError(msg.decode("utf-8", "replace")) + else: + raise SimpleError(msg.decode("utf-8", "replace")) + # Convert Lua tables into lists, starting from index 1, mimicking the behavior of StrictRedis. + result_list = [] + for index in itertools.count(1): + if index not in result: + break + item = result[index] + result_list.append(self._convert_lua_result(item)) + return result_list + elif isinstance(result, str): + return result.encode() + elif isinstance(result, float): + return int(result) + elif isinstance(result, bool): + return 1 if result else None + return result + + def _lua_redis_call( + self, lua_runtime: LUA_MODULE.LuaRuntime, expected_globals: Set[Any], op: bytes, *args: Any + ) -> Any: + # Check if we've set any global variables before making any change. + _check_for_lua_globals(lua_runtime, expected_globals) + func, sig = self._name_to_func(decode_command_bytes(op)) + new_args = [self._convert_redis_arg(lua_runtime, arg) for arg in args] + result = self._run_command(func, sig, new_args, True) + result = self._convert_redis_result(lua_runtime, result) + return result + + def _lua_redis_pcall( + self, lua_runtime: LUA_MODULE.LuaRuntime, expected_globals: Set[Any], op: bytes, *args: Any + ) -> Any: + try: + return self._lua_redis_call(lua_runtime, expected_globals, op, *args) + except Exception as ex: + return lua_runtime.table_from({b"err": str(ex)}) + + @command((bytes, Int), (bytes,), flags=msgs.FLAG_NO_SCRIPT) + def eval(self, script: bytes, numkeys: int, *keys_and_args: bytes) -> Any: + if numkeys > len(keys_and_args): + raise SimpleError(msgs.TOO_MANY_KEYS_MSG) + if numkeys < 0: + raise SimpleError(msgs.NEGATIVE_KEYS_MSG) + sha1 = hashlib.sha1(script).hexdigest().encode() + self._server.script_cache[sha1] = script + lua_runtime: LUA_MODULE.LuaRuntime = LUA_MODULE.LuaRuntime(encoding=None, unpack_returned_tuples=True) + modules_import_str = "\n".join([f"{module} = require('{module}')" for module in self.load_lua_modules]) + set_globals = lua_runtime.eval( + f""" + function(keys, argv, redis_call, redis_pcall, redis_log, redis_log_levels, cjson_encode, cjson_decode, cjson_null) + redis = {{}} + redis.call = redis_call + redis.pcall = redis_pcall + redis.log = redis_log + for level, pylevel in python.iterex(redis_log_levels.items()) do + redis[level] = pylevel + end + redis.error_reply = function(msg) return {{err=msg}} end + redis.status_reply = function(msg) return {{ok=msg}} end + + cjson = {{}} + cjson.encode = cjson_encode + cjson.decode = cjson_decode + cjson.null = cjson_null + + KEYS = keys + ARGV = argv + {modules_import_str} + end + """ + ) + expected_globals: Set[Any] = set() + set_globals( + lua_runtime.table_from(keys_and_args[:numkeys]), + lua_runtime.table_from(keys_and_args[numkeys:]), + functools.partial(self._lua_redis_call, lua_runtime, expected_globals), + functools.partial(self._lua_redis_pcall, lua_runtime, expected_globals), + functools.partial(_lua_redis_log, lua_runtime, expected_globals), + LUA_MODULE.as_attrgetter(REDIS_LOG_LEVELS), + functools.partial(_lua_cjson_encode, lua_runtime, expected_globals), + functools.partial(_lua_cjson_decode, lua_runtime, expected_globals), + _lua_cjson_null, + ) + expected_globals.update(lua_runtime.globals().keys()) + + try: + result = lua_runtime.execute(script) + except SimpleError as ex: + if ex.value == msgs.LUA_COMMAND_ARG_MSG: + if self.version < (7,): + raise SimpleError(msgs.LUA_COMMAND_ARG_MSG6) + elif self._server.server_type == "valkey": + raise SimpleError(msgs.VALKEY_LUA_COMMAND_ARG_MSG.format(sha1.decode())) + else: + raise SimpleError(msgs.LUA_COMMAND_ARG_MSG) + if self.version < (7,): + raise SimpleError(msgs.SCRIPT_ERROR_MSG.format(sha1.decode(), ex)) + raise SimpleError(ex.value) + except LUA_MODULE.LuaError as ex: + raise SimpleError(msgs.SCRIPT_ERROR_MSG.format(sha1.decode(), ex)) + + _check_for_lua_globals(lua_runtime, expected_globals) + + return self._convert_lua_result(result, nested=False) + + @command(name="EVALSHA", fixed=(bytes, Int), repeat=(bytes,), flags=msgs.FLAG_NO_SCRIPT) + def evalsha(self, sha1: bytes, numkeys: Int, *keys_and_args: bytes) -> Any: + try: + script = self._server.script_cache[sha1] + except KeyError: + raise SimpleError(msgs.NO_MATCHING_SCRIPT_MSG) + return self.eval(script, numkeys, *keys_and_args) + + @command(name="SCRIPT LOAD", fixed=(bytes,), repeat=(bytes,), flags=msgs.FLAG_NO_SCRIPT) + def script_load(self, *args: bytes) -> bytes: + if len(args) != 1: + raise SimpleError(msgs.BAD_SUBCOMMAND_MSG.format("SCRIPT")) + script = args[0] + sha1 = hashlib.sha1(script).hexdigest().encode() + self._server.script_cache[sha1] = script + return sha1 + + @command(name="SCRIPT EXISTS", fixed=(), repeat=(bytes,), flags=msgs.FLAG_NO_SCRIPT) + def script_exists(self, *args: bytes) -> List[int]: + if self.version >= (7,) and len(args) == 0: + raise SimpleError(msgs.WRONG_ARGS_MSG7) + return [int(sha1 in self._server.script_cache) for sha1 in args] + + @command(name="SCRIPT FLUSH", fixed=(), repeat=(bytes,), flags=msgs.FLAG_NO_SCRIPT) + def script_flush(self, *args: bytes) -> SimpleString: + if len(args) > 1 or (len(args) == 1 and null_terminate(args[0]) not in {b"sync", b"async"}): + raise SimpleError(msgs.BAD_SUBCOMMAND_MSG.format("SCRIPT")) + self._server.script_cache = {} + return OK + + @command((), flags=msgs.FLAG_NO_SCRIPT) + def script(self, *args: bytes) -> None: + raise SimpleError(msgs.BAD_SUBCOMMAND_MSG.format("SCRIPT")) + + @command(name="SCRIPT HELP", fixed=()) + def script_help(self, *args: bytes) -> List[bytes]: + help_strings = [ + "SCRIPT [ [value] [opt] ...]. Subcommands are:", + "DEBUG (YES|SYNC|NO)", + " Set the debug mode for subsequent scripts executed.", + "EXISTS [ ...]", + " Return information about the existence of the scripts in the script cache.", + "FLUSH [ASYNC|SYNC]", + " Flush the Lua scripts cache. Very dangerous on replicas.", + " When called without the optional mode argument, the behavior is determined by the", + " lazyfree-lazy-user-flush configuration directive. Valid modes are:", + " * ASYNC: Asynchronously flush the scripts cache.", + " * SYNC: Synchronously flush the scripts cache.", + "KILL", + " Kill the currently executing Lua script.", + "LOAD + +") + self.assertEqual(response.code, 400) + self.assertEqual(response.reason, "Unknown") + self.assertNotIn(b"script", response.body) + self.assertIn(b"Unknown", response.body) + + +class DateHeaderTest(SimpleHandlerTestCase): + class Handler(RequestHandler): + def get(self): + self.write("hello") + + def test_date_header(self): + response = self.fetch("/") + header_date = email.utils.parsedate_to_datetime(response.headers["Date"]) + self.assertLess( + header_date - datetime.datetime.now(datetime.timezone.utc), + datetime.timedelta(seconds=2), + ) + + +class RaiseWithReasonTest(SimpleHandlerTestCase): + class Handler(RequestHandler): + def get(self): + raise HTTPError(682, reason="Foo") + + def get_http_client(self): + # simple_httpclient only: curl doesn't expose the reason string + return SimpleAsyncHTTPClient() + + def test_raise_with_reason(self): + response = self.fetch("/") + self.assertEqual(response.code, 682) + self.assertEqual(response.reason, "Foo") + self.assertIn(b"682: Foo", response.body) + + def test_httperror_str(self): + self.assertEqual(str(HTTPError(682, reason="Foo")), "HTTP 682: Foo") + + def test_httperror_str_from_httputil(self): + self.assertEqual(str(HTTPError(682)), "HTTP 682: Unknown") + + +class ErrorHandlerXSRFTest(WebTestCase): + def get_handlers(self): + # note that if the handlers list is empty we get the default_host + # redirect fallback instead of a 404, so test with both an + # explicitly defined error handler and an implicit 404. + return [("/error", ErrorHandler, dict(status_code=417))] + + def get_app_kwargs(self): + return dict(xsrf_cookies=True) + + def test_error_xsrf(self): + response = self.fetch("/error", method="POST", body="") + self.assertEqual(response.code, 417) + + def test_404_xsrf(self): + response = self.fetch("/404", method="POST", body="") + self.assertEqual(response.code, 404) + + +class GzipTestCase(SimpleHandlerTestCase): + class Handler(RequestHandler): + def get(self): + for v in self.get_arguments("vary"): + self.add_header("Vary", v) + # Must write at least MIN_LENGTH bytes to activate compression. + self.write("hello world" + ("!" * GZipContentEncoding.MIN_LENGTH)) + + def get_app_kwargs(self): + return dict( + gzip=True, static_path=os.path.join(os.path.dirname(__file__), "static") + ) + + def assert_compressed(self, response): + # simple_httpclient renames the content-encoding header; + # curl_httpclient doesn't. + self.assertEqual( + response.headers.get( + "Content-Encoding", response.headers.get("X-Consumed-Content-Encoding") + ), + "gzip", + ) + + def test_gzip(self): + response = self.fetch("/") + self.assert_compressed(response) + self.assertEqual(response.headers["Vary"], "Accept-Encoding") + + def test_gzip_static(self): + # The streaming responses in StaticFileHandler have subtle + # interactions with the gzip output so test this case separately. + response = self.fetch("/robots.txt") + self.assert_compressed(response) + self.assertEqual(response.headers["Vary"], "Accept-Encoding") + + def test_gzip_not_requested(self): + response = self.fetch("/", use_gzip=False) + self.assertNotIn("Content-Encoding", response.headers) + self.assertEqual(response.headers["Vary"], "Accept-Encoding") + + def test_vary_already_present(self): + response = self.fetch("/?vary=Accept-Language") + self.assert_compressed(response) + self.assertEqual( + [s.strip() for s in response.headers["Vary"].split(",")], + ["Accept-Language", "Accept-Encoding"], + ) + + def test_vary_already_present_multiple(self): + # Regression test for https://github.com/tornadoweb/tornado/issues/1670 + response = self.fetch("/?vary=Accept-Language&vary=Cookie") + self.assert_compressed(response) + self.assertEqual( + [s.strip() for s in response.headers["Vary"].split(",")], + ["Accept-Language", "Cookie", "Accept-Encoding"], + ) + + +class PathArgsInPrepareTest(WebTestCase): + class Handler(RequestHandler): + def prepare(self): + self.write(dict(args=self.path_args, kwargs=self.path_kwargs)) + + def get(self, path): + assert path == "foo" + self.finish() + + def get_handlers(self): + return [("/pos/(.*)", self.Handler), ("/kw/(?P.*)", self.Handler)] + + def test_pos(self): + response = self.fetch("/pos/foo") + response.rethrow() + data = json_decode(response.body) + self.assertEqual(data, {"args": ["foo"], "kwargs": {}}) + + def test_kw(self): + response = self.fetch("/kw/foo") + response.rethrow() + data = json_decode(response.body) + self.assertEqual(data, {"args": [], "kwargs": {"path": "foo"}}) + + +class ClearAllCookiesTest(SimpleHandlerTestCase): + class Handler(RequestHandler): + def get(self): + self.clear_all_cookies() + self.write("ok") + + def test_clear_all_cookies(self): + response = self.fetch("/", headers={"Cookie": "foo=bar; baz=xyzzy"}) + set_cookies = sorted(response.headers.get_list("Set-Cookie")) + # Python 3.5 sends 'baz="";'; older versions use 'baz=;' + self.assertTrue(set_cookies[0].startswith('baz="";')) + self.assertTrue(set_cookies[1].startswith('foo="";')) + + +class PermissionError(Exception): + pass + + +class ExceptionHandlerTest(SimpleHandlerTestCase): + class Handler(RequestHandler): + def get(self): + exc = self.get_argument("exc") + if exc == "http": + raise HTTPError(410, "no longer here") + elif exc == "zero": + 1 / 0 + elif exc == "permission": + raise PermissionError("not allowed") + + def write_error(self, status_code, **kwargs): + if "exc_info" in kwargs: + typ, value, tb = kwargs["exc_info"] + if isinstance(value, PermissionError): + self.set_status(403) + self.write("PermissionError") + return + RequestHandler.write_error(self, status_code, **kwargs) + + def log_exception(self, typ, value, tb): + if isinstance(value, PermissionError): + app_log.warning("custom logging for PermissionError: %s", value.args[0]) + else: + RequestHandler.log_exception(self, typ, value, tb) + + def test_http_error(self): + # HTTPErrors are logged as warnings with no stack trace. + # TODO: extend ExpectLog to test this more precisely + with ExpectLog(gen_log, ".*no longer here"): + response = self.fetch("/?exc=http") + self.assertEqual(response.code, 410) + + def test_unknown_error(self): + # Unknown errors are logged as errors with a stack trace. + with ExpectLog(app_log, "Uncaught exception"): + response = self.fetch("/?exc=zero") + self.assertEqual(response.code, 500) + + def test_known_error(self): + # log_exception can override logging behavior, and write_error + # can override the response. + with ExpectLog(app_log, "custom logging for PermissionError: not allowed"): + response = self.fetch("/?exc=permission") + self.assertEqual(response.code, 403) + + +class BuggyLoggingTest(SimpleHandlerTestCase): + class Handler(RequestHandler): + def get(self): + 1 / 0 + + def log_exception(self, typ, value, tb): + 1 / 0 + + def test_buggy_log_exception(self): + # Something gets logged even though the application's + # logger is broken. + with ExpectLog(app_log, ".*"): + self.fetch("/") + + +class UIMethodUIModuleTest(SimpleHandlerTestCase): + """Test that UI methods and modules are created correctly and + associated with the handler. + """ + + class Handler(RequestHandler): + def get(self): + self.render("foo.html") + + def value(self): + return self.get_argument("value") + + def get_app_kwargs(self): + def my_ui_method(handler, x): + return f"In my_ui_method({x}) with handler value {handler.value()}." + + class MyModule(UIModule): + def render(self, x): + return "In MyModule({}) with handler value {}.".format( + x, + typing.cast(UIMethodUIModuleTest.Handler, self.handler).value(), + ) + + loader = DictLoader( + {"foo.html": "{{ my_ui_method(42) }} {% module MyModule(123) %}"} + ) + return dict( + template_loader=loader, + ui_methods={"my_ui_method": my_ui_method}, + ui_modules={"MyModule": MyModule}, + ) + + def tearDown(self): + super().tearDown() + # TODO: fix template loader caching so this isn't necessary. + RequestHandler._template_loaders.clear() + + def test_ui_method(self): + response = self.fetch("/?value=asdf") + self.assertEqual( + response.body, + b"In my_ui_method(42) with handler value asdf. " + b"In MyModule(123) with handler value asdf.", + ) + + +class GetArgumentErrorTest(SimpleHandlerTestCase): + class Handler(RequestHandler): + def get(self): + try: + self.get_argument("foo") + self.write({}) + except MissingArgumentError as e: + self.write({"arg_name": e.arg_name, "log_message": e.log_message}) + + def test_catch_error(self): + response = self.fetch("/") + self.assertEqual( + json_decode(response.body), + {"arg_name": "foo", "log_message": "Missing argument foo"}, + ) + + +class SetLazyPropertiesTest(SimpleHandlerTestCase): + class Handler(RequestHandler): + def prepare(self): + self.current_user = "Ben" + self.locale = locale.get("en_US") + + def get_user_locale(self): + raise NotImplementedError() + + def get_current_user(self): + raise NotImplementedError() + + def get(self): + self.write(f"Hello {self.current_user} ({self.locale.code})") + + def test_set_properties(self): + # Ensure that current_user can be assigned to normally for apps + # that want to forgo the lazy get_current_user property + response = self.fetch("/") + self.assertEqual(response.body, b"Hello Ben (en_US)") + + +class GetCurrentUserTest(WebTestCase): + def get_app_kwargs(self): + class WithoutUserModule(UIModule): + def render(self): + return "" + + class WithUserModule(UIModule): + def render(self): + return str(self.current_user) + + loader = DictLoader( + { + "without_user.html": "", + "with_user.html": "{{ current_user }}", + "without_user_module.html": "{% module WithoutUserModule() %}", + "with_user_module.html": "{% module WithUserModule() %}", + } + ) + return dict( + template_loader=loader, + ui_modules={ + "WithUserModule": WithUserModule, + "WithoutUserModule": WithoutUserModule, + }, + ) + + def tearDown(self): + super().tearDown() + RequestHandler._template_loaders.clear() + + def get_handlers(self): + class CurrentUserHandler(RequestHandler): + def prepare(self): + self.has_loaded_current_user = False + + def get_current_user(self): + self.has_loaded_current_user = True + return "" + + class WithoutUserHandler(CurrentUserHandler): + def get(self): + self.render_string("without_user.html") + self.finish(str(self.has_loaded_current_user)) + + class WithUserHandler(CurrentUserHandler): + def get(self): + self.render_string("with_user.html") + self.finish(str(self.has_loaded_current_user)) + + class CurrentUserModuleHandler(CurrentUserHandler): + def get_template_namespace(self): + # If RequestHandler.get_template_namespace is called, then + # get_current_user is evaluated. Until #820 is fixed, this + # is a small hack to circumvent the issue. + return self.ui + + class WithoutUserModuleHandler(CurrentUserModuleHandler): + def get(self): + self.render_string("without_user_module.html") + self.finish(str(self.has_loaded_current_user)) + + class WithUserModuleHandler(CurrentUserModuleHandler): + def get(self): + self.render_string("with_user_module.html") + self.finish(str(self.has_loaded_current_user)) + + return [ + ("/without_user", WithoutUserHandler), + ("/with_user", WithUserHandler), + ("/without_user_module", WithoutUserModuleHandler), + ("/with_user_module", WithUserModuleHandler), + ] + + @unittest.skip("needs fix") + def test_get_current_user_is_lazy(self): + # TODO: Make this test pass. See #820. + response = self.fetch("/without_user") + self.assertEqual(response.body, b"False") + + def test_get_current_user_works(self): + response = self.fetch("/with_user") + self.assertEqual(response.body, b"True") + + def test_get_current_user_from_ui_module_is_lazy(self): + response = self.fetch("/without_user_module") + self.assertEqual(response.body, b"False") + + def test_get_current_user_from_ui_module_works(self): + response = self.fetch("/with_user_module") + self.assertEqual(response.body, b"True") + + +class UnimplementedHTTPMethodsTest(SimpleHandlerTestCase): + class Handler(RequestHandler): + pass + + def test_unimplemented_standard_methods(self): + for method in ["HEAD", "GET", "DELETE", "OPTIONS"]: + response = self.fetch("/", method=method) + self.assertEqual(response.code, 405) + for method in ["POST", "PUT"]: + response = self.fetch("/", method=method, body=b"") + self.assertEqual(response.code, 405) + + +class UnimplementedNonStandardMethodsTest(SimpleHandlerTestCase): + class Handler(RequestHandler): + def other(self): + # Even though this method exists, it won't get called automatically + # because it is not in SUPPORTED_METHODS. + self.write("other") + + def test_unimplemented_patch(self): + # PATCH is recently standardized; Tornado supports it by default + # but wsgiref.validate doesn't like it. + response = self.fetch("/", method="PATCH", body=b"") + self.assertEqual(response.code, 405) + + def test_unimplemented_other(self): + response = self.fetch("/", method="OTHER", allow_nonstandard_methods=True) + self.assertEqual(response.code, 405) + + +class AllHTTPMethodsTest(SimpleHandlerTestCase): + class Handler(RequestHandler): + def method(self): + assert self.request.method is not None + self.write(self.request.method) + + get = delete = options = post = put = method # type: ignore + + def test_standard_methods(self): + response = self.fetch("/", method="HEAD") + self.assertEqual(response.body, b"") + for method in ["GET", "DELETE", "OPTIONS"]: + response = self.fetch("/", method=method) + self.assertEqual(response.body, utf8(method)) + for method in ["POST", "PUT"]: + response = self.fetch("/", method=method, body=b"") + self.assertEqual(response.body, utf8(method)) + + +class PatchMethodTest(SimpleHandlerTestCase): + class Handler(RequestHandler): + SUPPORTED_METHODS = RequestHandler.SUPPORTED_METHODS + ( # type: ignore + "OTHER", + ) + + def patch(self): + self.write("patch") + + def other(self): + self.write("other") + + def test_patch(self): + response = self.fetch("/", method="PATCH", body=b"") + self.assertEqual(response.body, b"patch") + + def test_other(self): + response = self.fetch("/", method="OTHER", allow_nonstandard_methods=True) + self.assertEqual(response.body, b"other") + + +class FinishInPrepareTest(SimpleHandlerTestCase): + class Handler(RequestHandler): + def prepare(self): + self.finish("done") + + def get(self): + # It's difficult to assert for certain that a method did not + # or will not be called in an asynchronous context, but this + # will be logged noisily if it is reached. + raise Exception("should not reach this method") + + def test_finish_in_prepare(self): + response = self.fetch("/") + self.assertEqual(response.body, b"done") + + +class Default404Test(WebTestCase): + def get_handlers(self): + # If there are no handlers at all a default redirect handler gets added. + return [("/foo", RequestHandler)] + + def test_404(self): + response = self.fetch("/") + self.assertEqual(response.code, 404) + self.assertEqual( + response.body, + b"404: Not Found" + b"404: Not Found", + ) + + +class Custom404Test(WebTestCase): + def get_handlers(self): + return [("/foo", RequestHandler)] + + def get_app_kwargs(self): + class Custom404Handler(RequestHandler): + def get(self): + self.set_status(404) + self.write("custom 404 response") + + return dict(default_handler_class=Custom404Handler) + + def test_404(self): + response = self.fetch("/") + self.assertEqual(response.code, 404) + self.assertEqual(response.body, b"custom 404 response") + + +class DefaultHandlerArgumentsTest(WebTestCase): + def get_handlers(self): + return [("/foo", RequestHandler)] + + def get_app_kwargs(self): + return dict( + default_handler_class=ErrorHandler, + default_handler_args=dict(status_code=403), + ) + + def test_403(self): + response = self.fetch("/") + self.assertEqual(response.code, 403) + + +class HandlerByNameTest(WebTestCase): + def get_handlers(self): + # All three are equivalent. + return [ + ("/hello1", HelloHandler), + ("/hello2", "tornado.test.web_test.HelloHandler"), + url("/hello3", "tornado.test.web_test.HelloHandler"), + ] + + def test_handler_by_name(self): + resp = self.fetch("/hello1") + self.assertEqual(resp.body, b"hello") + resp = self.fetch("/hello2") + self.assertEqual(resp.body, b"hello") + resp = self.fetch("/hello3") + self.assertEqual(resp.body, b"hello") + + +class StreamingRequestBodyTest(WebTestCase): + def get_handlers(self): + @stream_request_body + class StreamingBodyHandler(RequestHandler): + def initialize(self, test): + self.test = test + + def prepare(self): + self.test.prepared.set_result(None) + + def data_received(self, data): + self.test.data.set_result(data) + + def get(self): + self.test.finished.set_result(None) + self.write({}) + + @stream_request_body + class EarlyReturnHandler(RequestHandler): + def prepare(self): + # If we finish the response in prepare, it won't continue to + # the (non-existent) data_received. + raise HTTPError(401) + + @stream_request_body + class CloseDetectionHandler(RequestHandler): + def initialize(self, test): + self.test = test + + def on_connection_close(self): + super().on_connection_close() + self.test.close_future.set_result(None) + + return [ + ("/stream_body", StreamingBodyHandler, dict(test=self)), + ("/early_return", EarlyReturnHandler), + ("/close_detection", CloseDetectionHandler, dict(test=self)), + ] + + def connect(self, url, connection_close): + # Use a raw connection so we can control the sending of data. + s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) + s.connect(("127.0.0.1", self.get_http_port())) + stream = IOStream(s) + stream.write(b"GET " + url + b" HTTP/1.1\r\nHost: 127.0.0.1\r\n") + if connection_close: + stream.write(b"Connection: close\r\n") + stream.write(b"Transfer-Encoding: chunked\r\n\r\n") + return stream + + @gen_test + def test_streaming_body(self): + self.prepared = Future() # type: Future[None] + self.data = Future() # type: Future[bytes] + self.finished = Future() # type: Future[None] + + stream = self.connect(b"/stream_body", connection_close=True) + yield self.prepared + stream.write(b"4\r\nasdf\r\n") + # Ensure the first chunk is received before we send the second. + data = yield self.data + self.assertEqual(data, b"asdf") + self.data = Future() + stream.write(b"4\r\nqwer\r\n") + data = yield self.data + self.assertEqual(data, b"qwer") + stream.write(b"0\r\n\r\n") + yield self.finished + data = yield stream.read_until_close() + # This would ideally use an HTTP1Connection to read the response. + self.assertTrue(data.endswith(b"{}")) + stream.close() + + @gen_test + def test_early_return(self): + stream = self.connect(b"/early_return", connection_close=False) + data = yield stream.read_until_close() + self.assertTrue(data.startswith(b"HTTP/1.1 401")) + + @gen_test + def test_early_return_with_data(self): + stream = self.connect(b"/early_return", connection_close=False) + stream.write(b"4\r\nasdf\r\n") + data = yield stream.read_until_close() + self.assertTrue(data.startswith(b"HTTP/1.1 401")) + + @gen_test + def test_close_during_upload(self): + self.close_future = Future() # type: Future[None] + stream = self.connect(b"/close_detection", connection_close=False) + stream.close() + yield self.close_future + + +# Each method in this handler returns a yieldable object and yields to the +# IOLoop so the future is not immediately ready. Ensure that the +# yieldables are respected and no method is called before the previous +# one has completed. +@stream_request_body +class BaseFlowControlHandler(RequestHandler): + def initialize(self, test): + self.test = test + self.method = None + self.methods = [] # type: typing.List[str] + + @contextlib.contextmanager + def in_method(self, method): + if self.method is not None: + self.test.fail(f"entered method {method} while in {self.method}") + self.method = method + self.methods.append(method) + try: + yield + finally: + self.method = None + + @gen.coroutine + def prepare(self): + # Note that asynchronous prepare() does not block data_received, + # so we don't use in_method here. + self.methods.append("prepare") + yield gen.moment + + @gen.coroutine + def post(self): + with self.in_method("post"): + yield gen.moment + self.write(dict(methods=self.methods)) + + +class BaseStreamingRequestFlowControlTest: + def get_httpserver_options(self): + # Use a small chunk size so flow control is relevant even though + # all the data arrives at once. + return dict(chunk_size=10, decompress_request=True) + + def get_http_client(self): + # simple_httpclient only: curl doesn't support body_producer. + return SimpleAsyncHTTPClient() + + # Test all the slightly different code paths for fixed, chunked, etc bodies. + def test_flow_control_fixed_body(self: typing.Any): + response = self.fetch("/", body="abcdefghijklmnopqrstuvwxyz", method="POST") + response.rethrow() + self.assertEqual( + json_decode(response.body), + dict( + methods=[ + "prepare", + "data_received", + "data_received", + "data_received", + "post", + ] + ), + ) + + def test_flow_control_chunked_body(self: typing.Any): + chunks = [b"abcd", b"efgh", b"ijkl"] + + @gen.coroutine + def body_producer(write): + for i in chunks: + yield write(i) + + response = self.fetch("/", body_producer=body_producer, method="POST") + response.rethrow() + self.assertEqual( + json_decode(response.body), + dict( + methods=[ + "prepare", + "data_received", + "data_received", + "data_received", + "post", + ] + ), + ) + + def test_flow_control_compressed_body(self: typing.Any): + bytesio = BytesIO() + gzip_file = gzip.GzipFile(mode="w", fileobj=bytesio) + gzip_file.write(b"abcdefghijklmnopqrstuvwxyz") + gzip_file.close() + compressed_body = bytesio.getvalue() + response = self.fetch( + "/", + body=compressed_body, + method="POST", + headers={"Content-Encoding": "gzip"}, + ) + response.rethrow() + self.assertEqual( + json_decode(response.body), + dict( + methods=[ + "prepare", + "data_received", + "data_received", + "data_received", + "post", + ] + ), + ) + + +class DecoratedStreamingRequestFlowControlTest( + BaseStreamingRequestFlowControlTest, WebTestCase +): + def get_handlers(self): + class DecoratedFlowControlHandler(BaseFlowControlHandler): + @gen.coroutine + def data_received(self, data): + with self.in_method("data_received"): + yield gen.moment + + return [("/", DecoratedFlowControlHandler, dict(test=self))] + + +class NativeStreamingRequestFlowControlTest( + BaseStreamingRequestFlowControlTest, WebTestCase +): + def get_handlers(self): + class NativeFlowControlHandler(BaseFlowControlHandler): + async def data_received(self, data): + with self.in_method("data_received"): + import asyncio + + await asyncio.sleep(0) + + return [("/", NativeFlowControlHandler, dict(test=self))] + + +class IncorrectContentLengthTest(SimpleHandlerTestCase): + def get_handlers(self): + test = self + self.server_error = None + + # Manually set a content-length that doesn't match the actual content. + class TooHigh(RequestHandler): + def get(self): + self.set_header("Content-Length", "42") + try: + self.finish("ok") + except Exception as e: + test.server_error = e + raise + + class TooLow(RequestHandler): + def get(self): + self.set_header("Content-Length", "2") + try: + self.finish("hello") + except Exception as e: + test.server_error = e + raise + + return [("/high", TooHigh), ("/low", TooLow)] + + def test_content_length_too_high(self): + # When the content-length is too high, the connection is simply + # closed without completing the response. An error is logged on + # the server. + with ExpectLog(app_log, "(Uncaught exception|Exception in callback)"): + with ExpectLog( + gen_log, + "(Cannot send error response after headers written" + "|Failed to flush partial response)", + ): + with self.assertRaises(HTTPClientError): + self.fetch("/high", raise_error=True) + self.assertEqual( + str(self.server_error), "Tried to write 40 bytes less than Content-Length" + ) + + def test_content_length_too_low(self): + # When the content-length is too low, the connection is closed + # without writing the last chunk, so the client never sees the request + # complete (which would be a framing error). + with ExpectLog(app_log, "(Uncaught exception|Exception in callback)"): + with ExpectLog( + gen_log, + "(Cannot send error response after headers written" + "|Failed to flush partial response)", + ): + with self.assertRaises(HTTPClientError): + self.fetch("/low", raise_error=True) + self.assertEqual( + str(self.server_error), "Tried to write more data than Content-Length" + ) + + +class ClientCloseTest(SimpleHandlerTestCase): + class Handler(RequestHandler): + def get(self): + if self.request.version.startswith("HTTP/1"): + # Simulate a connection closed by the client during + # request processing. The client will see an error, but the + # server should respond gracefully (without logging errors + # because we were unable to write out as many bytes as + # Content-Length said we would) + self.request.connection.stream.close() # type: ignore + self.write("hello") + else: + # TODO: add a HTTP2-compatible version of this test. + self.write("requires HTTP/1.x") + + def test_client_close(self): + with self.assertRaises((HTTPClientError, unittest.SkipTest)): # type: ignore + response = self.fetch("/", raise_error=True) + if response.body == b"requires HTTP/1.x": + self.skipTest("requires HTTP/1.x") + self.assertEqual(response.code, 599) + + +class SignedValueTest(unittest.TestCase): + SECRET = "It's a secret to everybody" + SECRET_DICT = {0: "asdfbasdf", 1: "12312312", 2: "2342342"} + + def past(self): + return self.present() - 86400 * 32 + + def present(self): + return 1300000000 + + def test_known_values(self): + signed_v1 = create_signed_value( + SignedValueTest.SECRET, "key", "value", version=1, clock=self.present + ) + self.assertEqual( + signed_v1, b"dmFsdWU=|1300000000|31c934969f53e48164c50768b40cbd7e2daaaa4f" + ) + + signed_v2 = create_signed_value( + SignedValueTest.SECRET, "key", "value", version=2, clock=self.present + ) + self.assertEqual( + signed_v2, + b"2|1:0|10:1300000000|3:key|8:dmFsdWU=|" + b"3d4e60b996ff9c5d5788e333a0cba6f238a22c6c0f94788870e1a9ecd482e152", + ) + + signed_default = create_signed_value( + SignedValueTest.SECRET, "key", "value", clock=self.present + ) + self.assertEqual(signed_default, signed_v2) + + decoded_v1 = decode_signed_value( + SignedValueTest.SECRET, "key", signed_v1, min_version=1, clock=self.present + ) + self.assertEqual(decoded_v1, b"value") + + decoded_v2 = decode_signed_value( + SignedValueTest.SECRET, "key", signed_v2, min_version=2, clock=self.present + ) + self.assertEqual(decoded_v2, b"value") + + def test_name_swap(self): + signed1 = create_signed_value( + SignedValueTest.SECRET, "key1", "value", clock=self.present + ) + signed2 = create_signed_value( + SignedValueTest.SECRET, "key2", "value", clock=self.present + ) + # Try decoding each string with the other's "name" + decoded1 = decode_signed_value( + SignedValueTest.SECRET, "key2", signed1, clock=self.present + ) + self.assertIsNone(decoded1) + decoded2 = decode_signed_value( + SignedValueTest.SECRET, "key1", signed2, clock=self.present + ) + self.assertIsNone(decoded2) + + def test_expired(self): + signed = create_signed_value( + SignedValueTest.SECRET, "key1", "value", clock=self.past + ) + decoded_past = decode_signed_value( + SignedValueTest.SECRET, "key1", signed, clock=self.past + ) + self.assertEqual(decoded_past, b"value") + decoded_present = decode_signed_value( + SignedValueTest.SECRET, "key1", signed, clock=self.present + ) + self.assertIsNone(decoded_present) + + def test_payload_tampering(self): + # These cookies are variants of the one in test_known_values. + sig = "3d4e60b996ff9c5d5788e333a0cba6f238a22c6c0f94788870e1a9ecd482e152" + + def validate(prefix): + return b"value" == decode_signed_value( + SignedValueTest.SECRET, "key", prefix + sig, clock=self.present + ) + + self.assertTrue(validate("2|1:0|10:1300000000|3:key|8:dmFsdWU=|")) + # Change key version + self.assertFalse(validate("2|1:1|10:1300000000|3:key|8:dmFsdWU=|")) + # length mismatch (field too short) + self.assertFalse(validate("2|1:0|10:130000000|3:key|8:dmFsdWU=|")) + # length mismatch (field too long) + self.assertFalse(validate("2|1:0|10:1300000000|3:keey|8:dmFsdWU=|")) + + def test_signature_tampering(self): + prefix = "2|1:0|10:1300000000|3:key|8:dmFsdWU=|" + + def validate(sig): + return b"value" == decode_signed_value( + SignedValueTest.SECRET, "key", prefix + sig, clock=self.present + ) + + self.assertTrue( + validate("3d4e60b996ff9c5d5788e333a0cba6f238a22c6c0f94788870e1a9ecd482e152") + ) + # All zeros + self.assertFalse(validate("0" * 32)) + # Change one character + self.assertFalse( + validate("4d4e60b996ff9c5d5788e333a0cba6f238a22c6c0f94788870e1a9ecd482e152") + ) + # Change another character + self.assertFalse( + validate("3d4e60b996ff9c5d5788e333a0cba6f238a22c6c0f94788870e1a9ecd482e153") + ) + # Truncate + self.assertFalse( + validate("3d4e60b996ff9c5d5788e333a0cba6f238a22c6c0f94788870e1a9ecd482e15") + ) + # Lengthen + self.assertFalse( + validate( + "3d4e60b996ff9c5d5788e333a0cba6f238a22c6c0f94788870e1a9ecd482e1538" + ) + ) + + def test_non_ascii(self): + value = b"\xe9" + signed = create_signed_value( + SignedValueTest.SECRET, "key", value, clock=self.present + ) + decoded = decode_signed_value( + SignedValueTest.SECRET, "key", signed, clock=self.present + ) + self.assertEqual(value, decoded) + + def test_key_versioning_read_write_default_key(self): + value = b"\xe9" + signed = create_signed_value( + SignedValueTest.SECRET_DICT, "key", value, clock=self.present, key_version=0 + ) + decoded = decode_signed_value( + SignedValueTest.SECRET_DICT, "key", signed, clock=self.present + ) + self.assertEqual(value, decoded) + + def test_key_versioning_read_write_non_default_key(self): + value = b"\xe9" + signed = create_signed_value( + SignedValueTest.SECRET_DICT, "key", value, clock=self.present, key_version=1 + ) + decoded = decode_signed_value( + SignedValueTest.SECRET_DICT, "key", signed, clock=self.present + ) + self.assertEqual(value, decoded) + + def test_key_versioning_invalid_key(self): + value = b"\xe9" + signed = create_signed_value( + SignedValueTest.SECRET_DICT, "key", value, clock=self.present, key_version=0 + ) + newkeys = SignedValueTest.SECRET_DICT.copy() + newkeys.pop(0) + decoded = decode_signed_value(newkeys, "key", signed, clock=self.present) + self.assertIsNone(decoded) + + def test_key_version_retrieval(self): + value = b"\xe9" + signed = create_signed_value( + SignedValueTest.SECRET_DICT, "key", value, clock=self.present, key_version=1 + ) + key_version = get_signature_key_version(signed) + self.assertEqual(1, key_version) + + +class XSRFTest(SimpleHandlerTestCase): + class Handler(RequestHandler): + def get(self): + version = int(self.get_argument("version", "2")) + # This would be a bad idea in a real app, but in this test + # it's fine. + self.settings["xsrf_cookie_version"] = version + self.write(self.xsrf_token) + + def post(self): + self.write("ok") + + def get_app_kwargs(self): + return dict(xsrf_cookies=True) + + def setUp(self): + super().setUp() + self.xsrf_token = self.get_token() + + def get_token(self, old_token=None, version=None): + if old_token is not None: + headers = self.cookie_headers(old_token) + else: + headers = None + response = self.fetch( + "/" if version is None else ("/?version=%d" % version), headers=headers + ) + response.rethrow() + return native_str(response.body) + + def cookie_headers(self, token=None): + if token is None: + token = self.xsrf_token + return {"Cookie": "_xsrf=" + token} + + def test_xsrf_fail_no_token(self): + with ExpectLog(gen_log, ".*'_xsrf' argument missing"): + response = self.fetch("/", method="POST", body=b"") + self.assertEqual(response.code, 403) + + def test_xsrf_fail_body_no_cookie(self): + with ExpectLog(gen_log, ".*XSRF cookie does not match POST"): + response = self.fetch( + "/", + method="POST", + body=urllib.parse.urlencode(dict(_xsrf=self.xsrf_token)), + ) + self.assertEqual(response.code, 403) + + def test_xsrf_fail_argument_invalid_format(self): + with ExpectLog(gen_log, ".*'_xsrf' argument has invalid format"): + response = self.fetch( + "/", + method="POST", + headers=self.cookie_headers(), + body=urllib.parse.urlencode(dict(_xsrf="3|")), + ) + self.assertEqual(response.code, 403) + + def test_xsrf_fail_cookie_invalid_format(self): + with ExpectLog(gen_log, ".*XSRF cookie does not match POST"): + response = self.fetch( + "/", + method="POST", + headers=self.cookie_headers(token="3|"), + body=urllib.parse.urlencode(dict(_xsrf=self.xsrf_token)), + ) + self.assertEqual(response.code, 403) + + def test_xsrf_fail_cookie_no_body(self): + with ExpectLog(gen_log, ".*'_xsrf' argument missing"): + response = self.fetch( + "/", method="POST", body=b"", headers=self.cookie_headers() + ) + self.assertEqual(response.code, 403) + + def test_xsrf_success_short_token(self): + response = self.fetch( + "/", + method="POST", + body=urllib.parse.urlencode(dict(_xsrf="deadbeef")), + headers=self.cookie_headers(token="deadbeef"), + ) + self.assertEqual(response.code, 200) + + def test_xsrf_success_non_hex_token(self): + response = self.fetch( + "/", + method="POST", + body=urllib.parse.urlencode(dict(_xsrf="xoxo")), + headers=self.cookie_headers(token="xoxo"), + ) + self.assertEqual(response.code, 200) + + def test_xsrf_success_post_body(self): + response = self.fetch( + "/", + method="POST", + body=urllib.parse.urlencode(dict(_xsrf=self.xsrf_token)), + headers=self.cookie_headers(), + ) + self.assertEqual(response.code, 200) + + def test_xsrf_success_query_string(self): + response = self.fetch( + "/?" + urllib.parse.urlencode(dict(_xsrf=self.xsrf_token)), + method="POST", + body=b"", + headers=self.cookie_headers(), + ) + self.assertEqual(response.code, 200) + + def test_xsrf_success_header(self): + response = self.fetch( + "/", + method="POST", + body=b"", + headers=dict( + {"X-Xsrftoken": self.xsrf_token}, # type: ignore + **self.cookie_headers(), + ), + ) + self.assertEqual(response.code, 200) + + def test_distinct_tokens(self): + # Every request gets a distinct token. + NUM_TOKENS = 10 + tokens = set() + for i in range(NUM_TOKENS): + tokens.add(self.get_token()) + self.assertEqual(len(tokens), NUM_TOKENS) + + def test_cross_user(self): + token2 = self.get_token() + # Each token can be used to authenticate its own request. + for token in (self.xsrf_token, token2): + response = self.fetch( + "/", + method="POST", + body=urllib.parse.urlencode(dict(_xsrf=token)), + headers=self.cookie_headers(token), + ) + self.assertEqual(response.code, 200) + # Sending one in the cookie and the other in the body is not allowed. + for cookie_token, body_token in ( + (self.xsrf_token, token2), + (token2, self.xsrf_token), + ): + with ExpectLog(gen_log, ".*XSRF cookie does not match POST"): + response = self.fetch( + "/", + method="POST", + body=urllib.parse.urlencode(dict(_xsrf=body_token)), + headers=self.cookie_headers(cookie_token), + ) + self.assertEqual(response.code, 403) + + def test_refresh_token(self): + token = self.xsrf_token + tokens_seen = {token} + # A user's token is stable over time. Refreshing the page in one tab + # might update the cookie while an older tab still has the old cookie + # in its DOM. Simulate this scenario by passing a constant token + # in the body and re-querying for the token. + for i in range(5): + token = self.get_token(token) + # Tokens are encoded uniquely each time + tokens_seen.add(token) + response = self.fetch( + "/", + method="POST", + body=urllib.parse.urlencode(dict(_xsrf=self.xsrf_token)), + headers=self.cookie_headers(token), + ) + self.assertEqual(response.code, 200) + self.assertEqual(len(tokens_seen), 6) + + def test_versioning(self): + # Version 1 still produces distinct tokens per request. + self.assertNotEqual(self.get_token(version=1), self.get_token(version=1)) + + # Refreshed v1 tokens are all identical. + v1_token = self.get_token(version=1) + for i in range(5): + self.assertEqual(self.get_token(v1_token, version=1), v1_token) + + # Upgrade to a v2 version of the same token + v2_token = self.get_token(v1_token) + self.assertNotEqual(v1_token, v2_token) + # Each v1 token can map to many v2 tokens. + self.assertNotEqual(v2_token, self.get_token(v1_token)) + + # The tokens are cross-compatible. + for cookie_token, body_token in ((v1_token, v2_token), (v2_token, v1_token)): + response = self.fetch( + "/", + method="POST", + body=urllib.parse.urlencode(dict(_xsrf=body_token)), + headers=self.cookie_headers(cookie_token), + ) + self.assertEqual(response.code, 200) + + +# A subset of the previous test with a different cookie name +class XSRFCookieNameTest(SimpleHandlerTestCase): + class Handler(RequestHandler): + def get(self): + self.write(self.xsrf_token) + + def post(self): + self.write("ok") + + def get_app_kwargs(self): + return dict( + xsrf_cookies=True, + xsrf_cookie_name="__Host-xsrf", + xsrf_cookie_kwargs={"secure": True}, + ) + + def setUp(self): + super().setUp() + self.xsrf_token = self.get_token() + + def get_token(self, old_token=None): + if old_token is not None: + headers = self.cookie_headers(old_token) + else: + headers = None + response = self.fetch("/", headers=headers) + response.rethrow() + return native_str(response.body) + + def cookie_headers(self, token=None): + if token is None: + token = self.xsrf_token + return {"Cookie": "__Host-xsrf=" + token} + + def test_xsrf_fail_no_token(self): + with ExpectLog(gen_log, ".*'_xsrf' argument missing"): + response = self.fetch("/", method="POST", body=b"") + self.assertEqual(response.code, 403) + + def test_xsrf_fail_body_no_cookie(self): + with ExpectLog(gen_log, ".*XSRF cookie does not match POST"): + response = self.fetch( + "/", + method="POST", + body=urllib.parse.urlencode(dict(_xsrf=self.xsrf_token)), + ) + self.assertEqual(response.code, 403) + + def test_xsrf_success_post_body(self): + response = self.fetch( + "/", + method="POST", + # Note that renaming the cookie doesn't rename the POST param + body=urllib.parse.urlencode(dict(_xsrf=self.xsrf_token)), + headers=self.cookie_headers(), + ) + self.assertEqual(response.code, 200) + + +class XSRFCookieKwargsTest(SimpleHandlerTestCase): + class Handler(RequestHandler): + def get(self): + self.write(self.xsrf_token) + + def get_app_kwargs(self): + return dict( + xsrf_cookies=True, xsrf_cookie_kwargs=dict(httponly=True, expires_days=2) + ) + + def test_xsrf_httponly(self): + response = self.fetch("/") + self.assertIn("httponly;", response.headers["Set-Cookie"].lower()) + self.assertIn("expires=", response.headers["Set-Cookie"].lower()) + header = response.headers.get("Set-Cookie") + assert header is not None + match = re.match(".*; expires=(?P.+);.*", header) + assert match is not None + + expires = datetime.datetime.now(datetime.timezone.utc) + datetime.timedelta( + days=2 + ) + header_expires = email.utils.parsedate_to_datetime(match.groupdict()["expires"]) + if header_expires.tzinfo is None: + header_expires = header_expires.replace(tzinfo=datetime.timezone.utc) + self.assertTrue(abs((expires - header_expires).total_seconds()) < 10) + + +class FinishExceptionTest(SimpleHandlerTestCase): + class Handler(RequestHandler): + def get(self): + self.set_status(401) + self.set_header("WWW-Authenticate", 'Basic realm="something"') + if self.get_argument("finish_value", ""): + raise Finish("authentication required") + else: + self.write("authentication required") + raise Finish() + + def test_finish_exception(self): + for u in ["/", "/?finish_value=1"]: + response = self.fetch(u) + self.assertEqual(response.code, 401) + self.assertEqual( + 'Basic realm="something"', response.headers.get("WWW-Authenticate") + ) + self.assertEqual(b"authentication required", response.body) + + +class DecoratorTest(WebTestCase): + def get_handlers(self): + class RemoveSlashHandler(RequestHandler): + @removeslash + def get(self): + pass + + class AddSlashHandler(RequestHandler): + @addslash + def get(self): + pass + + return [("/removeslash/", RemoveSlashHandler), ("/addslash", AddSlashHandler)] + + def test_removeslash(self): + response = self.fetch("/removeslash/", follow_redirects=False) + self.assertEqual(response.code, 301) + self.assertEqual(response.headers["Location"], "/removeslash") + + response = self.fetch("/removeslash/?foo=bar", follow_redirects=False) + self.assertEqual(response.code, 301) + self.assertEqual(response.headers["Location"], "/removeslash?foo=bar") + + def test_addslash(self): + response = self.fetch("/addslash", follow_redirects=False) + self.assertEqual(response.code, 301) + self.assertEqual(response.headers["Location"], "/addslash/") + + response = self.fetch("/addslash?foo=bar", follow_redirects=False) + self.assertEqual(response.code, 301) + self.assertEqual(response.headers["Location"], "/addslash/?foo=bar") + + +class CacheTest(WebTestCase): + def get_handlers(self): + class EtagHandler(RequestHandler): + def get(self, computed_etag): + self.write(computed_etag) + + def compute_etag(self): + return self._write_buffer[0] + + return [("/etag/(.*)", EtagHandler)] + + def test_wildcard_etag(self): + computed_etag = '"xyzzy"' + etags = "*" + self._test_etag(computed_etag, etags, 304) + + def test_strong_etag_match(self): + computed_etag = '"xyzzy"' + etags = '"xyzzy"' + self._test_etag(computed_etag, etags, 304) + + def test_multiple_strong_etag_match(self): + computed_etag = '"xyzzy1"' + etags = '"xyzzy1", "xyzzy2"' + self._test_etag(computed_etag, etags, 304) + + def test_strong_etag_not_match(self): + computed_etag = '"xyzzy"' + etags = '"xyzzy1"' + self._test_etag(computed_etag, etags, 200) + + def test_multiple_strong_etag_not_match(self): + computed_etag = '"xyzzy"' + etags = '"xyzzy1", "xyzzy2"' + self._test_etag(computed_etag, etags, 200) + + def test_weak_etag_match(self): + computed_etag = '"xyzzy1"' + etags = 'W/"xyzzy1"' + self._test_etag(computed_etag, etags, 304) + + def test_multiple_weak_etag_match(self): + computed_etag = '"xyzzy2"' + etags = 'W/"xyzzy1", W/"xyzzy2"' + self._test_etag(computed_etag, etags, 304) + + def test_weak_etag_not_match(self): + computed_etag = '"xyzzy2"' + etags = 'W/"xyzzy1"' + self._test_etag(computed_etag, etags, 200) + + def test_multiple_weak_etag_not_match(self): + computed_etag = '"xyzzy3"' + etags = 'W/"xyzzy1", W/"xyzzy2"' + self._test_etag(computed_etag, etags, 200) + + def _test_etag(self, computed_etag, etags, status_code): + response = self.fetch( + "/etag/" + computed_etag, headers={"If-None-Match": etags} + ) + self.assertEqual(response.code, status_code) + + +class RequestSummaryTest(SimpleHandlerTestCase): + class Handler(RequestHandler): + def get(self): + # remote_ip is optional, although it's set by + # both HTTPServer and WSGIAdapter. + # Clobber it to make sure it doesn't break logging. + self.request.remote_ip = None + self.finish(self._request_summary()) + + def test_missing_remote_ip(self): + resp = self.fetch("/") + self.assertEqual(resp.body, b"GET / (None)") + + +class HTTPErrorTest(unittest.TestCase): + def test_copy(self): + e = HTTPError(403, reason="Go away") + e2 = copy.copy(e) + self.assertIsNot(e, e2) + self.assertEqual(e.status_code, e2.status_code) + self.assertEqual(e.reason, e2.reason) + + +class ApplicationTest(AsyncTestCase): + def test_listen(self): + app = Application([]) + server = app.listen(0, address="127.0.0.1") + server.stop() + + +class URLSpecReverseTest(unittest.TestCase): + def test_reverse(self): + self.assertEqual("/favicon.ico", url(r"/favicon\.ico", None).reverse()) + self.assertEqual("/favicon.ico", url(r"^/favicon\.ico$", None).reverse()) + + def test_non_reversible(self): + # URLSpecs are non-reversible if they include non-constant + # regex features outside capturing groups. Currently, this is + # only strictly enforced for backslash-escaped character + # classes. + paths = [r"^/api/v\d+/foo/(\w+)$"] + for path in paths: + # A URLSpec can still be created even if it cannot be reversed. + url_spec = url(path, None) + try: + result = url_spec.reverse() + self.fail( + "did not get expected exception when reversing %s. " + "result: %s" % (path, result) + ) + except ValueError: + pass + + def test_reverse_arguments(self): + self.assertEqual( + "/api/v1/foo/bar", url(r"^/api/v1/foo/(\w+)$", None).reverse("bar") + ) + self.assertEqual( + "/api.v1/foo/5/icon.png", + url(r"/api\.v1/foo/([0-9]+)/icon\.png", None).reverse(5), + ) + + +class RedirectHandlerTest(WebTestCase): + def get_handlers(self): + return [ + ("/src", WebRedirectHandler, {"url": "/dst"}), + ("/src2", WebRedirectHandler, {"url": "/dst2?foo=bar"}), + (r"/(.*?)/(.*?)/(.*)", WebRedirectHandler, {"url": "/{1}/{0}/{2}"}), + ] + + def test_basic_redirect(self): + response = self.fetch("/src", follow_redirects=False) + self.assertEqual(response.code, 301) + self.assertEqual(response.headers["Location"], "/dst") + + def test_redirect_with_argument(self): + response = self.fetch("/src?foo=bar", follow_redirects=False) + self.assertEqual(response.code, 301) + self.assertEqual(response.headers["Location"], "/dst?foo=bar") + + def test_redirect_with_appending_argument(self): + response = self.fetch("/src2?foo2=bar2", follow_redirects=False) + self.assertEqual(response.code, 301) + self.assertEqual(response.headers["Location"], "/dst2?foo=bar&foo2=bar2") + + def test_redirect_pattern(self): + response = self.fetch("/a/b/c", follow_redirects=False) + self.assertEqual(response.code, 301) + self.assertEqual(response.headers["Location"], "/b/a/c") + + +class AcceptLanguageTest(WebTestCase): + """Test evaluation of Accept-Language header""" + + def get_handlers(self): + locale.load_gettext_translations( + os.path.join(os.path.dirname(__file__), "gettext_translations"), + "tornado_test", + ) + + class AcceptLanguageHandler(RequestHandler): + def get(self): + self.set_header( + "Content-Language", self.get_browser_locale().code.replace("_", "-") + ) + self.finish(b"") + + return [ + ("/", AcceptLanguageHandler), + ] + + def test_accept_language(self): + response = self.fetch("/", headers={"Accept-Language": "fr-FR;q=0.9"}) + self.assertEqual(response.headers["Content-Language"], "fr-FR") + + response = self.fetch("/", headers={"Accept-Language": "fr-FR; q=0.9"}) + self.assertEqual(response.headers["Content-Language"], "fr-FR") + + def test_accept_language_ignore(self): + response = self.fetch("/", headers={"Accept-Language": "fr-FR;q=0"}) + self.assertEqual(response.headers["Content-Language"], "en-US") + + def test_accept_language_invalid(self): + response = self.fetch("/", headers={"Accept-Language": "fr-FR;q=-1"}) + self.assertEqual(response.headers["Content-Language"], "en-US") diff --git a/.venv/lib/python3.13/site-packages/tornado/test/websocket_test.py b/.venv/lib/python3.13/site-packages/tornado/test/websocket_test.py new file mode 100644 index 0000000000000000000000000000000000000000..494c4bf67ab5b01b2975a33ebea0b82e5d71db66 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/tornado/test/websocket_test.py @@ -0,0 +1,989 @@ +import asyncio +import contextlib +import datetime +import functools +import socket +import traceback +import typing +import unittest + +from tornado.concurrent import Future +from tornado import gen +from tornado.httpclient import HTTPError, HTTPRequest +from tornado.locks import Event +from tornado.log import gen_log, app_log +from tornado.netutil import Resolver +from tornado.simple_httpclient import SimpleAsyncHTTPClient +from tornado.template import DictLoader +from tornado.test.util import abstract_base_test, ignore_deprecation +from tornado.testing import AsyncHTTPTestCase, gen_test, bind_unused_port, ExpectLog +from tornado.web import Application, RequestHandler + +try: + import tornado.websocket # noqa: F401 + from tornado.util import _websocket_mask_python +except ImportError: + # The unittest module presents misleading errors on ImportError + # (it acts as if websocket_test could not be found, hiding the underlying + # error). If we get an ImportError here (which could happen due to + # TORNADO_EXTENSION=1), print some extra information before failing. + traceback.print_exc() + raise + +from tornado.websocket import ( + WebSocketHandler, + websocket_connect, + WebSocketError, + WebSocketClosedError, +) + +try: + from tornado import speedups +except ImportError: + speedups = None # type: ignore + + +class TestWebSocketHandler(WebSocketHandler): + """Base class for testing handlers that exposes the on_close event. + + This allows for tests to see the close code and reason on the + server side. + + """ + + def initialize(self, close_future=None, compression_options=None): + self.close_future = close_future + self.compression_options = compression_options + + def get_compression_options(self): + return self.compression_options + + def on_close(self): + if self.close_future is not None: + self.close_future.set_result((self.close_code, self.close_reason)) + + +class EchoHandler(TestWebSocketHandler): + @gen.coroutine + def on_message(self, message): + try: + yield self.write_message(message, isinstance(message, bytes)) + except asyncio.CancelledError: + pass + except WebSocketClosedError: + pass + + +class ErrorInOnMessageHandler(TestWebSocketHandler): + def on_message(self, message): + 1 / 0 + + +class HeaderHandler(TestWebSocketHandler): + def open(self): + methods_to_test = [ + functools.partial(self.write, "This should not work"), + functools.partial(self.redirect, "http://localhost/elsewhere"), + functools.partial(self.set_header, "X-Test", ""), + functools.partial(self.set_cookie, "Chocolate", "Chip"), + functools.partial(self.set_status, 503), + self.flush, + self.finish, + ] + for method in methods_to_test: + try: + # In a websocket context, many RequestHandler methods + # raise RuntimeErrors. + method() # type: ignore + raise Exception("did not get expected exception") + except RuntimeError: + pass + self.write_message(self.request.headers.get("X-Test", "")) + + +class HeaderEchoHandler(TestWebSocketHandler): + def set_default_headers(self): + self.set_header("X-Extra-Response-Header", "Extra-Response-Value") + + def prepare(self): + for k, v in self.request.headers.get_all(): + if k.lower().startswith("x-test"): + self.set_header(k, v) + + +class NonWebSocketHandler(RequestHandler): + def get(self): + self.write("ok") + + +class RedirectHandler(RequestHandler): + def get(self): + self.redirect("/echo") + + +class CloseReasonHandler(TestWebSocketHandler): + def open(self): + self.on_close_called = False + self.close(1001, "goodbye") + + +class AsyncPrepareHandler(TestWebSocketHandler): + @gen.coroutine + def prepare(self): + yield gen.moment + + def on_message(self, message): + self.write_message(message) + + +class PathArgsHandler(TestWebSocketHandler): + def open(self, arg): + self.write_message(arg) + + +class CoroutineOnMessageHandler(TestWebSocketHandler): + def initialize(self, **kwargs): + super().initialize(**kwargs) + self.sleeping = 0 + + @gen.coroutine + def on_message(self, message): + if self.sleeping > 0: + self.write_message("another coroutine is already sleeping") + self.sleeping += 1 + yield gen.sleep(0.01) + self.sleeping -= 1 + self.write_message(message) + + +class RenderMessageHandler(TestWebSocketHandler): + def on_message(self, message): + self.write_message(self.render_string("message.html", message=message)) + + +class SubprotocolHandler(TestWebSocketHandler): + def initialize(self, **kwargs): + super().initialize(**kwargs) + self.select_subprotocol_called = False + + def select_subprotocol(self, subprotocols): + if self.select_subprotocol_called: + raise Exception("select_subprotocol called twice") + self.select_subprotocol_called = True + if "goodproto" in subprotocols: + return "goodproto" + return None + + def open(self): + if not self.select_subprotocol_called: + raise Exception("select_subprotocol not called") + self.write_message("subprotocol=%s" % self.selected_subprotocol) + + +class OpenCoroutineHandler(TestWebSocketHandler): + def initialize(self, test, **kwargs): + super().initialize(**kwargs) + self.test = test + self.open_finished = False + + @gen.coroutine + def open(self): + yield self.test.message_sent.wait() + yield gen.sleep(0.010) + self.open_finished = True + + def on_message(self, message): + if not self.open_finished: + raise Exception("on_message called before open finished") + self.write_message("ok") + + +class ErrorInOpenHandler(TestWebSocketHandler): + def open(self): + raise Exception("boom") + + +class ErrorInAsyncOpenHandler(TestWebSocketHandler): + async def open(self): + await asyncio.sleep(0) + raise Exception("boom") + + +class NoDelayHandler(TestWebSocketHandler): + def open(self): + self.set_nodelay(True) + self.write_message("hello") + + +class WebSocketBaseTestCase(AsyncHTTPTestCase): + def setUp(self): + super().setUp() + self.conns_to_close = [] + + def tearDown(self): + for conn in self.conns_to_close: + conn.close() + super().tearDown() + + @gen.coroutine + def ws_connect(self, path, **kwargs): + ws = yield websocket_connect( + "ws://127.0.0.1:%d%s" % (self.get_http_port(), path), **kwargs + ) + self.conns_to_close.append(ws) + raise gen.Return(ws) + + +class WebSocketTest(WebSocketBaseTestCase): + def get_app(self): + self.close_future = Future() # type: Future[None] + return Application( + [ + ("/echo", EchoHandler, dict(close_future=self.close_future)), + ("/non_ws", NonWebSocketHandler), + ("/redirect", RedirectHandler), + ("/header", HeaderHandler, dict(close_future=self.close_future)), + ( + "/header_echo", + HeaderEchoHandler, + dict(close_future=self.close_future), + ), + ( + "/close_reason", + CloseReasonHandler, + dict(close_future=self.close_future), + ), + ( + "/error_in_on_message", + ErrorInOnMessageHandler, + dict(close_future=self.close_future), + ), + ( + "/async_prepare", + AsyncPrepareHandler, + dict(close_future=self.close_future), + ), + ( + "/path_args/(.*)", + PathArgsHandler, + dict(close_future=self.close_future), + ), + ( + "/coroutine", + CoroutineOnMessageHandler, + dict(close_future=self.close_future), + ), + ("/render", RenderMessageHandler, dict(close_future=self.close_future)), + ( + "/subprotocol", + SubprotocolHandler, + dict(close_future=self.close_future), + ), + ( + "/open_coroutine", + OpenCoroutineHandler, + dict(close_future=self.close_future, test=self), + ), + ("/error_in_open", ErrorInOpenHandler), + ("/error_in_async_open", ErrorInAsyncOpenHandler), + ("/nodelay", NoDelayHandler), + ], + template_loader=DictLoader({"message.html": "{{ message }}"}), + ) + + def get_http_client(self): + # These tests require HTTP/1; force the use of SimpleAsyncHTTPClient. + return SimpleAsyncHTTPClient() + + def tearDown(self): + super().tearDown() + RequestHandler._template_loaders.clear() + + def test_http_request(self): + # WS server, HTTP client. + response = self.fetch("/echo") + self.assertEqual(response.code, 400) + + def test_missing_websocket_key(self): + response = self.fetch( + "/echo", + headers={ + "Connection": "Upgrade", + "Upgrade": "WebSocket", + "Sec-WebSocket-Version": "13", + }, + ) + self.assertEqual(response.code, 400) + + def test_bad_websocket_version(self): + response = self.fetch( + "/echo", + headers={ + "Connection": "Upgrade", + "Upgrade": "WebSocket", + "Sec-WebSocket-Version": "12", + }, + ) + self.assertEqual(response.code, 426) + + @gen_test + def test_websocket_gen(self): + ws = yield self.ws_connect("/echo") + yield ws.write_message("hello") + response = yield ws.read_message() + self.assertEqual(response, "hello") + + def test_websocket_callbacks(self): + with ignore_deprecation(): + websocket_connect( + "ws://127.0.0.1:%d/echo" % self.get_http_port(), callback=self.stop + ) + ws = self.wait().result() + ws.write_message("hello") + ws.read_message(self.stop) + response = self.wait().result() + self.assertEqual(response, "hello") + self.close_future.add_done_callback(lambda f: self.stop()) + ws.close() + self.wait() + + @gen_test + def test_binary_message(self): + ws = yield self.ws_connect("/echo") + ws.write_message(b"hello \xe9", binary=True) + response = yield ws.read_message() + self.assertEqual(response, b"hello \xe9") + + @gen_test + def test_unicode_message(self): + ws = yield self.ws_connect("/echo") + ws.write_message("hello \u00e9") + response = yield ws.read_message() + self.assertEqual(response, "hello \u00e9") + + @gen_test + def test_error_in_closed_client_write_message(self): + ws = yield self.ws_connect("/echo") + ws.close() + with self.assertRaises(WebSocketClosedError): + ws.write_message("hello \u00e9") + + @gen_test + def test_render_message(self): + ws = yield self.ws_connect("/render") + ws.write_message("hello") + response = yield ws.read_message() + self.assertEqual(response, "hello") + + @gen_test + def test_error_in_on_message(self): + ws = yield self.ws_connect("/error_in_on_message") + ws.write_message("hello") + with ExpectLog(app_log, "Uncaught exception"): + response = yield ws.read_message() + self.assertIsNone(response) + + @gen_test + def test_websocket_http_fail(self): + with self.assertRaises(HTTPError) as cm: + yield self.ws_connect("/notfound") + self.assertEqual(cm.exception.code, 404) + + @gen_test + def test_websocket_http_success(self): + with self.assertRaises(WebSocketError): + yield self.ws_connect("/non_ws") + + @gen_test + def test_websocket_http_redirect(self): + with self.assertRaises(HTTPError): + yield self.ws_connect("/redirect") + + @gen_test + def test_websocket_network_fail(self): + sock, port = bind_unused_port() + sock.close() + with self.assertRaises(IOError): + with ExpectLog(gen_log, ".*", required=False): + yield websocket_connect( + "ws://127.0.0.1:%d/" % port, connect_timeout=3600 + ) + + @gen_test + def test_websocket_close_buffered_data(self): + with contextlib.closing( + (yield websocket_connect("ws://127.0.0.1:%d/echo" % self.get_http_port())) + ) as ws: + ws.write_message("hello") + ws.write_message("world") + # Close the underlying stream. + ws.stream.close() + + @gen_test + def test_websocket_headers(self): + # Ensure that arbitrary headers can be passed through websocket_connect. + with contextlib.closing( + ( + yield websocket_connect( + HTTPRequest( + "ws://127.0.0.1:%d/header" % self.get_http_port(), + headers={"X-Test": "hello"}, + ) + ) + ) + ) as ws: + response = yield ws.read_message() + self.assertEqual(response, "hello") + + @gen_test + def test_websocket_header_echo(self): + # Ensure that headers can be returned in the response. + # Specifically, that arbitrary headers passed through websocket_connect + # can be returned. + with contextlib.closing( + ( + yield websocket_connect( + HTTPRequest( + "ws://127.0.0.1:%d/header_echo" % self.get_http_port(), + headers={"X-Test-Hello": "hello"}, + ) + ) + ) + ) as ws: + self.assertEqual(ws.headers.get("X-Test-Hello"), "hello") + self.assertEqual( + ws.headers.get("X-Extra-Response-Header"), "Extra-Response-Value" + ) + + @gen_test + def test_server_close_reason(self): + ws = yield self.ws_connect("/close_reason") + msg = yield ws.read_message() + # A message of None means the other side closed the connection. + self.assertIs(msg, None) + self.assertEqual(ws.close_code, 1001) + self.assertEqual(ws.close_reason, "goodbye") + # The on_close callback is called no matter which side closed. + code, reason = yield self.close_future + # The client echoed the close code it received to the server, + # so the server's close code (returned via close_future) is + # the same. + self.assertEqual(code, 1001) + + @gen_test + def test_client_close_reason(self): + ws = yield self.ws_connect("/echo") + ws.close(1001, "goodbye") + code, reason = yield self.close_future + self.assertEqual(code, 1001) + self.assertEqual(reason, "goodbye") + + @gen_test + def test_write_after_close(self): + ws = yield self.ws_connect("/close_reason") + msg = yield ws.read_message() + self.assertIs(msg, None) + with self.assertRaises(WebSocketClosedError): + ws.write_message("hello") + + @gen_test + def test_async_prepare(self): + # Previously, an async prepare method triggered a bug that would + # result in a timeout on test shutdown (and a memory leak). + ws = yield self.ws_connect("/async_prepare") + ws.write_message("hello") + res = yield ws.read_message() + self.assertEqual(res, "hello") + + @gen_test + def test_path_args(self): + ws = yield self.ws_connect("/path_args/hello") + res = yield ws.read_message() + self.assertEqual(res, "hello") + + @gen_test + def test_coroutine(self): + ws = yield self.ws_connect("/coroutine") + # Send both messages immediately, coroutine must process one at a time. + yield ws.write_message("hello1") + yield ws.write_message("hello2") + res = yield ws.read_message() + self.assertEqual(res, "hello1") + res = yield ws.read_message() + self.assertEqual(res, "hello2") + + @gen_test + def test_check_origin_valid_no_path(self): + port = self.get_http_port() + + url = "ws://127.0.0.1:%d/echo" % port + headers = {"Origin": "http://127.0.0.1:%d" % port} + + with contextlib.closing( + (yield websocket_connect(HTTPRequest(url, headers=headers))) + ) as ws: + ws.write_message("hello") + response = yield ws.read_message() + self.assertEqual(response, "hello") + + @gen_test + def test_check_origin_valid_with_path(self): + port = self.get_http_port() + + url = "ws://127.0.0.1:%d/echo" % port + headers = {"Origin": "http://127.0.0.1:%d/something" % port} + + with contextlib.closing( + (yield websocket_connect(HTTPRequest(url, headers=headers))) + ) as ws: + ws.write_message("hello") + response = yield ws.read_message() + self.assertEqual(response, "hello") + + @gen_test + def test_check_origin_invalid_partial_url(self): + port = self.get_http_port() + + url = "ws://127.0.0.1:%d/echo" % port + headers = {"Origin": "127.0.0.1:%d" % port} + + with self.assertRaises(HTTPError) as cm: + yield websocket_connect(HTTPRequest(url, headers=headers)) + self.assertEqual(cm.exception.code, 403) + + @gen_test + def test_check_origin_invalid(self): + port = self.get_http_port() + + url = "ws://127.0.0.1:%d/echo" % port + # Host is 127.0.0.1, which should not be accessible from some other + # domain + headers = {"Origin": "http://somewhereelse.com"} + + with self.assertRaises(HTTPError) as cm: + yield websocket_connect(HTTPRequest(url, headers=headers)) + + self.assertEqual(cm.exception.code, 403) + + @gen_test + def test_check_origin_invalid_subdomains(self): + port = self.get_http_port() + + # CaresResolver may return ipv6-only results for localhost, but our + # server is only running on ipv4. Test for this edge case and skip + # the test if it happens. + addrinfo = yield Resolver().resolve("localhost", port) + families = {addr[0] for addr in addrinfo} + if socket.AF_INET not in families: + self.skipTest("localhost does not resolve to ipv4") + return + + url = "ws://localhost:%d/echo" % port + # Subdomains should be disallowed by default. If we could pass a + # resolver to websocket_connect we could test sibling domains as well. + headers = {"Origin": "http://subtenant.localhost"} + + with self.assertRaises(HTTPError) as cm: + yield websocket_connect(HTTPRequest(url, headers=headers)) + + self.assertEqual(cm.exception.code, 403) + + @gen_test + def test_subprotocols(self): + ws = yield self.ws_connect( + "/subprotocol", subprotocols=["badproto", "goodproto"] + ) + self.assertEqual(ws.selected_subprotocol, "goodproto") + res = yield ws.read_message() + self.assertEqual(res, "subprotocol=goodproto") + + @gen_test + def test_subprotocols_not_offered(self): + ws = yield self.ws_connect("/subprotocol") + self.assertIs(ws.selected_subprotocol, None) + res = yield ws.read_message() + self.assertEqual(res, "subprotocol=None") + + @gen_test + def test_open_coroutine(self): + self.message_sent = Event() + ws = yield self.ws_connect("/open_coroutine") + yield ws.write_message("hello") + self.message_sent.set() + res = yield ws.read_message() + self.assertEqual(res, "ok") + + @gen_test + def test_error_in_open(self): + with ExpectLog(app_log, "Uncaught exception"): + ws = yield self.ws_connect("/error_in_open") + res = yield ws.read_message() + self.assertIsNone(res) + + @gen_test + def test_error_in_async_open(self): + with ExpectLog(app_log, "Uncaught exception"): + ws = yield self.ws_connect("/error_in_async_open") + res = yield ws.read_message() + self.assertIsNone(res) + + @gen_test + def test_nodelay(self): + ws = yield self.ws_connect("/nodelay") + res = yield ws.read_message() + self.assertEqual(res, "hello") + + +class NativeCoroutineOnMessageHandler(TestWebSocketHandler): + def initialize(self, **kwargs): + super().initialize(**kwargs) + self.sleeping = 0 + + async def on_message(self, message): + if self.sleeping > 0: + self.write_message("another coroutine is already sleeping") + self.sleeping += 1 + await gen.sleep(0.01) + self.sleeping -= 1 + self.write_message(message) + + +class WebSocketNativeCoroutineTest(WebSocketBaseTestCase): + def get_app(self): + return Application([("/native", NativeCoroutineOnMessageHandler)]) + + @gen_test + def test_native_coroutine(self): + ws = yield self.ws_connect("/native") + # Send both messages immediately, coroutine must process one at a time. + yield ws.write_message("hello1") + yield ws.write_message("hello2") + res = yield ws.read_message() + self.assertEqual(res, "hello1") + res = yield ws.read_message() + self.assertEqual(res, "hello2") + + +@abstract_base_test +class CompressionTestMixin(WebSocketBaseTestCase): + MESSAGE = "Hello world. Testing 123 123" + + def get_app(self): + class LimitedHandler(TestWebSocketHandler): + @property + def max_message_size(self): + return 1024 + + def on_message(self, message): + self.write_message(str(len(message))) + + return Application( + [ + ( + "/echo", + EchoHandler, + dict(compression_options=self.get_server_compression_options()), + ), + ( + "/limited", + LimitedHandler, + dict(compression_options=self.get_server_compression_options()), + ), + ] + ) + + def get_server_compression_options(self): + return None + + def get_client_compression_options(self): + return None + + def verify_wire_bytes(self, bytes_in: int, bytes_out: int) -> None: + raise NotImplementedError() + + @gen_test + def test_message_sizes(self): + ws = yield self.ws_connect( + "/echo", compression_options=self.get_client_compression_options() + ) + # Send the same message three times so we can measure the + # effect of the context_takeover options. + for i in range(3): + ws.write_message(self.MESSAGE) + response = yield ws.read_message() + self.assertEqual(response, self.MESSAGE) + self.assertEqual(ws.protocol._message_bytes_out, len(self.MESSAGE) * 3) + self.assertEqual(ws.protocol._message_bytes_in, len(self.MESSAGE) * 3) + self.verify_wire_bytes(ws.protocol._wire_bytes_in, ws.protocol._wire_bytes_out) + + @gen_test + def test_size_limit(self): + ws = yield self.ws_connect( + "/limited", compression_options=self.get_client_compression_options() + ) + # Small messages pass through. + ws.write_message("a" * 128) + response = yield ws.read_message() + self.assertEqual(response, "128") + # This message is too big after decompression, but it compresses + # down to a size that will pass the initial checks. + ws.write_message("a" * 2048) + response = yield ws.read_message() + self.assertIsNone(response) + + +@abstract_base_test +class UncompressedTestMixin(CompressionTestMixin): + """Specialization of CompressionTestMixin when we expect no compression.""" + + def verify_wire_bytes(self, bytes_in, bytes_out): + # Bytes out includes the 4-byte mask key per message. + self.assertEqual(bytes_out, 3 * (len(self.MESSAGE) + 6)) + self.assertEqual(bytes_in, 3 * (len(self.MESSAGE) + 2)) + + +class NoCompressionTest(UncompressedTestMixin): + pass + + +# If only one side tries to compress, the extension is not negotiated. +class ServerOnlyCompressionTest(UncompressedTestMixin): + def get_server_compression_options(self): + return {} + + +class ClientOnlyCompressionTest(UncompressedTestMixin): + def get_client_compression_options(self): + return {} + + +class DefaultCompressionTest(CompressionTestMixin): + def get_server_compression_options(self): + return {} + + def get_client_compression_options(self): + return {} + + def verify_wire_bytes(self, bytes_in, bytes_out): + self.assertLess(bytes_out, 3 * (len(self.MESSAGE) + 6)) + self.assertLess(bytes_in, 3 * (len(self.MESSAGE) + 2)) + # Bytes out includes the 4 bytes mask key per message. + self.assertEqual(bytes_out, bytes_in + 12) + + +@abstract_base_test +class MaskFunctionMixin(unittest.TestCase): + # Subclasses should define self.mask(mask, data) + def mask(self, mask: bytes, data: bytes) -> bytes: + raise NotImplementedError() + + def test_mask(self: typing.Any): + self.assertEqual(self.mask(b"abcd", b""), b"") + self.assertEqual(self.mask(b"abcd", b"b"), b"\x03") + self.assertEqual(self.mask(b"abcd", b"54321"), b"TVPVP") + self.assertEqual(self.mask(b"ZXCV", b"98765432"), b"c`t`olpd") + # Include test cases with \x00 bytes (to ensure that the C + # extension isn't depending on null-terminated strings) and + # bytes with the high bit set (to smoke out signedness issues). + self.assertEqual( + self.mask(b"\x00\x01\x02\x03", b"\xff\xfb\xfd\xfc\xfe\xfa"), + b"\xff\xfa\xff\xff\xfe\xfb", + ) + self.assertEqual( + self.mask(b"\xff\xfb\xfd\xfc", b"\x00\x01\x02\x03\x04\x05"), + b"\xff\xfa\xff\xff\xfb\xfe", + ) + + +class PythonMaskFunctionTest(MaskFunctionMixin): + def mask(self, mask, data): + return _websocket_mask_python(mask, data) + + +@unittest.skipIf(speedups is None, "tornado.speedups module not present") +class CythonMaskFunctionTest(MaskFunctionMixin): + def mask(self, mask, data): + return speedups.websocket_mask(mask, data) + + +class ServerPeriodicPingTest(WebSocketBaseTestCase): + def get_app(self): + class PingHandler(TestWebSocketHandler): + def on_pong(self, data): + self.write_message("got pong") + + return Application( + [("/", PingHandler)], + websocket_ping_interval=0.01, + websocket_ping_timeout=0, + ) + + @gen_test + def test_server_ping(self): + ws = yield self.ws_connect("/") + for i in range(3): + response = yield ws.read_message() + self.assertEqual(response, "got pong") + # TODO: test that the connection gets closed if ping responses stop. + + +class ClientPeriodicPingTest(WebSocketBaseTestCase): + def get_app(self): + class PingHandler(TestWebSocketHandler): + def on_ping(self, data): + self.write_message("got ping") + + return Application([("/", PingHandler)]) + + @gen_test + def test_client_ping(self): + ws = yield self.ws_connect("/", ping_interval=0.01, ping_timeout=0) + for i in range(3): + response = yield ws.read_message() + self.assertEqual(response, "got ping") + ws.close() + + +class ServerPingTimeoutTest(WebSocketBaseTestCase): + def get_app(self): + self.handlers: list[WebSocketHandler] = [] + test = self + + class PingHandler(TestWebSocketHandler): + def initialize(self, close_future=None, compression_options=None): + self.handlers = test.handlers + # capture the handler instance so we can interrogate it later + self.handlers.append(self) + return super().initialize( + close_future=close_future, compression_options=compression_options + ) + + app = Application([("/", PingHandler)]) + return app + + @staticmethod + def install_hook(ws): + """Optionally suppress the client's "pong" response.""" + + ws.drop_pongs = False + ws.pongs_received = 0 + + def wrapper(fcn): + def _inner(opcode: int, data: bytes): + if opcode == 0xA: # NOTE: 0x9=ping, 0xA=pong + ws.pongs_received += 1 + if ws.drop_pongs: + # prevent pong responses + return + # leave all other responses unchanged + return fcn(opcode, data) + + return _inner + + ws.protocol._handle_message = wrapper(ws.protocol._handle_message) + + @gen_test + def test_client_ping_timeout(self): + # websocket client + interval = 0.2 + ws = yield self.ws_connect( + "/", ping_interval=interval, ping_timeout=interval / 4 + ) + self.install_hook(ws) + + # websocket handler (server side) + handler = self.handlers[0] + + for _ in range(5): + # wait for the ping period + yield gen.sleep(interval) + + # connection should still be open from the server end + self.assertIsNone(handler.close_code) + self.assertIsNone(handler.close_reason) + + # connection should still be open from the client end + assert ws.protocol.close_code is None + + # Check that our hook is intercepting messages; allow for + # some variance in timing (due to e.g. cpu load) + self.assertGreaterEqual(ws.pongs_received, 4) + + # suppress the pong response message + ws.drop_pongs = True + + # give the server time to register this + yield gen.sleep(interval * 1.5) + + # connection should be closed from the server side + self.assertEqual(handler.close_code, 1000) + self.assertEqual(handler.close_reason, "ping timed out") + + # client should have received a close operation + self.assertEqual(ws.protocol.close_code, 1000) + + +class PingCalculationTest(unittest.TestCase): + def test_ping_sleep_time(self): + from tornado.websocket import WebSocketProtocol13 + + now = datetime.datetime(2025, 1, 1, 12, 0, 0, tzinfo=datetime.timezone.utc) + interval = 10 # seconds + last_ping_time = datetime.datetime( + 2025, 1, 1, 11, 59, 54, tzinfo=datetime.timezone.utc + ) + sleep_time = WebSocketProtocol13.ping_sleep_time( + last_ping_time=last_ping_time.timestamp(), + interval=interval, + now=now.timestamp(), + ) + self.assertEqual(sleep_time, 4) + + +class ManualPingTest(WebSocketBaseTestCase): + def get_app(self): + class PingHandler(TestWebSocketHandler): + def on_ping(self, data): + self.write_message(data, binary=isinstance(data, bytes)) + + return Application([("/", PingHandler)]) + + @gen_test + def test_manual_ping(self): + ws = yield self.ws_connect("/") + + self.assertRaises(ValueError, ws.ping, "a" * 126) + + ws.ping("hello") + resp = yield ws.read_message() + # on_ping always sees bytes. + self.assertEqual(resp, b"hello") + + ws.ping(b"binary hello") + resp = yield ws.read_message() + self.assertEqual(resp, b"binary hello") + + +class MaxMessageSizeTest(WebSocketBaseTestCase): + def get_app(self): + return Application([("/", EchoHandler)], websocket_max_message_size=1024) + + @gen_test + def test_large_message(self): + ws = yield self.ws_connect("/") + + # Write a message that is allowed. + msg = "a" * 1024 + ws.write_message(msg) + resp = yield ws.read_message() + self.assertEqual(resp, msg) + + # Write a message that is too large. + ws.write_message(msg + "b") + resp = yield ws.read_message() + # A message of None means the other side closed the connection. + self.assertIs(resp, None) + self.assertEqual(ws.close_code, 1009) + self.assertEqual(ws.close_reason, "message too big") + # TODO: Needs tests of messages split over multiple + # continuation frames. diff --git a/.venv/lib/python3.13/site-packages/tornado/test/wsgi_test.py b/.venv/lib/python3.13/site-packages/tornado/test/wsgi_test.py new file mode 100644 index 0000000000000000000000000000000000000000..9fbc744e11f012e7622e07fcff53ddb25e577c00 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/tornado/test/wsgi_test.py @@ -0,0 +1,116 @@ +import asyncio +import concurrent.futures +import threading + +from wsgiref.validate import validator + +from tornado.routing import RuleRouter +from tornado.testing import AsyncHTTPTestCase, gen_test +from tornado.wsgi import WSGIContainer + + +class WSGIAppMixin: + # TODO: Now that WSGIAdapter is gone, this is a pretty weak test. + def get_executor(self): + raise NotImplementedError() + + def get_app(self): + executor = self.get_executor() + # The barrier test in DummyExecutorTest will always wait the full + # value of this timeout, so we don't want it to be too high. + self.barrier = threading.Barrier(2, timeout=0.3) + + def make_container(app): + return WSGIContainer(validator(app), executor=executor) + + return RuleRouter( + [ + ("/simple", make_container(self.simple_wsgi_app)), + ("/barrier", make_container(self.barrier_wsgi_app)), + ("/streaming_barrier", make_container(self.streaming_barrier_wsgi_app)), + ] + ) + + def respond_plain(self, start_response): + status = "200 OK" + response_headers = [("Content-Type", "text/plain")] + start_response(status, response_headers) + + def simple_wsgi_app(self, environ, start_response): + self.respond_plain(start_response) + return [b"Hello world!"] + + def barrier_wsgi_app(self, environ, start_response): + self.respond_plain(start_response) + try: + n = self.barrier.wait() + except threading.BrokenBarrierError: + return [b"broken barrier"] + else: + return [b"ok %d" % n] + + def streaming_barrier_wsgi_app(self, environ, start_response): + self.respond_plain(start_response) + yield b"ok " + try: + n = self.barrier.wait() + except threading.BrokenBarrierError: + yield b"broken barrier" + else: + yield b"%d" % n + + +class WSGIContainerDummyExecutorTest(WSGIAppMixin, AsyncHTTPTestCase): + def get_executor(self): + return None + + def test_simple(self): + response = self.fetch("/simple") + self.assertEqual(response.body, b"Hello world!") + + @gen_test + async def test_concurrent_barrier(self): + self.barrier.reset() + resps = await asyncio.gather( + self.http_client.fetch(self.get_url("/barrier")), + self.http_client.fetch(self.get_url("/barrier")), + ) + for resp in resps: + self.assertEqual(resp.body, b"broken barrier") + + @gen_test + async def test_concurrent_streaming_barrier(self): + self.barrier.reset() + resps = await asyncio.gather( + self.http_client.fetch(self.get_url("/streaming_barrier")), + self.http_client.fetch(self.get_url("/streaming_barrier")), + ) + for resp in resps: + self.assertEqual(resp.body, b"ok broken barrier") + + +class WSGIContainerThreadPoolTest(WSGIAppMixin, AsyncHTTPTestCase): + def get_executor(self): + return concurrent.futures.ThreadPoolExecutor() + + def test_simple(self): + response = self.fetch("/simple") + self.assertEqual(response.body, b"Hello world!") + + @gen_test + async def test_concurrent_barrier(self): + self.barrier.reset() + resps = await asyncio.gather( + self.http_client.fetch(self.get_url("/barrier")), + self.http_client.fetch(self.get_url("/barrier")), + ) + self.assertEqual([b"ok 0", b"ok 1"], sorted([resp.body for resp in resps])) + + @gen_test + async def test_concurrent_streaming_barrier(self): + self.barrier.reset() + resps = await asyncio.gather( + self.http_client.fetch(self.get_url("/streaming_barrier")), + self.http_client.fetch(self.get_url("/streaming_barrier")), + ) + self.assertEqual([b"ok 0", b"ok 1"], sorted([resp.body for resp in resps])) diff --git a/.venv/lib/python3.13/site-packages/wcwidth-0.5.0.dist-info/licenses/LICENSE b/.venv/lib/python3.13/site-packages/wcwidth-0.5.0.dist-info/licenses/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a44c0757243a785b0b73c21a38c45f44a4a2c32f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/wcwidth-0.5.0.dist-info/licenses/LICENSE @@ -0,0 +1,27 @@ +The MIT License (MIT) + +Copyright (c) 2014 Jeff Quast + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +Markus Kuhn -- 2007-05-26 (Unicode 5.0) + +Permission to use, copy, modify, and distribute this software +for any purpose and without fee is hereby granted. The author +disclaims all warranties with regard to this software. diff --git a/.venv/lib/python3.13/site-packages/yaml/__pycache__/__init__.cpython-313.pyc b/.venv/lib/python3.13/site-packages/yaml/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c70cfa2f9761f3667f6f46bfe06bbe06fe3856dd Binary files /dev/null and b/.venv/lib/python3.13/site-packages/yaml/__pycache__/__init__.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/yaml/__pycache__/composer.cpython-313.pyc b/.venv/lib/python3.13/site-packages/yaml/__pycache__/composer.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c169bfe774722636ccee93b861b024eb26f3e847 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/yaml/__pycache__/composer.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/yaml/__pycache__/constructor.cpython-313.pyc b/.venv/lib/python3.13/site-packages/yaml/__pycache__/constructor.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f3ed4d15641f72edd713ed8e08ef0535969704e2 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/yaml/__pycache__/constructor.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/yaml/__pycache__/cyaml.cpython-313.pyc b/.venv/lib/python3.13/site-packages/yaml/__pycache__/cyaml.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ee95811f6de3b3878f0ea699e2566c2020537dc1 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/yaml/__pycache__/cyaml.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/yaml/__pycache__/dumper.cpython-313.pyc b/.venv/lib/python3.13/site-packages/yaml/__pycache__/dumper.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5ebed2c60ba8e1386c60d4a941e81ddd2d04fd68 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/yaml/__pycache__/dumper.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/yaml/__pycache__/emitter.cpython-313.pyc b/.venv/lib/python3.13/site-packages/yaml/__pycache__/emitter.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c95ccff56fa0b3f6889d7c5ab766b76c215af18a Binary files /dev/null and b/.venv/lib/python3.13/site-packages/yaml/__pycache__/emitter.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/yaml/__pycache__/error.cpython-313.pyc b/.venv/lib/python3.13/site-packages/yaml/__pycache__/error.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a8610884e7edd4c9a29255ec52bbdbf157c1eed7 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/yaml/__pycache__/error.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/yaml/__pycache__/events.cpython-313.pyc b/.venv/lib/python3.13/site-packages/yaml/__pycache__/events.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e721d1b82e19ad721df944c699a77b08f049eb84 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/yaml/__pycache__/events.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/yaml/__pycache__/loader.cpython-313.pyc b/.venv/lib/python3.13/site-packages/yaml/__pycache__/loader.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..87ef0a7b8ee81b6a23b3e1d2bf91d2d73ac635e6 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/yaml/__pycache__/loader.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/yaml/__pycache__/nodes.cpython-313.pyc b/.venv/lib/python3.13/site-packages/yaml/__pycache__/nodes.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b5b639b777f22b82bd472d5011f50670f1d0d8f5 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/yaml/__pycache__/nodes.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/yaml/__pycache__/parser.cpython-313.pyc b/.venv/lib/python3.13/site-packages/yaml/__pycache__/parser.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d4ee50aaa2e648cc13d1922d9d429b42fd01bf8e Binary files /dev/null and b/.venv/lib/python3.13/site-packages/yaml/__pycache__/parser.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/yaml/__pycache__/reader.cpython-313.pyc b/.venv/lib/python3.13/site-packages/yaml/__pycache__/reader.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ef254ed39ee101c5d1a3d1480cee1cf981192537 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/yaml/__pycache__/reader.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/yaml/__pycache__/representer.cpython-313.pyc b/.venv/lib/python3.13/site-packages/yaml/__pycache__/representer.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d942c607176c0d936bf9ea5f57d88c6841f9025b Binary files /dev/null and b/.venv/lib/python3.13/site-packages/yaml/__pycache__/representer.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/yaml/__pycache__/resolver.cpython-313.pyc b/.venv/lib/python3.13/site-packages/yaml/__pycache__/resolver.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..66ca7a49d178100a0329d7436011708758783e6b Binary files /dev/null and b/.venv/lib/python3.13/site-packages/yaml/__pycache__/resolver.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/yaml/__pycache__/scanner.cpython-313.pyc b/.venv/lib/python3.13/site-packages/yaml/__pycache__/scanner.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3491525432a33b27d8a72846bf551041a411bb3b Binary files /dev/null and b/.venv/lib/python3.13/site-packages/yaml/__pycache__/scanner.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/yaml/__pycache__/serializer.cpython-313.pyc b/.venv/lib/python3.13/site-packages/yaml/__pycache__/serializer.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..aa9b483020e93d62c5b727278bd00442db076286 Binary files /dev/null and b/.venv/lib/python3.13/site-packages/yaml/__pycache__/serializer.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/yaml/__pycache__/tokens.cpython-313.pyc b/.venv/lib/python3.13/site-packages/yaml/__pycache__/tokens.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7dce88bc4732d49331ff16531b01475395ae071e Binary files /dev/null and b/.venv/lib/python3.13/site-packages/yaml/__pycache__/tokens.cpython-313.pyc differ diff --git a/.venv/lib/python3.13/site-packages/zipp-3.23.0.dist-info/licenses/LICENSE b/.venv/lib/python3.13/site-packages/zipp-3.23.0.dist-info/licenses/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..f60bd572013c6abcb3a82ba9b50d84935de6394f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/zipp-3.23.0.dist-info/licenses/LICENSE @@ -0,0 +1,18 @@ +MIT License + +Copyright (c) 2025 + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO +EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE.