diff --git a/third-party/thrift/src/thrift/compiler/generate/t_py_generator.cc b/third-party/thrift/src/thrift/compiler/generate/t_py_generator.cc index 19dd2571f20768..92094f7a354d8c 100644 --- a/third-party/thrift/src/thrift/compiler/generate/t_py_generator.cc +++ b/third-party/thrift/src/thrift/compiler/generate/t_py_generator.cc @@ -2270,6 +2270,20 @@ void t_py_generator::generate_py_converter_helpers( << endl; indent_down(); + out << indent() << "def _to_mutable_python(self):" << endl; + indent_up(); + out << indent() << "import importlib" << endl + << indent() << "import thrift.python.mutable_converter" << endl + << indent() << "python_mutable_types = importlib.import_module(\"" + << python_namespace << ".thrift_mutable_types\")" << endl + << indent() << "return " + << "thrift.python.mutable_converter.to_mutable_python_struct_or_union(" + << "python_mutable_types." + << rename_reserved_keywords(tstruct->get_name()) << ", self" << ")" + << endl + << endl; + indent_down(); + auto py3_namespace = get_py3_namespace_with_name_and_prefix(program_, ""); out << indent() << "def _to_py3(self):" << endl; indent_up(); diff --git a/third-party/thrift/src/thrift/compiler/generate/templates/pyi/ttypes.pyi.mustache b/third-party/thrift/src/thrift/compiler/generate/templates/pyi/ttypes.pyi.mustache index ee12cc9738f67d..52db9acd660041 100644 --- a/third-party/thrift/src/thrift/compiler/generate/templates/pyi/ttypes.pyi.mustache +++ b/third-party/thrift/src/thrift/compiler/generate/templates/pyi/ttypes.pyi.mustache @@ -105,6 +105,7 @@ class {{struct:name}}{{#struct:exception?}}(Thrift.TException){{/struct:exceptio def __dir__(self) -> __T.Sequence[str]: ... {{!TODO: accommodate root_module_prefix}} def _to_python(self) -> "{{#program:pythonNamespaces}}{{value}}.{{/program:pythonNamespaces}}{{program:name}}.thrift_types.{{struct:name}}": ... # type: ignore + def _to_mutable_python(self) -> "{{#program:pythonNamespaces}}{{value}}.{{/program:pythonNamespaces}}{{program:name}}.thrift_mutable_types.{{struct:name}}": ... # type: ignore def _to_py3(self) -> "{{#program:py3Namespaces}}{{value}}.{{/program:py3Namespaces}}{{program:name}}.types.{{struct:name}}": ... # type: ignore def _to_py_deprecated(self) -> {{struct:name}}: ... {{/program:structs}} diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/module/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/module/ttypes.py index 149ab758d3c550..5b805ab8813511 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/module/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/module/ttypes.py @@ -219,6 +219,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.MyAnnotation, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MyAnnotation, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -851,6 +857,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.Foo, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Foo, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1159,6 +1171,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.Baz, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Baz, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1435,6 +1453,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.Bar, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Bar, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1549,6 +1573,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.DirectlyAdapted, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DirectlyAdapted, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1663,6 +1693,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.IndependentDirectlyAdapted, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.IndependentDirectlyAdapted, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1834,6 +1870,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.StructWithFieldAdapter, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.StructWithFieldAdapter, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1999,6 +2041,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.TerseAdaptedFields, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.TerseAdaptedFields, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2113,6 +2161,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.B, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.B, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2204,6 +2258,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.A, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.A, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2316,6 +2376,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.Config, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Config, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2462,6 +2528,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.MyStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MyStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2729,6 +2801,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.AdaptTestStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AdaptTestStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -3316,6 +3394,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.AdaptTemplatedTestStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AdaptTemplatedTestStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -3430,6 +3514,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.AdaptTemplatedNestedTestStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AdaptTemplatedNestedTestStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -3589,6 +3679,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.AdaptTestUnion, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AdaptTestUnion, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -3701,6 +3797,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.AdaptedStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AdaptedStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -3813,6 +3915,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.DirectlyAdaptedStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DirectlyAdaptedStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -3984,6 +4092,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.StructFieldAdaptedStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.StructFieldAdaptedStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -4098,6 +4212,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.CircularAdaptee, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.CircularAdaptee, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -4212,6 +4332,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.CircularStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.CircularStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -4326,6 +4452,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.ReorderedStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ReorderedStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -4417,6 +4549,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.DeclaredAfterStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DeclaredAfterStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -4529,6 +4667,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.RenamedStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RenamedStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -4641,6 +4785,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.SameNamespaceStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.SameNamespaceStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -4732,6 +4882,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.HeapAllocated, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.HeapAllocated, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -4846,6 +5002,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.MoveOnly, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MoveOnly, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -4958,6 +5120,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.AlsoMoveOnly, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AlsoMoveOnly, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -5049,6 +5217,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.ApplyAdapter, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ApplyAdapter, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -5140,6 +5314,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.TransitiveAdapted, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.TransitiveAdapted, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -5286,6 +5466,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.CountingStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.CountingStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -5398,6 +5584,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.Person, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Person, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -5510,6 +5702,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.Person2, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Person2, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -5624,6 +5822,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.RenamedStructWithStructAdapterAndFieldAdapter, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RenamedStructWithStructAdapterAndFieldAdapter, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/thrift/annotation/cpp/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/thrift/annotation/cpp/ttypes.py index 520b681121a61e..8d60067bbe8759 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/thrift/annotation/cpp/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/thrift/annotation/cpp/ttypes.py @@ -209,6 +209,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Name, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Name, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -353,6 +359,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Type, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Type, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -479,6 +491,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Ref, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Ref, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -607,6 +625,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Lazy, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Lazy, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -698,6 +722,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.DisableLazyChecksum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DisableLazyChecksum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -924,6 +954,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Adapter, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Adapter, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1040,6 +1076,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.PackIsset, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.PackIsset, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1158,6 +1200,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.MinimizePadding, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MinimizePadding, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1249,6 +1297,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.ScopedEnumAsUnionType, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ScopedEnumAsUnionType, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1403,6 +1457,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.FieldInterceptor, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.FieldInterceptor, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1494,6 +1554,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.UseOpEncode, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.UseOpEncode, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1630,6 +1696,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.EnumType, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.EnumType, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1724,6 +1796,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Frozen2Exclude, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Frozen2Exclude, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1819,6 +1897,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Frozen2RequiresCompleteContainerParams, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Frozen2RequiresCompleteContainerParams, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1921,6 +2005,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.ProcessInEbThreadUnsafe, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ProcessInEbThreadUnsafe, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2015,6 +2105,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.RuntimeAnnotation, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RuntimeAnnotation, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2112,6 +2208,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.UseCursorSerialization, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.UseCursorSerialization, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2220,6 +2322,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.GenerateDeprecatedHeaderClientMethods, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.GenerateDeprecatedHeaderClientMethods, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/thrift/annotation/hack/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/thrift/annotation/hack/ttypes.py index b4e6be4c1c008e..01b0bd0e63955a 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/thrift/annotation/hack/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/thrift/annotation/hack/ttypes.py @@ -165,6 +165,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.FieldWrapper, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.FieldWrapper, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -324,6 +330,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.Wrapper, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Wrapper, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -469,6 +481,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.Adapter, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Adapter, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -581,6 +599,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.SkipCodegen, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.SkipCodegen, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -715,6 +739,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.Name, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Name, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -844,6 +874,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.UnionEnumAttributes, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.UnionEnumAttributes, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -958,6 +994,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.StructTrait, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.StructTrait, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1125,6 +1167,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.Attributes, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Attributes, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1216,6 +1264,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.StructAsTrait, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.StructAsTrait, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1310,6 +1364,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.ModuleInternal, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ModuleInternal, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/thrift/annotation/python/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/thrift/annotation/python/ttypes.py index 0b2ef9b23a383d..57575359bd6d3d 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/thrift/annotation/python/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/thrift/annotation/python/ttypes.py @@ -139,6 +139,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.python.thrift_types") return thrift.python.converter.to_python_struct(python_types.Py3Hidden, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.python.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Py3Hidden, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -253,6 +259,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.python.thrift_types") return thrift.python.converter.to_python_struct(python_types.PyDeprecatedHidden, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.python.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.PyDeprecatedHidden, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -344,6 +356,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.python.thrift_types") return thrift.python.converter.to_python_struct(python_types.Flags, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.python.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Flags, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -456,6 +474,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.python.thrift_types") return thrift.python.converter.to_python_struct(python_types.Name, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.python.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Name, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -618,6 +642,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.python.thrift_types") return thrift.python.converter.to_python_struct(python_types.Adapter, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.python.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Adapter, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -736,6 +766,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.python.thrift_types") return thrift.python.converter.to_python_struct(python_types.UseCAPI, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.python.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.UseCAPI, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -830,6 +866,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.python.thrift_types") return thrift.python.converter.to_python_struct(python_types.Py3EnableCppAdapter, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.python.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Py3EnableCppAdapter, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/thrift/annotation/rust/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/thrift/annotation/rust/ttypes.py index dd0b832407005e..32f74a2550a02f 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/thrift/annotation/rust/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/thrift/annotation/rust/ttypes.py @@ -157,6 +157,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_types") return thrift.python.converter.to_python_struct(python_types.Name, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Name, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -248,6 +254,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_types") return thrift.python.converter.to_python_struct(python_types.Copy, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Copy, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -339,6 +351,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_types") return thrift.python.converter.to_python_struct(python_types.RequestContext, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RequestContext, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -430,6 +448,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_types") return thrift.python.converter.to_python_struct(python_types.Arc, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Arc, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -521,6 +545,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_types") return thrift.python.converter.to_python_struct(python_types.Box, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Box, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -612,6 +642,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_types") return thrift.python.converter.to_python_struct(python_types.Exhaustive, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Exhaustive, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -703,6 +739,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_types") return thrift.python.converter.to_python_struct(python_types.Ord, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Ord, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -794,6 +836,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_types") return thrift.python.converter.to_python_struct(python_types.NewType, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.NewType, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -906,6 +954,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_types") return thrift.python.converter.to_python_struct(python_types.Type, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Type, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1018,6 +1072,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_types") return thrift.python.converter.to_python_struct(python_types.Serde, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Serde, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1130,6 +1190,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_types") return thrift.python.converter.to_python_struct(python_types.Mod, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Mod, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1242,6 +1308,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_types") return thrift.python.converter.to_python_struct(python_types.Adapter, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Adapter, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1369,6 +1441,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_types") return thrift.python.converter.to_python_struct(python_types.Derive, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Derive, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1481,6 +1559,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_types") return thrift.python.converter.to_python_struct(python_types.ServiceExn, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.rust.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ServiceExn, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/thrift/annotation/scope/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/thrift/annotation/scope/ttypes.py index c08f21be9694a5..c4c5c8179665df 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/thrift/annotation/scope/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/thrift/annotation/scope/ttypes.py @@ -161,6 +161,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Transitive, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Transitive, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -258,6 +264,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Program, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Program, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -352,6 +364,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Struct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Struct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -446,6 +464,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Union, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Union, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -540,6 +564,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Exception, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Exception, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -634,6 +664,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Field, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Field, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -728,6 +764,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Typedef, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Typedef, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -822,6 +864,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Service, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Service, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -916,6 +964,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Interaction, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Interaction, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1010,6 +1064,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Function, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Function, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1104,6 +1164,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.EnumValue, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.EnumValue, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1198,6 +1264,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Const, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Const, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1289,6 +1361,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Enum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Enum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1383,6 +1461,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Structured, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Structured, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1477,6 +1561,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Interface, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Interface, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1571,6 +1661,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.RootDefinition, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RootDefinition, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1665,6 +1761,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Definition, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Definition, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1760,6 +1862,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.DisableSchemaConst, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DisableSchemaConst, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/thrift/annotation/thrift/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/thrift/annotation/thrift/ttypes.py index 386d80397db35f..2447eaa8e64b55 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/thrift/annotation/thrift/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/py/gen-py/thrift/annotation/thrift/ttypes.py @@ -165,6 +165,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Experimental, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Experimental, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -355,6 +361,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.ReserveIds, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ReserveIds, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -470,6 +482,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.RequiresBackwardCompatibility, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RequiresBackwardCompatibility, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -574,6 +592,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.TerseWrite, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.TerseWrite, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -696,6 +720,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Box, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Box, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -791,6 +821,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Mixin, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Mixin, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -890,6 +926,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.SerializeInFieldIdOrder, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.SerializeInFieldIdOrder, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -985,6 +1027,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.BitmaskEnum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.BitmaskEnum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1098,6 +1146,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.ExceptionMessage, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ExceptionMessage, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1193,6 +1247,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.InternBox, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.InternBox, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1287,6 +1347,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Serial, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Serial, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1401,6 +1467,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Uri, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Uri, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1523,6 +1595,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Priority, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Priority, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1656,6 +1734,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.DeprecatedUnvalidatedAnnotations, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DeprecatedUnvalidatedAnnotations, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1757,6 +1841,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.AllowReservedIdentifier, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AllowReservedIdentifier, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1848,6 +1938,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.AllowReservedFilename, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AllowReservedFilename, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/module/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/module/ttypes.pyi index be9ed7c206f29f..0822c0c16cafd5 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/module/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/module/ttypes.pyi @@ -72,6 +72,7 @@ class MyAnnotation: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.MyAnnotation": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.MyAnnotation": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.MyAnnotation": ... # type: ignore def _to_py_deprecated(self) -> MyAnnotation: ... @@ -175,6 +176,7 @@ class Foo: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.Foo": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.Foo": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.Foo": ... # type: ignore def _to_py_deprecated(self) -> Foo: ... @@ -227,6 +229,7 @@ class Baz: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.Baz": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.Baz": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.Baz": ... # type: ignore def _to_py_deprecated(self) -> Baz: ... @@ -290,6 +293,7 @@ class Bar: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.Bar": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.Bar": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.Bar": ... # type: ignore def _to_py_deprecated(self) -> Bar: ... @@ -323,6 +327,7 @@ class DirectlyAdapted: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.DirectlyAdapted": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.DirectlyAdapted": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.DirectlyAdapted": ... # type: ignore def _to_py_deprecated(self) -> DirectlyAdapted: ... @@ -356,6 +361,7 @@ class IndependentDirectlyAdapted: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.IndependentDirectlyAdapted": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.IndependentDirectlyAdapted": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.IndependentDirectlyAdapted": ... # type: ignore def _to_py_deprecated(self) -> IndependentDirectlyAdapted: ... @@ -404,6 +410,7 @@ class StructWithFieldAdapter: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.StructWithFieldAdapter": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.StructWithFieldAdapter": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.StructWithFieldAdapter": ... # type: ignore def _to_py_deprecated(self) -> StructWithFieldAdapter: ... @@ -447,6 +454,7 @@ class TerseAdaptedFields: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.TerseAdaptedFields": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.TerseAdaptedFields": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.TerseAdaptedFields": ... # type: ignore def _to_py_deprecated(self) -> TerseAdaptedFields: ... @@ -480,6 +488,7 @@ class B: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.B": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.B": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.B": ... # type: ignore def _to_py_deprecated(self) -> B: ... @@ -508,6 +517,7 @@ class A: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.A": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.A": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.A": ... # type: ignore def _to_py_deprecated(self) -> A: ... @@ -541,6 +551,7 @@ class Config: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.Config": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.Config": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.Config": ... # type: ignore def _to_py_deprecated(self) -> Config: ... @@ -579,6 +590,7 @@ class MyStruct: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.MyStruct": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.MyStruct": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.MyStruct": ... # type: ignore def _to_py_deprecated(self) -> MyStruct: ... @@ -657,6 +669,7 @@ class AdaptTestStruct: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.AdaptTestStruct": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.AdaptTestStruct": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.AdaptTestStruct": ... # type: ignore def _to_py_deprecated(self) -> AdaptTestStruct: ... @@ -795,6 +808,7 @@ class AdaptTemplatedTestStruct: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.AdaptTemplatedTestStruct": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.AdaptTemplatedTestStruct": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.AdaptTemplatedTestStruct": ... # type: ignore def _to_py_deprecated(self) -> AdaptTemplatedTestStruct: ... @@ -828,6 +842,7 @@ class AdaptTemplatedNestedTestStruct: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.AdaptTemplatedNestedTestStruct": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.AdaptTemplatedNestedTestStruct": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.AdaptTemplatedNestedTestStruct": ... # type: ignore def _to_py_deprecated(self) -> AdaptTemplatedNestedTestStruct: ... @@ -868,6 +883,7 @@ class AdaptTestUnion: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.AdaptTestUnion": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.AdaptTestUnion": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.AdaptTestUnion": ... # type: ignore def _to_py_deprecated(self) -> AdaptTestUnion: ... @@ -901,6 +917,7 @@ class AdaptedStruct: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.AdaptedStruct": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.AdaptedStruct": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.AdaptedStruct": ... # type: ignore def _to_py_deprecated(self) -> AdaptedStruct: ... @@ -934,6 +951,7 @@ class DirectlyAdaptedStruct: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.DirectlyAdaptedStruct": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.DirectlyAdaptedStruct": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.DirectlyAdaptedStruct": ... # type: ignore def _to_py_deprecated(self) -> DirectlyAdaptedStruct: ... @@ -982,6 +1000,7 @@ class StructFieldAdaptedStruct: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.StructFieldAdaptedStruct": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.StructFieldAdaptedStruct": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.StructFieldAdaptedStruct": ... # type: ignore def _to_py_deprecated(self) -> StructFieldAdaptedStruct: ... @@ -1015,6 +1034,7 @@ class CircularAdaptee: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.CircularAdaptee": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.CircularAdaptee": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.CircularAdaptee": ... # type: ignore def _to_py_deprecated(self) -> CircularAdaptee: ... @@ -1048,6 +1068,7 @@ class CircularStruct: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.CircularStruct": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.CircularStruct": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.CircularStruct": ... # type: ignore def _to_py_deprecated(self) -> CircularStruct: ... @@ -1081,6 +1102,7 @@ class ReorderedStruct: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.ReorderedStruct": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.ReorderedStruct": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.ReorderedStruct": ... # type: ignore def _to_py_deprecated(self) -> ReorderedStruct: ... @@ -1109,6 +1131,7 @@ class DeclaredAfterStruct: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.DeclaredAfterStruct": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.DeclaredAfterStruct": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.DeclaredAfterStruct": ... # type: ignore def _to_py_deprecated(self) -> DeclaredAfterStruct: ... @@ -1142,6 +1165,7 @@ class RenamedStruct: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.RenamedStruct": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.RenamedStruct": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.RenamedStruct": ... # type: ignore def _to_py_deprecated(self) -> RenamedStruct: ... @@ -1175,6 +1199,7 @@ class SameNamespaceStruct: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.SameNamespaceStruct": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.SameNamespaceStruct": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.SameNamespaceStruct": ... # type: ignore def _to_py_deprecated(self) -> SameNamespaceStruct: ... @@ -1203,6 +1228,7 @@ class HeapAllocated: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.HeapAllocated": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.HeapAllocated": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.HeapAllocated": ... # type: ignore def _to_py_deprecated(self) -> HeapAllocated: ... @@ -1236,6 +1262,7 @@ class MoveOnly: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.MoveOnly": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.MoveOnly": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.MoveOnly": ... # type: ignore def _to_py_deprecated(self) -> MoveOnly: ... @@ -1269,6 +1296,7 @@ class AlsoMoveOnly: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.AlsoMoveOnly": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.AlsoMoveOnly": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.AlsoMoveOnly": ... # type: ignore def _to_py_deprecated(self) -> AlsoMoveOnly: ... @@ -1297,6 +1325,7 @@ class ApplyAdapter: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.ApplyAdapter": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.ApplyAdapter": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.ApplyAdapter": ... # type: ignore def _to_py_deprecated(self) -> ApplyAdapter: ... @@ -1325,6 +1354,7 @@ class TransitiveAdapted: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.TransitiveAdapted": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.TransitiveAdapted": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.TransitiveAdapted": ... # type: ignore def _to_py_deprecated(self) -> TransitiveAdapted: ... @@ -1368,6 +1398,7 @@ class CountingStruct: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.CountingStruct": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.CountingStruct": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.CountingStruct": ... # type: ignore def _to_py_deprecated(self) -> CountingStruct: ... @@ -1401,6 +1432,7 @@ class Person: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.Person": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.Person": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.Person": ... # type: ignore def _to_py_deprecated(self) -> Person: ... @@ -1434,6 +1466,7 @@ class Person2: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.Person2": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.Person2": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.Person2": ... # type: ignore def _to_py_deprecated(self) -> Person2: ... @@ -1467,6 +1500,7 @@ class RenamedStructWithStructAdapterAndFieldAdapter: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.test.module.thrift_types.RenamedStructWithStructAdapterAndFieldAdapter": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.test.module.thrift_mutable_types.RenamedStructWithStructAdapterAndFieldAdapter": ... # type: ignore def _to_py3(self) -> "facebook.thrift.test.module.types.RenamedStructWithStructAdapterAndFieldAdapter": ... # type: ignore def _to_py_deprecated(self) -> RenamedStructWithStructAdapterAndFieldAdapter: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/thrift/annotation/cpp/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/thrift/annotation/cpp/ttypes.pyi index 86fc4966d16938..c52d374b2cb012 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/thrift/annotation/cpp/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/thrift/annotation/cpp/ttypes.pyi @@ -67,6 +67,7 @@ class Name: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Name": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Name": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Name": ... # type: ignore def _to_py_deprecated(self) -> Name: ... @@ -105,6 +106,7 @@ class Type: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Type": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Type": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Type": ... # type: ignore def _to_py_deprecated(self) -> Type: ... @@ -138,6 +140,7 @@ class Ref: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Ref": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Ref": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Ref": ... # type: ignore def _to_py_deprecated(self) -> Ref: ... @@ -171,6 +174,7 @@ class Lazy: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Lazy": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Lazy": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Lazy": ... # type: ignore def _to_py_deprecated(self) -> Lazy: ... @@ -199,6 +203,7 @@ class DisableLazyChecksum: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.DisableLazyChecksum": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.DisableLazyChecksum": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.DisableLazyChecksum": ... # type: ignore def _to_py_deprecated(self) -> DisableLazyChecksum: ... @@ -252,6 +257,7 @@ class Adapter: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Adapter": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Adapter": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Adapter": ... # type: ignore def _to_py_deprecated(self) -> Adapter: ... @@ -285,6 +291,7 @@ class PackIsset: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.PackIsset": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.PackIsset": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.PackIsset": ... # type: ignore def _to_py_deprecated(self) -> PackIsset: ... @@ -313,6 +320,7 @@ class MinimizePadding: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.MinimizePadding": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.MinimizePadding": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.MinimizePadding": ... # type: ignore def _to_py_deprecated(self) -> MinimizePadding: ... @@ -341,6 +349,7 @@ class ScopedEnumAsUnionType: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.ScopedEnumAsUnionType": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.ScopedEnumAsUnionType": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.ScopedEnumAsUnionType": ... # type: ignore def _to_py_deprecated(self) -> ScopedEnumAsUnionType: ... @@ -379,6 +388,7 @@ class FieldInterceptor: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.FieldInterceptor": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.FieldInterceptor": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.FieldInterceptor": ... # type: ignore def _to_py_deprecated(self) -> FieldInterceptor: ... @@ -407,6 +417,7 @@ class UseOpEncode: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.UseOpEncode": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.UseOpEncode": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.UseOpEncode": ... # type: ignore def _to_py_deprecated(self) -> UseOpEncode: ... @@ -440,6 +451,7 @@ class EnumType: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.EnumType": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.EnumType": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.EnumType": ... # type: ignore def _to_py_deprecated(self) -> EnumType: ... @@ -468,6 +480,7 @@ class Frozen2Exclude: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Frozen2Exclude": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Frozen2Exclude": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Frozen2Exclude": ... # type: ignore def _to_py_deprecated(self) -> Frozen2Exclude: ... @@ -496,6 +509,7 @@ class Frozen2RequiresCompleteContainerParams: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Frozen2RequiresCompleteContainerParams": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Frozen2RequiresCompleteContainerParams": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Frozen2RequiresCompleteContainerParams": ... # type: ignore def _to_py_deprecated(self) -> Frozen2RequiresCompleteContainerParams: ... @@ -524,6 +538,7 @@ class ProcessInEbThreadUnsafe: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.ProcessInEbThreadUnsafe": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.ProcessInEbThreadUnsafe": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.ProcessInEbThreadUnsafe": ... # type: ignore def _to_py_deprecated(self) -> ProcessInEbThreadUnsafe: ... @@ -552,6 +567,7 @@ class RuntimeAnnotation: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.RuntimeAnnotation": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.RuntimeAnnotation": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.RuntimeAnnotation": ... # type: ignore def _to_py_deprecated(self) -> RuntimeAnnotation: ... @@ -580,6 +596,7 @@ class UseCursorSerialization: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.UseCursorSerialization": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.UseCursorSerialization": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.UseCursorSerialization": ... # type: ignore def _to_py_deprecated(self) -> UseCursorSerialization: ... @@ -608,6 +625,7 @@ class GenerateDeprecatedHeaderClientMethods: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.GenerateDeprecatedHeaderClientMethods": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.GenerateDeprecatedHeaderClientMethods": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.GenerateDeprecatedHeaderClientMethods": ... # type: ignore def _to_py_deprecated(self) -> GenerateDeprecatedHeaderClientMethods: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/thrift/annotation/hack/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/thrift/annotation/hack/ttypes.pyi index 0af71a30c0e5d5..5ccf669f806ef9 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/thrift/annotation/hack/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/thrift/annotation/hack/ttypes.pyi @@ -47,6 +47,7 @@ class FieldWrapper: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.hack.thrift_types.FieldWrapper": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.hack.thrift_mutable_types.FieldWrapper": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.hack.types.FieldWrapper": ... # type: ignore def _to_py_deprecated(self) -> FieldWrapper: ... @@ -90,6 +91,7 @@ class Wrapper: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.hack.thrift_types.Wrapper": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.hack.thrift_mutable_types.Wrapper": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.hack.types.Wrapper": ... # type: ignore def _to_py_deprecated(self) -> Wrapper: ... @@ -123,6 +125,7 @@ class Adapter: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.hack.thrift_types.Adapter": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.hack.thrift_mutable_types.Adapter": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.hack.types.Adapter": ... # type: ignore def _to_py_deprecated(self) -> Adapter: ... @@ -156,6 +159,7 @@ class SkipCodegen: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.hack.thrift_types.SkipCodegen": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.hack.thrift_mutable_types.SkipCodegen": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.hack.types.SkipCodegen": ... # type: ignore def _to_py_deprecated(self) -> SkipCodegen: ... @@ -194,6 +198,7 @@ class Name: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.hack.thrift_types.Name": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.hack.thrift_mutable_types.Name": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.hack.types.Name": ... # type: ignore def _to_py_deprecated(self) -> Name: ... @@ -227,6 +232,7 @@ class UnionEnumAttributes: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.hack.thrift_types.UnionEnumAttributes": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.hack.thrift_mutable_types.UnionEnumAttributes": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.hack.types.UnionEnumAttributes": ... # type: ignore def _to_py_deprecated(self) -> UnionEnumAttributes: ... @@ -260,6 +266,7 @@ class StructTrait: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.hack.thrift_types.StructTrait": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.hack.thrift_mutable_types.StructTrait": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.hack.types.StructTrait": ... # type: ignore def _to_py_deprecated(self) -> StructTrait: ... @@ -293,6 +300,7 @@ class Attributes: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.hack.thrift_types.Attributes": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.hack.thrift_mutable_types.Attributes": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.hack.types.Attributes": ... # type: ignore def _to_py_deprecated(self) -> Attributes: ... @@ -321,6 +329,7 @@ class StructAsTrait: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.hack.thrift_types.StructAsTrait": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.hack.thrift_mutable_types.StructAsTrait": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.hack.types.StructAsTrait": ... # type: ignore def _to_py_deprecated(self) -> StructAsTrait: ... @@ -349,6 +358,7 @@ class ModuleInternal: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.hack.thrift_types.ModuleInternal": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.hack.thrift_mutable_types.ModuleInternal": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.hack.types.ModuleInternal": ... # type: ignore def _to_py_deprecated(self) -> ModuleInternal: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/thrift/annotation/python/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/thrift/annotation/python/ttypes.pyi index 259f7f240a94d6..9bae115f27e2e7 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/thrift/annotation/python/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/thrift/annotation/python/ttypes.pyi @@ -42,6 +42,7 @@ class Py3Hidden: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.python.thrift_types.Py3Hidden": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.python.thrift_mutable_types.Py3Hidden": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.python.types.Py3Hidden": ... # type: ignore def _to_py_deprecated(self) -> Py3Hidden: ... @@ -75,6 +76,7 @@ class PyDeprecatedHidden: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.python.thrift_types.PyDeprecatedHidden": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.python.thrift_mutable_types.PyDeprecatedHidden": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.python.types.PyDeprecatedHidden": ... # type: ignore def _to_py_deprecated(self) -> PyDeprecatedHidden: ... @@ -103,6 +105,7 @@ class Flags: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.python.thrift_types.Flags": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.python.thrift_mutable_types.Flags": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.python.types.Flags": ... # type: ignore def _to_py_deprecated(self) -> Flags: ... @@ -136,6 +139,7 @@ class Name: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.python.thrift_types.Name": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.python.thrift_mutable_types.Name": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.python.types.Name": ... # type: ignore def _to_py_deprecated(self) -> Name: ... @@ -174,6 +178,7 @@ class Adapter: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.python.thrift_types.Adapter": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.python.thrift_mutable_types.Adapter": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.python.types.Adapter": ... # type: ignore def _to_py_deprecated(self) -> Adapter: ... @@ -207,6 +212,7 @@ class UseCAPI: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.python.thrift_types.UseCAPI": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.python.thrift_mutable_types.UseCAPI": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.python.types.UseCAPI": ... # type: ignore def _to_py_deprecated(self) -> UseCAPI: ... @@ -235,6 +241,7 @@ class Py3EnableCppAdapter: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.python.thrift_types.Py3EnableCppAdapter": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.python.thrift_mutable_types.Py3EnableCppAdapter": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.python.types.Py3EnableCppAdapter": ... # type: ignore def _to_py_deprecated(self) -> Py3EnableCppAdapter: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/thrift/annotation/rust/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/thrift/annotation/rust/ttypes.pyi index 4e5bf5afcf656c..81975275558d2c 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/thrift/annotation/rust/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/thrift/annotation/rust/ttypes.pyi @@ -47,6 +47,7 @@ class Name: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.rust.thrift_types.Name": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.rust.thrift_mutable_types.Name": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.rust.types.Name": ... # type: ignore def _to_py_deprecated(self) -> Name: ... @@ -75,6 +76,7 @@ class Copy: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.rust.thrift_types.Copy": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.rust.thrift_mutable_types.Copy": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.rust.types.Copy": ... # type: ignore def _to_py_deprecated(self) -> Copy: ... @@ -103,6 +105,7 @@ class RequestContext: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.rust.thrift_types.RequestContext": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.rust.thrift_mutable_types.RequestContext": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.rust.types.RequestContext": ... # type: ignore def _to_py_deprecated(self) -> RequestContext: ... @@ -131,6 +134,7 @@ class Arc: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.rust.thrift_types.Arc": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.rust.thrift_mutable_types.Arc": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.rust.types.Arc": ... # type: ignore def _to_py_deprecated(self) -> Arc: ... @@ -159,6 +163,7 @@ class Box: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.rust.thrift_types.Box": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.rust.thrift_mutable_types.Box": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.rust.types.Box": ... # type: ignore def _to_py_deprecated(self) -> Box: ... @@ -187,6 +192,7 @@ class Exhaustive: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.rust.thrift_types.Exhaustive": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.rust.thrift_mutable_types.Exhaustive": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.rust.types.Exhaustive": ... # type: ignore def _to_py_deprecated(self) -> Exhaustive: ... @@ -215,6 +221,7 @@ class Ord: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.rust.thrift_types.Ord": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.rust.thrift_mutable_types.Ord": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.rust.types.Ord": ... # type: ignore def _to_py_deprecated(self) -> Ord: ... @@ -243,6 +250,7 @@ class NewType: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.rust.thrift_types.NewType": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.rust.thrift_mutable_types.NewType": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.rust.types.NewType": ... # type: ignore def _to_py_deprecated(self) -> NewType: ... @@ -276,6 +284,7 @@ class Type: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.rust.thrift_types.Type": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.rust.thrift_mutable_types.Type": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.rust.types.Type": ... # type: ignore def _to_py_deprecated(self) -> Type: ... @@ -309,6 +318,7 @@ class Serde: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.rust.thrift_types.Serde": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.rust.thrift_mutable_types.Serde": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.rust.types.Serde": ... # type: ignore def _to_py_deprecated(self) -> Serde: ... @@ -342,6 +352,7 @@ class Mod: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.rust.thrift_types.Mod": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.rust.thrift_mutable_types.Mod": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.rust.types.Mod": ... # type: ignore def _to_py_deprecated(self) -> Mod: ... @@ -375,6 +386,7 @@ class Adapter: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.rust.thrift_types.Adapter": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.rust.thrift_mutable_types.Adapter": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.rust.types.Adapter": ... # type: ignore def _to_py_deprecated(self) -> Adapter: ... @@ -408,6 +420,7 @@ class Derive: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.rust.thrift_types.Derive": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.rust.thrift_mutable_types.Derive": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.rust.types.Derive": ... # type: ignore def _to_py_deprecated(self) -> Derive: ... @@ -441,6 +454,7 @@ class ServiceExn: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.rust.thrift_types.ServiceExn": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.rust.thrift_mutable_types.ServiceExn": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.rust.types.ServiceExn": ... # type: ignore def _to_py_deprecated(self) -> ServiceExn: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/thrift/annotation/scope/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/thrift/annotation/scope/ttypes.pyi index 4b240628e7630f..b0fcf98a1685a5 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/thrift/annotation/scope/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/thrift/annotation/scope/ttypes.pyi @@ -42,6 +42,7 @@ class Transitive: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Transitive": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Transitive": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Transitive": ... # type: ignore def _to_py_deprecated(self) -> Transitive: ... @@ -70,6 +71,7 @@ class Program: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Program": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Program": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Program": ... # type: ignore def _to_py_deprecated(self) -> Program: ... @@ -98,6 +100,7 @@ class Struct: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Struct": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Struct": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Struct": ... # type: ignore def _to_py_deprecated(self) -> Struct: ... @@ -126,6 +129,7 @@ class Union: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Union": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Union": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Union": ... # type: ignore def _to_py_deprecated(self) -> Union: ... @@ -154,6 +158,7 @@ class Exception: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Exception": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Exception": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Exception": ... # type: ignore def _to_py_deprecated(self) -> Exception: ... @@ -182,6 +187,7 @@ class Field: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Field": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Field": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Field": ... # type: ignore def _to_py_deprecated(self) -> Field: ... @@ -210,6 +216,7 @@ class Typedef: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Typedef": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Typedef": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Typedef": ... # type: ignore def _to_py_deprecated(self) -> Typedef: ... @@ -238,6 +245,7 @@ class Service: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Service": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Service": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Service": ... # type: ignore def _to_py_deprecated(self) -> Service: ... @@ -266,6 +274,7 @@ class Interaction: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Interaction": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Interaction": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Interaction": ... # type: ignore def _to_py_deprecated(self) -> Interaction: ... @@ -294,6 +303,7 @@ class Function: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Function": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Function": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Function": ... # type: ignore def _to_py_deprecated(self) -> Function: ... @@ -322,6 +332,7 @@ class EnumValue: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.EnumValue": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.EnumValue": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.EnumValue": ... # type: ignore def _to_py_deprecated(self) -> EnumValue: ... @@ -350,6 +361,7 @@ class Const: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Const": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Const": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Const": ... # type: ignore def _to_py_deprecated(self) -> Const: ... @@ -378,6 +390,7 @@ class Enum: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Enum": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Enum": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Enum": ... # type: ignore def _to_py_deprecated(self) -> Enum: ... @@ -406,6 +419,7 @@ class Structured: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Structured": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Structured": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Structured": ... # type: ignore def _to_py_deprecated(self) -> Structured: ... @@ -434,6 +448,7 @@ class Interface: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Interface": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Interface": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Interface": ... # type: ignore def _to_py_deprecated(self) -> Interface: ... @@ -462,6 +477,7 @@ class RootDefinition: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.RootDefinition": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.RootDefinition": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.RootDefinition": ... # type: ignore def _to_py_deprecated(self) -> RootDefinition: ... @@ -490,6 +506,7 @@ class Definition: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Definition": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Definition": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Definition": ... # type: ignore def _to_py_deprecated(self) -> Definition: ... @@ -518,6 +535,7 @@ class DisableSchemaConst: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.DisableSchemaConst": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.DisableSchemaConst": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.DisableSchemaConst": ... # type: ignore def _to_py_deprecated(self) -> DisableSchemaConst: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/thrift/annotation/thrift/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/thrift/annotation/thrift/ttypes.pyi index 98eb22e87a432d..8e4bb378fa1248 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/thrift/annotation/thrift/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/adapter/out/pyi/gen-py/thrift/annotation/thrift/ttypes.pyi @@ -53,6 +53,7 @@ class Experimental: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Experimental": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Experimental": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Experimental": ... # type: ignore def _to_py_deprecated(self) -> Experimental: ... @@ -91,6 +92,7 @@ class ReserveIds: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.ReserveIds": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.ReserveIds": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.ReserveIds": ... # type: ignore def _to_py_deprecated(self) -> ReserveIds: ... @@ -124,6 +126,7 @@ class RequiresBackwardCompatibility: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.RequiresBackwardCompatibility": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.RequiresBackwardCompatibility": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.RequiresBackwardCompatibility": ... # type: ignore def _to_py_deprecated(self) -> RequiresBackwardCompatibility: ... @@ -152,6 +155,7 @@ class TerseWrite: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.TerseWrite": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.TerseWrite": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.TerseWrite": ... # type: ignore def _to_py_deprecated(self) -> TerseWrite: ... @@ -180,6 +184,7 @@ class Box: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Box": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Box": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Box": ... # type: ignore def _to_py_deprecated(self) -> Box: ... @@ -208,6 +213,7 @@ class Mixin: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Mixin": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Mixin": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Mixin": ... # type: ignore def _to_py_deprecated(self) -> Mixin: ... @@ -236,6 +242,7 @@ class SerializeInFieldIdOrder: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.SerializeInFieldIdOrder": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.SerializeInFieldIdOrder": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.SerializeInFieldIdOrder": ... # type: ignore def _to_py_deprecated(self) -> SerializeInFieldIdOrder: ... @@ -264,6 +271,7 @@ class BitmaskEnum: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.BitmaskEnum": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.BitmaskEnum": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.BitmaskEnum": ... # type: ignore def _to_py_deprecated(self) -> BitmaskEnum: ... @@ -292,6 +300,7 @@ class ExceptionMessage: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.ExceptionMessage": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.ExceptionMessage": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.ExceptionMessage": ... # type: ignore def _to_py_deprecated(self) -> ExceptionMessage: ... @@ -320,6 +329,7 @@ class InternBox: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.InternBox": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.InternBox": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.InternBox": ... # type: ignore def _to_py_deprecated(self) -> InternBox: ... @@ -348,6 +358,7 @@ class Serial: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Serial": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Serial": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Serial": ... # type: ignore def _to_py_deprecated(self) -> Serial: ... @@ -381,6 +392,7 @@ class Uri: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Uri": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Uri": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Uri": ... # type: ignore def _to_py_deprecated(self) -> Uri: ... @@ -414,6 +426,7 @@ class Priority: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Priority": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Priority": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Priority": ... # type: ignore def _to_py_deprecated(self) -> Priority: ... @@ -447,6 +460,7 @@ class DeprecatedUnvalidatedAnnotations: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.DeprecatedUnvalidatedAnnotations": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.DeprecatedUnvalidatedAnnotations": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.DeprecatedUnvalidatedAnnotations": ... # type: ignore def _to_py_deprecated(self) -> DeprecatedUnvalidatedAnnotations: ... @@ -475,6 +489,7 @@ class AllowReservedIdentifier: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.AllowReservedIdentifier": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.AllowReservedIdentifier": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.AllowReservedIdentifier": ... # type: ignore def _to_py_deprecated(self) -> AllowReservedIdentifier: ... @@ -503,6 +518,7 @@ class AllowReservedFilename: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.AllowReservedFilename": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.AllowReservedFilename": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.AllowReservedFilename": ... # type: ignore def _to_py_deprecated(self) -> AllowReservedFilename: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/py/gen-py/module/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/py/gen-py/module/ttypes.py index b76ed54df5b442..71793182e35b21 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/py/gen-py/module/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/py/gen-py/module/ttypes.py @@ -174,6 +174,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.MyStructNestedAnnotation, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MyStructNestedAnnotation, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -270,6 +276,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.MyUnion, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MyUnion, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -368,6 +380,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.MyException, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MyException, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -641,6 +659,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.MyStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MyStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -770,6 +794,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.SecretStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.SecretStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/py/gen-py/thrift/annotation/cpp/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/py/gen-py/thrift/annotation/cpp/ttypes.py index 520b681121a61e..8d60067bbe8759 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/py/gen-py/thrift/annotation/cpp/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/py/gen-py/thrift/annotation/cpp/ttypes.py @@ -209,6 +209,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Name, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Name, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -353,6 +359,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Type, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Type, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -479,6 +491,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Ref, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Ref, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -607,6 +625,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Lazy, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Lazy, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -698,6 +722,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.DisableLazyChecksum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DisableLazyChecksum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -924,6 +954,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Adapter, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Adapter, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1040,6 +1076,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.PackIsset, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.PackIsset, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1158,6 +1200,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.MinimizePadding, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MinimizePadding, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1249,6 +1297,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.ScopedEnumAsUnionType, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ScopedEnumAsUnionType, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1403,6 +1457,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.FieldInterceptor, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.FieldInterceptor, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1494,6 +1554,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.UseOpEncode, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.UseOpEncode, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1630,6 +1696,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.EnumType, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.EnumType, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1724,6 +1796,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Frozen2Exclude, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Frozen2Exclude, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1819,6 +1897,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Frozen2RequiresCompleteContainerParams, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Frozen2RequiresCompleteContainerParams, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1921,6 +2005,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.ProcessInEbThreadUnsafe, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ProcessInEbThreadUnsafe, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2015,6 +2105,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.RuntimeAnnotation, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RuntimeAnnotation, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2112,6 +2208,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.UseCursorSerialization, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.UseCursorSerialization, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2220,6 +2322,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.GenerateDeprecatedHeaderClientMethods, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.GenerateDeprecatedHeaderClientMethods, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/py/gen-py/thrift/annotation/go/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/py/gen-py/thrift/annotation/go/ttypes.py index 2c8241cc186fea..06028f741795e3 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/py/gen-py/thrift/annotation/go/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/py/gen-py/thrift/annotation/go/ttypes.py @@ -157,6 +157,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.go.thrift_types") return thrift.python.converter.to_python_struct(python_types.Name, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.go.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Name, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -269,6 +275,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.go.thrift_types") return thrift.python.converter.to_python_struct(python_types.Tag, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.go.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Tag, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/py/gen-py/thrift/annotation/hack/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/py/gen-py/thrift/annotation/hack/ttypes.py index b4e6be4c1c008e..01b0bd0e63955a 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/py/gen-py/thrift/annotation/hack/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/py/gen-py/thrift/annotation/hack/ttypes.py @@ -165,6 +165,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.FieldWrapper, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.FieldWrapper, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -324,6 +330,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.Wrapper, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Wrapper, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -469,6 +481,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.Adapter, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Adapter, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -581,6 +599,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.SkipCodegen, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.SkipCodegen, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -715,6 +739,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.Name, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Name, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -844,6 +874,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.UnionEnumAttributes, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.UnionEnumAttributes, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -958,6 +994,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.StructTrait, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.StructTrait, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1125,6 +1167,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.Attributes, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Attributes, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1216,6 +1264,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.StructAsTrait, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.StructAsTrait, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1310,6 +1364,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.ModuleInternal, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ModuleInternal, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/py/gen-py/thrift/annotation/scope/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/py/gen-py/thrift/annotation/scope/ttypes.py index c08f21be9694a5..c4c5c8179665df 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/py/gen-py/thrift/annotation/scope/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/py/gen-py/thrift/annotation/scope/ttypes.py @@ -161,6 +161,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Transitive, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Transitive, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -258,6 +264,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Program, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Program, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -352,6 +364,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Struct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Struct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -446,6 +464,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Union, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Union, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -540,6 +564,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Exception, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Exception, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -634,6 +664,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Field, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Field, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -728,6 +764,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Typedef, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Typedef, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -822,6 +864,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Service, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Service, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -916,6 +964,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Interaction, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Interaction, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1010,6 +1064,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Function, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Function, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1104,6 +1164,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.EnumValue, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.EnumValue, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1198,6 +1264,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Const, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Const, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1289,6 +1361,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Enum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Enum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1383,6 +1461,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Structured, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Structured, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1477,6 +1561,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Interface, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Interface, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1571,6 +1661,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.RootDefinition, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RootDefinition, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1665,6 +1761,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Definition, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Definition, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1760,6 +1862,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.DisableSchemaConst, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DisableSchemaConst, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/py/gen-py/thrift/annotation/thrift/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/py/gen-py/thrift/annotation/thrift/ttypes.py index 386d80397db35f..2447eaa8e64b55 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/py/gen-py/thrift/annotation/thrift/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/py/gen-py/thrift/annotation/thrift/ttypes.py @@ -165,6 +165,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Experimental, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Experimental, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -355,6 +361,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.ReserveIds, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ReserveIds, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -470,6 +482,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.RequiresBackwardCompatibility, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RequiresBackwardCompatibility, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -574,6 +592,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.TerseWrite, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.TerseWrite, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -696,6 +720,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Box, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Box, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -791,6 +821,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Mixin, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Mixin, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -890,6 +926,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.SerializeInFieldIdOrder, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.SerializeInFieldIdOrder, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -985,6 +1027,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.BitmaskEnum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.BitmaskEnum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1098,6 +1146,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.ExceptionMessage, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ExceptionMessage, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1193,6 +1247,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.InternBox, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.InternBox, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1287,6 +1347,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Serial, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Serial, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1401,6 +1467,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Uri, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Uri, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1523,6 +1595,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Priority, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Priority, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1656,6 +1734,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.DeprecatedUnvalidatedAnnotations, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DeprecatedUnvalidatedAnnotations, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1757,6 +1841,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.AllowReservedIdentifier, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AllowReservedIdentifier, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1848,6 +1938,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.AllowReservedFilename, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AllowReservedFilename, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/basic/out/py/gen-py/module/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/basic/out/py/gen-py/module/ttypes.py index 64428de04e4edf..f69d8bd0fd4e32 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/basic/out/py/gen-py/module/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/basic/out/py/gen-py/module/ttypes.py @@ -346,6 +346,12 @@ def _to_python(self): python_types = importlib.import_module("test.fixtures.basic.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.MyStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("test.fixtures.basic.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MyStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -543,6 +549,12 @@ def _to_python(self): python_types = importlib.import_module("test.fixtures.basic.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.Containers, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("test.fixtures.basic.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Containers, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -634,6 +646,12 @@ def _to_python(self): python_types = importlib.import_module("test.fixtures.basic.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.MyDataItem, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("test.fixtures.basic.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MyDataItem, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -878,6 +896,12 @@ def _to_python(self): python_types = importlib.import_module("test.fixtures.basic.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.MyUnion, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("test.fixtures.basic.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MyUnion, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1052,6 +1076,12 @@ def _to_python(self): python_types = importlib.import_module("test.fixtures.basic.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.MyException, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("test.fixtures.basic.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MyException, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1229,6 +1259,12 @@ def _to_python(self): python_types = importlib.import_module("test.fixtures.basic.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.MyExceptionWithMessage, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("test.fixtures.basic.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MyExceptionWithMessage, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1343,6 +1379,12 @@ def _to_python(self): python_types = importlib.import_module("test.fixtures.basic.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.ReservedKeyword, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("test.fixtures.basic.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ReservedKeyword, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1475,6 +1517,12 @@ def _to_python(self): python_types = importlib.import_module("test.fixtures.basic.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.UnionToBeRenamed, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("test.fixtures.basic.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.UnionToBeRenamed, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/basic/out/py/gen-py/thrift/annotation/hack/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/basic/out/py/gen-py/thrift/annotation/hack/ttypes.py index b4e6be4c1c008e..01b0bd0e63955a 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/basic/out/py/gen-py/thrift/annotation/hack/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/basic/out/py/gen-py/thrift/annotation/hack/ttypes.py @@ -165,6 +165,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.FieldWrapper, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.FieldWrapper, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -324,6 +330,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.Wrapper, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Wrapper, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -469,6 +481,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.Adapter, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Adapter, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -581,6 +599,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.SkipCodegen, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.SkipCodegen, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -715,6 +739,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.Name, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Name, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -844,6 +874,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.UnionEnumAttributes, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.UnionEnumAttributes, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -958,6 +994,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.StructTrait, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.StructTrait, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1125,6 +1167,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.Attributes, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Attributes, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1216,6 +1264,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.StructAsTrait, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.StructAsTrait, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1310,6 +1364,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.ModuleInternal, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ModuleInternal, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/basic/out/py/gen-py/thrift/annotation/scope/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/basic/out/py/gen-py/thrift/annotation/scope/ttypes.py index c08f21be9694a5..c4c5c8179665df 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/basic/out/py/gen-py/thrift/annotation/scope/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/basic/out/py/gen-py/thrift/annotation/scope/ttypes.py @@ -161,6 +161,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Transitive, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Transitive, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -258,6 +264,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Program, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Program, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -352,6 +364,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Struct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Struct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -446,6 +464,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Union, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Union, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -540,6 +564,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Exception, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Exception, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -634,6 +664,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Field, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Field, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -728,6 +764,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Typedef, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Typedef, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -822,6 +864,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Service, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Service, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -916,6 +964,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Interaction, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Interaction, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1010,6 +1064,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Function, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Function, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1104,6 +1164,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.EnumValue, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.EnumValue, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1198,6 +1264,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Const, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Const, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1289,6 +1361,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Enum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Enum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1383,6 +1461,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Structured, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Structured, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1477,6 +1561,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Interface, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Interface, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1571,6 +1661,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.RootDefinition, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RootDefinition, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1665,6 +1761,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Definition, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Definition, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1760,6 +1862,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.DisableSchemaConst, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DisableSchemaConst, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/basic/out/py/gen-py/thrift/annotation/thrift/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/basic/out/py/gen-py/thrift/annotation/thrift/ttypes.py index 386d80397db35f..2447eaa8e64b55 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/basic/out/py/gen-py/thrift/annotation/thrift/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/basic/out/py/gen-py/thrift/annotation/thrift/ttypes.py @@ -165,6 +165,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Experimental, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Experimental, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -355,6 +361,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.ReserveIds, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ReserveIds, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -470,6 +482,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.RequiresBackwardCompatibility, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RequiresBackwardCompatibility, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -574,6 +592,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.TerseWrite, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.TerseWrite, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -696,6 +720,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Box, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Box, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -791,6 +821,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Mixin, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Mixin, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -890,6 +926,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.SerializeInFieldIdOrder, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.SerializeInFieldIdOrder, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -985,6 +1027,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.BitmaskEnum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.BitmaskEnum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1098,6 +1146,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.ExceptionMessage, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ExceptionMessage, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1193,6 +1247,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.InternBox, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.InternBox, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1287,6 +1347,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Serial, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Serial, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1401,6 +1467,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Uri, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Uri, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1523,6 +1595,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Priority, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Priority, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1656,6 +1734,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.DeprecatedUnvalidatedAnnotations, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DeprecatedUnvalidatedAnnotations, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1757,6 +1841,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.AllowReservedIdentifier, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AllowReservedIdentifier, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1848,6 +1938,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.AllowReservedFilename, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AllowReservedFilename, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/constants/out/py/gen-py/module/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/constants/out/py/gen-py/module/ttypes.py index 0e7e42852c62f3..6fec7b3cdbd67d 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/constants/out/py/gen-py/module/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/constants/out/py/gen-py/module/ttypes.py @@ -243,6 +243,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.Internship, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Internship, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -349,6 +355,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.Range, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Range, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -455,6 +467,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.struct1, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.struct1, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -605,6 +623,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.struct2, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.struct2, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -727,6 +751,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.struct3, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.struct3, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -848,6 +878,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.struct4, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.struct4, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -977,6 +1013,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.union1, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.union1, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1160,6 +1202,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.union2, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.union2, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/constants/out/pyi/gen-py/module/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/constants/out/pyi/gen-py/module/ttypes.pyi index 0d7eaee931c80a..265a5f5f4cc021 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/constants/out/pyi/gen-py/module/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/constants/out/pyi/gen-py/module/ttypes.pyi @@ -90,6 +90,7 @@ class Internship: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "module.thrift_types.Internship": ... # type: ignore + def _to_mutable_python(self) -> "module.thrift_mutable_types.Internship": ... # type: ignore def _to_py3(self) -> "module.types.Internship": ... # type: ignore def _to_py_deprecated(self) -> Internship: ... @@ -124,6 +125,7 @@ class Range: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "module.thrift_types.Range": ... # type: ignore + def _to_mutable_python(self) -> "module.thrift_mutable_types.Range": ... # type: ignore def _to_py3(self) -> "module.types.Range": ... # type: ignore def _to_py_deprecated(self) -> Range: ... @@ -158,6 +160,7 @@ class struct1: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "module.thrift_types.struct1": ... # type: ignore + def _to_mutable_python(self) -> "module.thrift_mutable_types.struct1": ... # type: ignore def _to_py3(self) -> "module.types.struct1": ... # type: ignore def _to_py_deprecated(self) -> struct1: ... @@ -202,6 +205,7 @@ class struct2: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "module.thrift_types.struct2": ... # type: ignore + def _to_mutable_python(self) -> "module.thrift_mutable_types.struct2": ... # type: ignore def _to_py3(self) -> "module.types.struct2": ... # type: ignore def _to_py_deprecated(self) -> struct2: ... @@ -241,6 +245,7 @@ class struct3: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "module.thrift_types.struct3": ... # type: ignore + def _to_mutable_python(self) -> "module.thrift_mutable_types.struct3": ... # type: ignore def _to_py3(self) -> "module.types.struct3": ... # type: ignore def _to_py_deprecated(self) -> struct3: ... @@ -280,6 +285,7 @@ class struct4: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "module.thrift_types.struct4": ... # type: ignore + def _to_mutable_python(self) -> "module.thrift_mutable_types.struct4": ... # type: ignore def _to_py3(self) -> "module.types.struct4": ... # type: ignore def _to_py_deprecated(self) -> struct4: ... @@ -316,6 +322,7 @@ class union1: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "module.thrift_types.union1": ... # type: ignore + def _to_mutable_python(self) -> "module.thrift_mutable_types.union1": ... # type: ignore def _to_py3(self) -> "module.types.union1": ... # type: ignore def _to_py_deprecated(self) -> union1: ... @@ -360,6 +367,7 @@ class union2: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "module.thrift_types.union2": ... # type: ignore + def _to_mutable_python(self) -> "module.thrift_mutable_types.union2": ... # type: ignore def _to_py3(self) -> "module.types.union2": ... # type: ignore def _to_py_deprecated(self) -> union2: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/enums/out/py/gen-py/module/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/enums/out/py/gen-py/module/ttypes.py index ab2d201a8409af..6336085293f68e 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/enums/out/py/gen-py/module/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/enums/out/py/gen-py/module/ttypes.py @@ -392,6 +392,12 @@ def _to_python(self): python_types = importlib.import_module("test.fixtures.enums.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.SomeStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("test.fixtures.enums.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.SomeStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -587,6 +593,12 @@ def _to_python(self): python_types = importlib.import_module("test.fixtures.enums.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.MyStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("test.fixtures.enums.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MyStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/enums/out/py/gen-py/thrift/annotation/scope/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/enums/out/py/gen-py/thrift/annotation/scope/ttypes.py index c08f21be9694a5..c4c5c8179665df 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/enums/out/py/gen-py/thrift/annotation/scope/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/enums/out/py/gen-py/thrift/annotation/scope/ttypes.py @@ -161,6 +161,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Transitive, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Transitive, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -258,6 +264,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Program, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Program, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -352,6 +364,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Struct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Struct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -446,6 +464,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Union, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Union, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -540,6 +564,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Exception, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Exception, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -634,6 +664,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Field, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Field, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -728,6 +764,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Typedef, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Typedef, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -822,6 +864,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Service, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Service, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -916,6 +964,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Interaction, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Interaction, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1010,6 +1064,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Function, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Function, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1104,6 +1164,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.EnumValue, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.EnumValue, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1198,6 +1264,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Const, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Const, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1289,6 +1361,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Enum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Enum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1383,6 +1461,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Structured, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Structured, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1477,6 +1561,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Interface, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Interface, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1571,6 +1661,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.RootDefinition, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RootDefinition, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1665,6 +1761,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Definition, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Definition, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1760,6 +1862,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.DisableSchemaConst, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DisableSchemaConst, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/enums/out/py/gen-py/thrift/annotation/thrift/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/enums/out/py/gen-py/thrift/annotation/thrift/ttypes.py index 386d80397db35f..2447eaa8e64b55 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/enums/out/py/gen-py/thrift/annotation/thrift/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/enums/out/py/gen-py/thrift/annotation/thrift/ttypes.py @@ -165,6 +165,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Experimental, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Experimental, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -355,6 +361,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.ReserveIds, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ReserveIds, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -470,6 +482,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.RequiresBackwardCompatibility, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RequiresBackwardCompatibility, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -574,6 +592,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.TerseWrite, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.TerseWrite, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -696,6 +720,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Box, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Box, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -791,6 +821,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Mixin, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Mixin, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -890,6 +926,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.SerializeInFieldIdOrder, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.SerializeInFieldIdOrder, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -985,6 +1027,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.BitmaskEnum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.BitmaskEnum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1098,6 +1146,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.ExceptionMessage, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ExceptionMessage, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1193,6 +1247,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.InternBox, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.InternBox, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1287,6 +1347,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Serial, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Serial, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1401,6 +1467,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Uri, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Uri, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1523,6 +1595,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Priority, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Priority, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1656,6 +1734,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.DeprecatedUnvalidatedAnnotations, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DeprecatedUnvalidatedAnnotations, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1757,6 +1841,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.AllowReservedIdentifier, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AllowReservedIdentifier, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1848,6 +1938,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.AllowReservedFilename, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AllowReservedFilename, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/exceptions/out/py/gen-py/module/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/exceptions/out/py/gen-py/module/ttypes.py index a8d2fab13835b6..40644cdc55ce81 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/exceptions/out/py/gen-py/module/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/exceptions/out/py/gen-py/module/ttypes.py @@ -142,6 +142,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.Fiery, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Fiery, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -243,6 +249,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.Serious, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Serious, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -359,6 +371,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.ComplexFieldNames, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ComplexFieldNames, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -475,6 +493,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.CustomFieldNames, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.CustomFieldNames, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -591,6 +615,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.ExceptionWithPrimitiveField, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ExceptionWithPrimitiveField, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -707,6 +737,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.ExceptionWithStructuredAnnotation, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ExceptionWithStructuredAnnotation, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -786,6 +822,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.Banal, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Banal, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/exceptions/out/py/gen-py/thrift/annotation/python/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/exceptions/out/py/gen-py/thrift/annotation/python/ttypes.py index f7735a36335e1f..268133d990c08c 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/exceptions/out/py/gen-py/thrift/annotation/python/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/exceptions/out/py/gen-py/thrift/annotation/python/ttypes.py @@ -116,6 +116,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.python.thrift_types") return thrift.python.converter.to_python_struct(python_types.Py3Hidden, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.python.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Py3Hidden, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -209,6 +215,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.python.thrift_types") return thrift.python.converter.to_python_struct(python_types.PyDeprecatedHidden, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.python.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.PyDeprecatedHidden, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -281,6 +293,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.python.thrift_types") return thrift.python.converter.to_python_struct(python_types.Flags, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.python.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Flags, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -372,6 +390,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.python.thrift_types") return thrift.python.converter.to_python_struct(python_types.Name, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.python.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Name, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -511,6 +535,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.python.thrift_types") return thrift.python.converter.to_python_struct(python_types.Adapter, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.python.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Adapter, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -608,6 +638,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.python.thrift_types") return thrift.python.converter.to_python_struct(python_types.UseCAPI, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.python.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.UseCAPI, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -683,6 +719,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.python.thrift_types") return thrift.python.converter.to_python_struct(python_types.Py3EnableCppAdapter, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.python.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Py3EnableCppAdapter, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/exceptions/out/py/gen-py/thrift/annotation/scope/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/exceptions/out/py/gen-py/thrift/annotation/scope/ttypes.py index 3a0526936816fe..5706510b3082ea 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/exceptions/out/py/gen-py/thrift/annotation/scope/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/exceptions/out/py/gen-py/thrift/annotation/scope/ttypes.py @@ -138,6 +138,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Transitive, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Transitive, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -216,6 +222,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Program, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Program, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -291,6 +303,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Struct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Struct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -366,6 +384,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Union, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Union, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -441,6 +465,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Exception, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Exception, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -516,6 +546,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Field, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Field, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -591,6 +627,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Typedef, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Typedef, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -666,6 +708,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Service, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Service, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -741,6 +789,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Interaction, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Interaction, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -816,6 +870,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Function, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Function, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -891,6 +951,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.EnumValue, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.EnumValue, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -966,6 +1032,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Const, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Const, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1038,6 +1110,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Enum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Enum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1113,6 +1191,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Structured, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Structured, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1188,6 +1272,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Interface, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Interface, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1263,6 +1353,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.RootDefinition, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RootDefinition, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1338,6 +1434,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Definition, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Definition, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1414,6 +1516,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.DisableSchemaConst, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DisableSchemaConst, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/exceptions/out/py/gen-py/thrift/annotation/thrift/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/exceptions/out/py/gen-py/thrift/annotation/thrift/ttypes.py index 41f5514e75397d..d99e1e493952fb 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/exceptions/out/py/gen-py/thrift/annotation/thrift/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/exceptions/out/py/gen-py/thrift/annotation/thrift/ttypes.py @@ -142,6 +142,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Experimental, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Experimental, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -298,6 +304,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.ReserveIds, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ReserveIds, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -392,6 +404,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.RequiresBackwardCompatibility, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RequiresBackwardCompatibility, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -477,6 +495,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.TerseWrite, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.TerseWrite, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -580,6 +604,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Box, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Box, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -656,6 +686,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Mixin, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Mixin, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -736,6 +772,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.SerializeInFieldIdOrder, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.SerializeInFieldIdOrder, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -812,6 +854,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.BitmaskEnum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.BitmaskEnum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -906,6 +954,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.ExceptionMessage, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ExceptionMessage, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -982,6 +1036,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.InternBox, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.InternBox, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1057,6 +1117,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Serial, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Serial, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1150,6 +1216,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Uri, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Uri, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1243,6 +1315,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Priority, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Priority, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1352,6 +1430,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.DeprecatedUnvalidatedAnnotations, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DeprecatedUnvalidatedAnnotations, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1434,6 +1518,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.AllowReservedIdentifier, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AllowReservedIdentifier, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1506,6 +1596,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.AllowReservedFilename, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AllowReservedFilename, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/includes/out/py/gen-py/includes/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/includes/out/py/gen-py/includes/ttypes.py index 55d1abe09fa5d6..2556e76cc0d8ad 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/includes/out/py/gen-py/includes/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/includes/out/py/gen-py/includes/ttypes.py @@ -150,6 +150,12 @@ def _to_python(self): python_types = importlib.import_module("includes.thrift_types") return thrift.python.converter.to_python_struct(python_types.Included, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("includes.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Included, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/includes/out/py/gen-py/module/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/includes/out/py/gen-py/module/ttypes.py index afb90a5f61eaa9..2ff158f67a71b8 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/includes/out/py/gen-py/module/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/includes/out/py/gen-py/module/ttypes.py @@ -166,6 +166,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.MyStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MyStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/includes/out/py/gen-py/transitive/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/includes/out/py/gen-py/transitive/ttypes.py index 00f10e0a129e6f..65bc0fc54f392b 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/includes/out/py/gen-py/transitive/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/includes/out/py/gen-py/transitive/ttypes.py @@ -132,6 +132,12 @@ def _to_python(self): python_types = importlib.import_module("transitive.thrift_types") return thrift.python.converter.to_python_struct(python_types.Foo, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("transitive.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Foo, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/inject_metadata_fields/out/py/gen-py/foo/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/inject_metadata_fields/out/py/gen-py/foo/ttypes.py index 22cced07dcba36..747811d3ae2759 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/inject_metadata_fields/out/py/gen-py/foo/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/inject_metadata_fields/out/py/gen-py/foo/ttypes.py @@ -162,6 +162,12 @@ def _to_python(self): python_types = importlib.import_module("foo.thrift_types") return thrift.python.converter.to_python_struct(python_types.Fields, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("foo.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Fields, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/inject_metadata_fields/out/py/gen-py/module/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/inject_metadata_fields/out/py/gen-py/module/ttypes.py index f54bff47b2ca48..f93a594367ef48 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/inject_metadata_fields/out/py/gen-py/module/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/inject_metadata_fields/out/py/gen-py/module/ttypes.py @@ -134,6 +134,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.Fields, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Fields, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -225,6 +231,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.FieldsInjectedToEmptyStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.FieldsInjectedToEmptyStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -331,6 +343,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.FieldsInjectedToStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.FieldsInjectedToStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -467,6 +485,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.FieldsInjectedWithIncludedStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.FieldsInjectedWithIncludedStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/inject_metadata_fields/out/py/gen-py/thrift/annotation/internal/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/inject_metadata_fields/out/py/gen-py/thrift/annotation/internal/ttypes.py index 3c33eecb68dee7..7cb8aa856c86e5 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/inject_metadata_fields/out/py/gen-py/thrift/annotation/internal/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/inject_metadata_fields/out/py/gen-py/thrift/annotation/internal/ttypes.py @@ -132,6 +132,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.internal.thrift_types") return thrift.python.converter.to_python_struct(python_types.InjectMetadataFields, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.internal.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.InjectMetadataFields, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/inject_metadata_fields/out/py/gen-py/thrift/annotation/scope/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/inject_metadata_fields/out/py/gen-py/thrift/annotation/scope/ttypes.py index 3a0526936816fe..5706510b3082ea 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/inject_metadata_fields/out/py/gen-py/thrift/annotation/scope/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/inject_metadata_fields/out/py/gen-py/thrift/annotation/scope/ttypes.py @@ -138,6 +138,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Transitive, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Transitive, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -216,6 +222,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Program, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Program, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -291,6 +303,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Struct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Struct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -366,6 +384,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Union, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Union, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -441,6 +465,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Exception, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Exception, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -516,6 +546,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Field, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Field, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -591,6 +627,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Typedef, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Typedef, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -666,6 +708,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Service, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Service, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -741,6 +789,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Interaction, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Interaction, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -816,6 +870,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Function, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Function, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -891,6 +951,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.EnumValue, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.EnumValue, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -966,6 +1032,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Const, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Const, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1038,6 +1110,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Enum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Enum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1113,6 +1191,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Structured, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Structured, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1188,6 +1272,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Interface, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Interface, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1263,6 +1353,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.RootDefinition, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RootDefinition, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1338,6 +1434,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Definition, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Definition, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1414,6 +1516,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.DisableSchemaConst, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DisableSchemaConst, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/inject_metadata_fields/out/py/gen-py/thrift/annotation/thrift/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/inject_metadata_fields/out/py/gen-py/thrift/annotation/thrift/ttypes.py index 41f5514e75397d..d99e1e493952fb 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/inject_metadata_fields/out/py/gen-py/thrift/annotation/thrift/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/inject_metadata_fields/out/py/gen-py/thrift/annotation/thrift/ttypes.py @@ -142,6 +142,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Experimental, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Experimental, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -298,6 +304,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.ReserveIds, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ReserveIds, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -392,6 +404,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.RequiresBackwardCompatibility, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RequiresBackwardCompatibility, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -477,6 +495,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.TerseWrite, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.TerseWrite, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -580,6 +604,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Box, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Box, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -656,6 +686,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Mixin, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Mixin, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -736,6 +772,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.SerializeInFieldIdOrder, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.SerializeInFieldIdOrder, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -812,6 +854,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.BitmaskEnum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.BitmaskEnum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -906,6 +954,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.ExceptionMessage, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ExceptionMessage, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -982,6 +1036,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.InternBox, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.InternBox, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1057,6 +1117,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Serial, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Serial, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1150,6 +1216,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Uri, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Uri, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1243,6 +1315,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Priority, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Priority, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1352,6 +1430,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.DeprecatedUnvalidatedAnnotations, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DeprecatedUnvalidatedAnnotations, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1434,6 +1518,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.AllowReservedIdentifier, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AllowReservedIdentifier, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1506,6 +1596,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.AllowReservedFilename, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AllowReservedFilename, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/int_limits/out/py/gen-py/module/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/int_limits/out/py/gen-py/module/ttypes.py index 97bb47ff11d811..15d135af739f1e 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/int_limits/out/py/gen-py/module/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/int_limits/out/py/gen-py/module/ttypes.py @@ -237,6 +237,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.Limits, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Limits, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/py/gen-py/test/fixtures/another_interactions/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/py/gen-py/test/fixtures/another_interactions/ttypes.py index 2f010eaf4282c8..1398c15babde4a 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/py/gen-py/test/fixtures/another_interactions/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/py/gen-py/test/fixtures/another_interactions/ttypes.py @@ -176,6 +176,12 @@ def _to_python(self): python_types = importlib.import_module("test.fixtures.another_interactions.shared.thrift_types") return thrift.python.converter.to_python_struct(python_types.DoSomethingResult, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("test.fixtures.another_interactions.shared.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DoSomethingResult, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/py/gen-py/test/fixtures/interactions/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/py/gen-py/test/fixtures/interactions/ttypes.py index 48adc125b95f02..47227923e0f4de 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/py/gen-py/test/fixtures/interactions/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/py/gen-py/test/fixtures/interactions/ttypes.py @@ -166,6 +166,12 @@ def _to_python(self): python_types = importlib.import_module("test.fixtures.interactions.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.CustomException, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("test.fixtures.interactions.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.CustomException, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -278,6 +284,12 @@ def _to_python(self): python_types = importlib.import_module("test.fixtures.interactions.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.ShouldBeBoxed, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("test.fixtures.interactions.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ShouldBeBoxed, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/py/gen-py/thrift/annotation/cpp/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/py/gen-py/thrift/annotation/cpp/ttypes.py index 520b681121a61e..8d60067bbe8759 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/py/gen-py/thrift/annotation/cpp/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/py/gen-py/thrift/annotation/cpp/ttypes.py @@ -209,6 +209,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Name, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Name, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -353,6 +359,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Type, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Type, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -479,6 +491,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Ref, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Ref, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -607,6 +625,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Lazy, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Lazy, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -698,6 +722,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.DisableLazyChecksum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DisableLazyChecksum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -924,6 +954,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Adapter, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Adapter, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1040,6 +1076,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.PackIsset, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.PackIsset, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1158,6 +1200,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.MinimizePadding, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MinimizePadding, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1249,6 +1297,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.ScopedEnumAsUnionType, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ScopedEnumAsUnionType, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1403,6 +1457,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.FieldInterceptor, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.FieldInterceptor, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1494,6 +1554,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.UseOpEncode, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.UseOpEncode, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1630,6 +1696,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.EnumType, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.EnumType, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1724,6 +1796,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Frozen2Exclude, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Frozen2Exclude, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1819,6 +1897,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Frozen2RequiresCompleteContainerParams, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Frozen2RequiresCompleteContainerParams, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1921,6 +2005,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.ProcessInEbThreadUnsafe, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ProcessInEbThreadUnsafe, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2015,6 +2105,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.RuntimeAnnotation, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RuntimeAnnotation, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2112,6 +2208,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.UseCursorSerialization, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.UseCursorSerialization, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2220,6 +2322,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.GenerateDeprecatedHeaderClientMethods, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.GenerateDeprecatedHeaderClientMethods, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/py/gen-py/thrift/annotation/scope/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/py/gen-py/thrift/annotation/scope/ttypes.py index c08f21be9694a5..c4c5c8179665df 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/py/gen-py/thrift/annotation/scope/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/py/gen-py/thrift/annotation/scope/ttypes.py @@ -161,6 +161,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Transitive, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Transitive, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -258,6 +264,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Program, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Program, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -352,6 +364,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Struct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Struct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -446,6 +464,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Union, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Union, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -540,6 +564,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Exception, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Exception, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -634,6 +664,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Field, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Field, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -728,6 +764,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Typedef, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Typedef, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -822,6 +864,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Service, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Service, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -916,6 +964,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Interaction, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Interaction, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1010,6 +1064,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Function, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Function, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1104,6 +1164,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.EnumValue, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.EnumValue, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1198,6 +1264,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Const, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Const, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1289,6 +1361,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Enum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Enum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1383,6 +1461,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Structured, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Structured, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1477,6 +1561,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Interface, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Interface, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1571,6 +1661,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.RootDefinition, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RootDefinition, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1665,6 +1761,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Definition, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Definition, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1760,6 +1862,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.DisableSchemaConst, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DisableSchemaConst, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/py/gen-py/thrift/annotation/thrift/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/py/gen-py/thrift/annotation/thrift/ttypes.py index 386d80397db35f..2447eaa8e64b55 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/py/gen-py/thrift/annotation/thrift/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/py/gen-py/thrift/annotation/thrift/ttypes.py @@ -165,6 +165,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Experimental, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Experimental, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -355,6 +361,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.ReserveIds, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ReserveIds, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -470,6 +482,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.RequiresBackwardCompatibility, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RequiresBackwardCompatibility, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -574,6 +592,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.TerseWrite, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.TerseWrite, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -696,6 +720,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Box, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Box, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -791,6 +821,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Mixin, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Mixin, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -890,6 +926,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.SerializeInFieldIdOrder, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.SerializeInFieldIdOrder, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -985,6 +1027,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.BitmaskEnum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.BitmaskEnum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1098,6 +1146,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.ExceptionMessage, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ExceptionMessage, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1193,6 +1247,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.InternBox, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.InternBox, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1287,6 +1347,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Serial, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Serial, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1401,6 +1467,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Uri, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Uri, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1523,6 +1595,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Priority, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Priority, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1656,6 +1734,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.DeprecatedUnvalidatedAnnotations, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DeprecatedUnvalidatedAnnotations, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1757,6 +1841,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.AllowReservedIdentifier, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AllowReservedIdentifier, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1848,6 +1938,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.AllowReservedFilename, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AllowReservedFilename, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/pyi/gen-py/test/fixtures/another_interactions/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/pyi/gen-py/test/fixtures/another_interactions/ttypes.pyi index 9fb0f27aeb26c0..e0914f97d91b00 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/pyi/gen-py/test/fixtures/another_interactions/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/pyi/gen-py/test/fixtures/another_interactions/ttypes.pyi @@ -48,6 +48,7 @@ class DoSomethingResult: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "test.fixtures.another_interactions.shared.thrift_types.DoSomethingResult": ... # type: ignore + def _to_mutable_python(self) -> "test.fixtures.another_interactions.shared.thrift_mutable_types.DoSomethingResult": ... # type: ignore def _to_py3(self) -> "test.fixtures.another_interactions.shared.types.DoSomethingResult": ... # type: ignore def _to_py_deprecated(self) -> DoSomethingResult: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/pyi/gen-py/test/fixtures/interactions/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/pyi/gen-py/test/fixtures/interactions/ttypes.pyi index 1ceecb1ebb1d97..90d41113dee039 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/pyi/gen-py/test/fixtures/interactions/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/pyi/gen-py/test/fixtures/interactions/ttypes.pyi @@ -44,6 +44,7 @@ class CustomException(Thrift.TException): def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "test.fixtures.interactions.module.thrift_types.CustomException": ... # type: ignore + def _to_mutable_python(self) -> "test.fixtures.interactions.module.thrift_mutable_types.CustomException": ... # type: ignore def _to_py3(self) -> "test.fixtures.interactions.module.types.CustomException": ... # type: ignore def _to_py_deprecated(self) -> CustomException: ... @@ -73,6 +74,7 @@ class ShouldBeBoxed: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "test.fixtures.interactions.module.thrift_types.ShouldBeBoxed": ... # type: ignore + def _to_mutable_python(self) -> "test.fixtures.interactions.module.thrift_mutable_types.ShouldBeBoxed": ... # type: ignore def _to_py3(self) -> "test.fixtures.interactions.module.types.ShouldBeBoxed": ... # type: ignore def _to_py_deprecated(self) -> ShouldBeBoxed: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/pyi/gen-py/thrift/annotation/cpp/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/pyi/gen-py/thrift/annotation/cpp/ttypes.pyi index b6612e5cc4d267..4b52c6f87ee53a 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/pyi/gen-py/thrift/annotation/cpp/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/pyi/gen-py/thrift/annotation/cpp/ttypes.pyi @@ -63,6 +63,7 @@ class Name: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Name": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Name": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Name": ... # type: ignore def _to_py_deprecated(self) -> Name: ... @@ -97,6 +98,7 @@ class Type: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Type": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Type": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Type": ... # type: ignore def _to_py_deprecated(self) -> Type: ... @@ -126,6 +128,7 @@ class Ref: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Ref": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Ref": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Ref": ... # type: ignore def _to_py_deprecated(self) -> Ref: ... @@ -155,6 +158,7 @@ class Lazy: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Lazy": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Lazy": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Lazy": ... # type: ignore def _to_py_deprecated(self) -> Lazy: ... @@ -179,6 +183,7 @@ class DisableLazyChecksum: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.DisableLazyChecksum": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.DisableLazyChecksum": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.DisableLazyChecksum": ... # type: ignore def _to_py_deprecated(self) -> DisableLazyChecksum: ... @@ -228,6 +233,7 @@ class Adapter: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Adapter": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Adapter": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Adapter": ... # type: ignore def _to_py_deprecated(self) -> Adapter: ... @@ -257,6 +263,7 @@ class PackIsset: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.PackIsset": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.PackIsset": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.PackIsset": ... # type: ignore def _to_py_deprecated(self) -> PackIsset: ... @@ -281,6 +288,7 @@ class MinimizePadding: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.MinimizePadding": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.MinimizePadding": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.MinimizePadding": ... # type: ignore def _to_py_deprecated(self) -> MinimizePadding: ... @@ -305,6 +313,7 @@ class ScopedEnumAsUnionType: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.ScopedEnumAsUnionType": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.ScopedEnumAsUnionType": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.ScopedEnumAsUnionType": ... # type: ignore def _to_py_deprecated(self) -> ScopedEnumAsUnionType: ... @@ -339,6 +348,7 @@ class FieldInterceptor: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.FieldInterceptor": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.FieldInterceptor": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.FieldInterceptor": ... # type: ignore def _to_py_deprecated(self) -> FieldInterceptor: ... @@ -363,6 +373,7 @@ class UseOpEncode: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.UseOpEncode": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.UseOpEncode": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.UseOpEncode": ... # type: ignore def _to_py_deprecated(self) -> UseOpEncode: ... @@ -392,6 +403,7 @@ class EnumType: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.EnumType": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.EnumType": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.EnumType": ... # type: ignore def _to_py_deprecated(self) -> EnumType: ... @@ -416,6 +428,7 @@ class Frozen2Exclude: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Frozen2Exclude": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Frozen2Exclude": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Frozen2Exclude": ... # type: ignore def _to_py_deprecated(self) -> Frozen2Exclude: ... @@ -440,6 +453,7 @@ class Frozen2RequiresCompleteContainerParams: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Frozen2RequiresCompleteContainerParams": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Frozen2RequiresCompleteContainerParams": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Frozen2RequiresCompleteContainerParams": ... # type: ignore def _to_py_deprecated(self) -> Frozen2RequiresCompleteContainerParams: ... @@ -464,6 +478,7 @@ class ProcessInEbThreadUnsafe: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.ProcessInEbThreadUnsafe": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.ProcessInEbThreadUnsafe": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.ProcessInEbThreadUnsafe": ... # type: ignore def _to_py_deprecated(self) -> ProcessInEbThreadUnsafe: ... @@ -488,6 +503,7 @@ class RuntimeAnnotation: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.RuntimeAnnotation": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.RuntimeAnnotation": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.RuntimeAnnotation": ... # type: ignore def _to_py_deprecated(self) -> RuntimeAnnotation: ... @@ -512,6 +528,7 @@ class UseCursorSerialization: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.UseCursorSerialization": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.UseCursorSerialization": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.UseCursorSerialization": ... # type: ignore def _to_py_deprecated(self) -> UseCursorSerialization: ... @@ -536,6 +553,7 @@ class GenerateDeprecatedHeaderClientMethods: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.GenerateDeprecatedHeaderClientMethods": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.GenerateDeprecatedHeaderClientMethods": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.GenerateDeprecatedHeaderClientMethods": ... # type: ignore def _to_py_deprecated(self) -> GenerateDeprecatedHeaderClientMethods: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/pyi/gen-py/thrift/annotation/scope/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/pyi/gen-py/thrift/annotation/scope/ttypes.pyi index a3cb37070feaaa..a189eb23280b5a 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/pyi/gen-py/thrift/annotation/scope/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/pyi/gen-py/thrift/annotation/scope/ttypes.pyi @@ -38,6 +38,7 @@ class Transitive: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Transitive": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Transitive": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Transitive": ... # type: ignore def _to_py_deprecated(self) -> Transitive: ... @@ -62,6 +63,7 @@ class Program: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Program": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Program": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Program": ... # type: ignore def _to_py_deprecated(self) -> Program: ... @@ -86,6 +88,7 @@ class Struct: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Struct": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Struct": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Struct": ... # type: ignore def _to_py_deprecated(self) -> Struct: ... @@ -110,6 +113,7 @@ class Union: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Union": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Union": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Union": ... # type: ignore def _to_py_deprecated(self) -> Union: ... @@ -134,6 +138,7 @@ class Exception: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Exception": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Exception": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Exception": ... # type: ignore def _to_py_deprecated(self) -> Exception: ... @@ -158,6 +163,7 @@ class Field: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Field": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Field": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Field": ... # type: ignore def _to_py_deprecated(self) -> Field: ... @@ -182,6 +188,7 @@ class Typedef: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Typedef": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Typedef": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Typedef": ... # type: ignore def _to_py_deprecated(self) -> Typedef: ... @@ -206,6 +213,7 @@ class Service: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Service": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Service": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Service": ... # type: ignore def _to_py_deprecated(self) -> Service: ... @@ -230,6 +238,7 @@ class Interaction: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Interaction": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Interaction": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Interaction": ... # type: ignore def _to_py_deprecated(self) -> Interaction: ... @@ -254,6 +263,7 @@ class Function: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Function": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Function": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Function": ... # type: ignore def _to_py_deprecated(self) -> Function: ... @@ -278,6 +288,7 @@ class EnumValue: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.EnumValue": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.EnumValue": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.EnumValue": ... # type: ignore def _to_py_deprecated(self) -> EnumValue: ... @@ -302,6 +313,7 @@ class Const: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Const": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Const": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Const": ... # type: ignore def _to_py_deprecated(self) -> Const: ... @@ -326,6 +338,7 @@ class Enum: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Enum": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Enum": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Enum": ... # type: ignore def _to_py_deprecated(self) -> Enum: ... @@ -350,6 +363,7 @@ class Structured: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Structured": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Structured": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Structured": ... # type: ignore def _to_py_deprecated(self) -> Structured: ... @@ -374,6 +388,7 @@ class Interface: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Interface": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Interface": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Interface": ... # type: ignore def _to_py_deprecated(self) -> Interface: ... @@ -398,6 +413,7 @@ class RootDefinition: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.RootDefinition": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.RootDefinition": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.RootDefinition": ... # type: ignore def _to_py_deprecated(self) -> RootDefinition: ... @@ -422,6 +438,7 @@ class Definition: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Definition": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Definition": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Definition": ... # type: ignore def _to_py_deprecated(self) -> Definition: ... @@ -446,6 +463,7 @@ class DisableSchemaConst: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.DisableSchemaConst": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.DisableSchemaConst": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.DisableSchemaConst": ... # type: ignore def _to_py_deprecated(self) -> DisableSchemaConst: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/pyi/gen-py/thrift/annotation/thrift/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/pyi/gen-py/thrift/annotation/thrift/ttypes.pyi index 3ae5d741f11dbb..cc84702707c5ae 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/pyi/gen-py/thrift/annotation/thrift/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/interactions/out/pyi/gen-py/thrift/annotation/thrift/ttypes.pyi @@ -49,6 +49,7 @@ class Experimental: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Experimental": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Experimental": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Experimental": ... # type: ignore def _to_py_deprecated(self) -> Experimental: ... @@ -83,6 +84,7 @@ class ReserveIds: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.ReserveIds": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.ReserveIds": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.ReserveIds": ... # type: ignore def _to_py_deprecated(self) -> ReserveIds: ... @@ -112,6 +114,7 @@ class RequiresBackwardCompatibility: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.RequiresBackwardCompatibility": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.RequiresBackwardCompatibility": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.RequiresBackwardCompatibility": ... # type: ignore def _to_py_deprecated(self) -> RequiresBackwardCompatibility: ... @@ -136,6 +139,7 @@ class TerseWrite: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.TerseWrite": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.TerseWrite": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.TerseWrite": ... # type: ignore def _to_py_deprecated(self) -> TerseWrite: ... @@ -160,6 +164,7 @@ class Box: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Box": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Box": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Box": ... # type: ignore def _to_py_deprecated(self) -> Box: ... @@ -184,6 +189,7 @@ class Mixin: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Mixin": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Mixin": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Mixin": ... # type: ignore def _to_py_deprecated(self) -> Mixin: ... @@ -208,6 +214,7 @@ class SerializeInFieldIdOrder: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.SerializeInFieldIdOrder": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.SerializeInFieldIdOrder": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.SerializeInFieldIdOrder": ... # type: ignore def _to_py_deprecated(self) -> SerializeInFieldIdOrder: ... @@ -232,6 +239,7 @@ class BitmaskEnum: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.BitmaskEnum": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.BitmaskEnum": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.BitmaskEnum": ... # type: ignore def _to_py_deprecated(self) -> BitmaskEnum: ... @@ -256,6 +264,7 @@ class ExceptionMessage: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.ExceptionMessage": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.ExceptionMessage": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.ExceptionMessage": ... # type: ignore def _to_py_deprecated(self) -> ExceptionMessage: ... @@ -280,6 +289,7 @@ class InternBox: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.InternBox": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.InternBox": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.InternBox": ... # type: ignore def _to_py_deprecated(self) -> InternBox: ... @@ -304,6 +314,7 @@ class Serial: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Serial": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Serial": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Serial": ... # type: ignore def _to_py_deprecated(self) -> Serial: ... @@ -333,6 +344,7 @@ class Uri: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Uri": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Uri": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Uri": ... # type: ignore def _to_py_deprecated(self) -> Uri: ... @@ -362,6 +374,7 @@ class Priority: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Priority": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Priority": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Priority": ... # type: ignore def _to_py_deprecated(self) -> Priority: ... @@ -391,6 +404,7 @@ class DeprecatedUnvalidatedAnnotations: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.DeprecatedUnvalidatedAnnotations": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.DeprecatedUnvalidatedAnnotations": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.DeprecatedUnvalidatedAnnotations": ... # type: ignore def _to_py_deprecated(self) -> DeprecatedUnvalidatedAnnotations: ... @@ -415,6 +429,7 @@ class AllowReservedIdentifier: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.AllowReservedIdentifier": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.AllowReservedIdentifier": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.AllowReservedIdentifier": ... # type: ignore def _to_py_deprecated(self) -> AllowReservedIdentifier: ... @@ -439,6 +454,7 @@ class AllowReservedFilename: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.AllowReservedFilename": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.AllowReservedFilename": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.AllowReservedFilename": ... # type: ignore def _to_py_deprecated(self) -> AllowReservedFilename: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/namespace/out/py/gen-py/my/namespacing/test/module/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/namespace/out/py/gen-py/my/namespacing/test/module/ttypes.py index 8ea0030d4dbcd0..4b937deb36ed1e 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/namespace/out/py/gen-py/my/namespacing/test/module/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/namespace/out/py/gen-py/my/namespacing/test/module/ttypes.py @@ -132,6 +132,12 @@ def _to_python(self): python_types = importlib.import_module("my.namespacing.test.module.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.Foo, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("my.namespacing.test.module.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Foo, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/namespace_from_package/out/py/gen-py/namespace_from_package/module/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/namespace_from_package/out/py/gen-py/namespace_from_package/module/ttypes.py index b32c09dd085a1d..03644b5c44939f 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/namespace_from_package/out/py/gen-py/namespace_from_package/module/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/namespace_from_package/out/py/gen-py/namespace_from_package/module/ttypes.py @@ -157,6 +157,12 @@ def _to_python(self): python_types = importlib.import_module("test.namespace_from_package.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.Foo, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("test.namespace_from_package.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Foo, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/namespace_from_package_without_module_name/out/py/gen-py/namespace_from_package_without_module_name/module/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/namespace_from_package_without_module_name/out/py/gen-py/namespace_from_package_without_module_name/module/ttypes.py index 26589567865725..b57835af4048f1 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/namespace_from_package_without_module_name/out/py/gen-py/namespace_from_package_without_module_name/module/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/namespace_from_package_without_module_name/out/py/gen-py/namespace_from_package_without_module_name/module/ttypes.py @@ -157,6 +157,12 @@ def _to_python(self): python_types = importlib.import_module("test.namespace_from_package_without_module_name.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.Foo, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("test.namespace_from_package_without_module_name.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Foo, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/py-future/out/py/gen-py/test/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/py-future/out/py/gen-py/test/ttypes.py index e2ac3dadca1211..30cb8ed0981b05 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/py-future/out/py/gen-py/test/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/py-future/out/py/gen-py/test/ttypes.py @@ -147,6 +147,12 @@ def _to_python(self): python_types = importlib.import_module("test.thrift_types") return thrift.python.converter.to_python_struct(python_types.TestStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("test.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.TestStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/py-hidden/out/py/gen-py/test/fixtures/hidden_test/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/py-hidden/out/py/gen-py/test/fixtures/hidden_test/ttypes.py index 4f077fcb30f1da..9b0c2a77f18f6a 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/py-hidden/out/py/gen-py/test/fixtures/hidden_test/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/py-hidden/out/py/gen-py/test/fixtures/hidden_test/ttypes.py @@ -136,6 +136,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.StructuredKey, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.StructuredKey, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -250,6 +256,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.S1, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.S1, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -364,6 +376,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.S2, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.S2, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/py-hidden/out/py/gen-py/thrift/annotation/python/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/py-hidden/out/py/gen-py/thrift/annotation/python/ttypes.py index 0b2ef9b23a383d..57575359bd6d3d 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/py-hidden/out/py/gen-py/thrift/annotation/python/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/py-hidden/out/py/gen-py/thrift/annotation/python/ttypes.py @@ -139,6 +139,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.python.thrift_types") return thrift.python.converter.to_python_struct(python_types.Py3Hidden, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.python.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Py3Hidden, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -253,6 +259,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.python.thrift_types") return thrift.python.converter.to_python_struct(python_types.PyDeprecatedHidden, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.python.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.PyDeprecatedHidden, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -344,6 +356,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.python.thrift_types") return thrift.python.converter.to_python_struct(python_types.Flags, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.python.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Flags, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -456,6 +474,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.python.thrift_types") return thrift.python.converter.to_python_struct(python_types.Name, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.python.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Name, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -618,6 +642,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.python.thrift_types") return thrift.python.converter.to_python_struct(python_types.Adapter, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.python.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Adapter, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -736,6 +766,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.python.thrift_types") return thrift.python.converter.to_python_struct(python_types.UseCAPI, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.python.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.UseCAPI, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -830,6 +866,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.python.thrift_types") return thrift.python.converter.to_python_struct(python_types.Py3EnableCppAdapter, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.python.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Py3EnableCppAdapter, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/py-hidden/out/py/gen-py/thrift/annotation/scope/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/py-hidden/out/py/gen-py/thrift/annotation/scope/ttypes.py index c08f21be9694a5..c4c5c8179665df 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/py-hidden/out/py/gen-py/thrift/annotation/scope/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/py-hidden/out/py/gen-py/thrift/annotation/scope/ttypes.py @@ -161,6 +161,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Transitive, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Transitive, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -258,6 +264,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Program, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Program, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -352,6 +364,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Struct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Struct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -446,6 +464,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Union, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Union, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -540,6 +564,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Exception, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Exception, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -634,6 +664,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Field, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Field, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -728,6 +764,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Typedef, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Typedef, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -822,6 +864,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Service, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Service, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -916,6 +964,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Interaction, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Interaction, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1010,6 +1064,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Function, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Function, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1104,6 +1164,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.EnumValue, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.EnumValue, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1198,6 +1264,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Const, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Const, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1289,6 +1361,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Enum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Enum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1383,6 +1461,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Structured, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Structured, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1477,6 +1561,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Interface, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Interface, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1571,6 +1661,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.RootDefinition, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RootDefinition, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1665,6 +1761,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Definition, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Definition, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1760,6 +1862,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.DisableSchemaConst, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DisableSchemaConst, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/py-kwargs/out/py/gen-py/module/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/py-kwargs/out/py/gen-py/module/ttypes.py index fc7af65367653f..8831758f5f0555 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/py-kwargs/out/py/gen-py/module/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/py-kwargs/out/py/gen-py/module/ttypes.py @@ -3957,6 +3957,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.Foo, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Foo, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/py-reserved/out/py/gen-py/test/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/py-reserved/out/py/gen-py/test/ttypes.py index 296addafb36baf..3830bdc3069256 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/py-reserved/out/py/gen-py/test/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/py-reserved/out/py/gen-py/test/ttypes.py @@ -350,6 +350,12 @@ def _to_python(self): python_types = importlib.import_module("test.thrift_types") return thrift.python.converter.to_python_struct(python_types.def_PY_RESERVED_KEYWORD, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("test.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.def_PY_RESERVED_KEYWORD, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/py-sort-keys/out/py/gen-py/module/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/py-sort-keys/out/py/gen-py/module/ttypes.py index d3e8063fe83aa6..5d49f10be5b72c 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/py-sort-keys/out/py/gen-py/module/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/py-sort-keys/out/py/gen-py/module/ttypes.py @@ -178,6 +178,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.Foo, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Foo, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -299,6 +305,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.NegativeId, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.NegativeId, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi/gen-py/simple/dependent/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi/gen-py/simple/dependent/ttypes.pyi index b5b8dadde4274b..53ec83c4c266bc 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi/gen-py/simple/dependent/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi/gen-py/simple/dependent/ttypes.pyi @@ -65,6 +65,7 @@ class Item: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "simple.dependent.dependent.thrift_types.Item": ... # type: ignore + def _to_mutable_python(self) -> "simple.dependent.dependent.thrift_mutable_types.Item": ... # type: ignore def _to_py3(self) -> "simple.dependent.dependent.types.Item": ... # type: ignore def _to_py_deprecated(self) -> Item: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi/gen-py/simple/example/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi/gen-py/simple/example/ttypes.pyi index 0c60e758a97584..dab894a0f84ff3 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi/gen-py/simple/example/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi/gen-py/simple/example/ttypes.pyi @@ -58,6 +58,7 @@ class SimpleException(Thrift.TException): def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "simple.example.shared.thrift_types.SimpleException": ... # type: ignore + def _to_mutable_python(self) -> "simple.example.shared.thrift_mutable_types.SimpleException": ... # type: ignore def _to_py3(self) -> "simple.example.shared.types.SimpleException": ... # type: ignore def _to_py_deprecated(self) -> SimpleException: ... @@ -96,6 +97,7 @@ class MessageException(Thrift.TException): def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "simple.example.shared.thrift_types.MessageException": ... # type: ignore + def _to_mutable_python(self) -> "simple.example.shared.thrift_mutable_types.MessageException": ... # type: ignore def _to_py3(self) -> "simple.example.shared.types.MessageException": ... # type: ignore def _to_py_deprecated(self) -> MessageException: ... @@ -169,6 +171,7 @@ class SimpleStruct: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "simple.example.shared.thrift_types.SimpleStruct": ... # type: ignore + def _to_mutable_python(self) -> "simple.example.shared.thrift_mutable_types.SimpleStruct": ... # type: ignore def _to_py3(self) -> "simple.example.shared.types.SimpleStruct": ... # type: ignore def _to_py_deprecated(self) -> SimpleStruct: ... @@ -252,6 +255,7 @@ class ComplexStruct: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "simple.example.shared.thrift_types.ComplexStruct": ... # type: ignore + def _to_mutable_python(self) -> "simple.example.shared.thrift_mutable_types.ComplexStruct": ... # type: ignore def _to_py3(self) -> "simple.example.shared.types.ComplexStruct": ... # type: ignore def _to_py_deprecated(self) -> ComplexStruct: ... @@ -296,6 +300,7 @@ class UnionStruct: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "simple.example.shared.thrift_types.UnionStruct": ... # type: ignore + def _to_mutable_python(self) -> "simple.example.shared.thrift_mutable_types.UnionStruct": ... # type: ignore def _to_py3(self) -> "simple.example.shared.types.UnionStruct": ... # type: ignore def _to_py_deprecated(self) -> UnionStruct: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi/gen-py/thrift/annotation/scope/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi/gen-py/thrift/annotation/scope/ttypes.pyi index 4b240628e7630f..b0fcf98a1685a5 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi/gen-py/thrift/annotation/scope/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi/gen-py/thrift/annotation/scope/ttypes.pyi @@ -42,6 +42,7 @@ class Transitive: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Transitive": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Transitive": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Transitive": ... # type: ignore def _to_py_deprecated(self) -> Transitive: ... @@ -70,6 +71,7 @@ class Program: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Program": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Program": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Program": ... # type: ignore def _to_py_deprecated(self) -> Program: ... @@ -98,6 +100,7 @@ class Struct: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Struct": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Struct": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Struct": ... # type: ignore def _to_py_deprecated(self) -> Struct: ... @@ -126,6 +129,7 @@ class Union: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Union": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Union": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Union": ... # type: ignore def _to_py_deprecated(self) -> Union: ... @@ -154,6 +158,7 @@ class Exception: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Exception": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Exception": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Exception": ... # type: ignore def _to_py_deprecated(self) -> Exception: ... @@ -182,6 +187,7 @@ class Field: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Field": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Field": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Field": ... # type: ignore def _to_py_deprecated(self) -> Field: ... @@ -210,6 +216,7 @@ class Typedef: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Typedef": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Typedef": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Typedef": ... # type: ignore def _to_py_deprecated(self) -> Typedef: ... @@ -238,6 +245,7 @@ class Service: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Service": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Service": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Service": ... # type: ignore def _to_py_deprecated(self) -> Service: ... @@ -266,6 +274,7 @@ class Interaction: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Interaction": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Interaction": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Interaction": ... # type: ignore def _to_py_deprecated(self) -> Interaction: ... @@ -294,6 +303,7 @@ class Function: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Function": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Function": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Function": ... # type: ignore def _to_py_deprecated(self) -> Function: ... @@ -322,6 +332,7 @@ class EnumValue: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.EnumValue": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.EnumValue": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.EnumValue": ... # type: ignore def _to_py_deprecated(self) -> EnumValue: ... @@ -350,6 +361,7 @@ class Const: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Const": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Const": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Const": ... # type: ignore def _to_py_deprecated(self) -> Const: ... @@ -378,6 +390,7 @@ class Enum: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Enum": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Enum": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Enum": ... # type: ignore def _to_py_deprecated(self) -> Enum: ... @@ -406,6 +419,7 @@ class Structured: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Structured": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Structured": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Structured": ... # type: ignore def _to_py_deprecated(self) -> Structured: ... @@ -434,6 +448,7 @@ class Interface: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Interface": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Interface": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Interface": ... # type: ignore def _to_py_deprecated(self) -> Interface: ... @@ -462,6 +477,7 @@ class RootDefinition: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.RootDefinition": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.RootDefinition": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.RootDefinition": ... # type: ignore def _to_py_deprecated(self) -> RootDefinition: ... @@ -490,6 +506,7 @@ class Definition: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Definition": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Definition": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Definition": ... # type: ignore def _to_py_deprecated(self) -> Definition: ... @@ -518,6 +535,7 @@ class DisableSchemaConst: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.DisableSchemaConst": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.DisableSchemaConst": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.DisableSchemaConst": ... # type: ignore def _to_py_deprecated(self) -> DisableSchemaConst: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi/gen-py/thrift/annotation/thrift/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi/gen-py/thrift/annotation/thrift/ttypes.pyi index 98eb22e87a432d..8e4bb378fa1248 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi/gen-py/thrift/annotation/thrift/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi/gen-py/thrift/annotation/thrift/ttypes.pyi @@ -53,6 +53,7 @@ class Experimental: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Experimental": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Experimental": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Experimental": ... # type: ignore def _to_py_deprecated(self) -> Experimental: ... @@ -91,6 +92,7 @@ class ReserveIds: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.ReserveIds": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.ReserveIds": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.ReserveIds": ... # type: ignore def _to_py_deprecated(self) -> ReserveIds: ... @@ -124,6 +126,7 @@ class RequiresBackwardCompatibility: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.RequiresBackwardCompatibility": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.RequiresBackwardCompatibility": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.RequiresBackwardCompatibility": ... # type: ignore def _to_py_deprecated(self) -> RequiresBackwardCompatibility: ... @@ -152,6 +155,7 @@ class TerseWrite: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.TerseWrite": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.TerseWrite": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.TerseWrite": ... # type: ignore def _to_py_deprecated(self) -> TerseWrite: ... @@ -180,6 +184,7 @@ class Box: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Box": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Box": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Box": ... # type: ignore def _to_py_deprecated(self) -> Box: ... @@ -208,6 +213,7 @@ class Mixin: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Mixin": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Mixin": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Mixin": ... # type: ignore def _to_py_deprecated(self) -> Mixin: ... @@ -236,6 +242,7 @@ class SerializeInFieldIdOrder: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.SerializeInFieldIdOrder": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.SerializeInFieldIdOrder": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.SerializeInFieldIdOrder": ... # type: ignore def _to_py_deprecated(self) -> SerializeInFieldIdOrder: ... @@ -264,6 +271,7 @@ class BitmaskEnum: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.BitmaskEnum": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.BitmaskEnum": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.BitmaskEnum": ... # type: ignore def _to_py_deprecated(self) -> BitmaskEnum: ... @@ -292,6 +300,7 @@ class ExceptionMessage: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.ExceptionMessage": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.ExceptionMessage": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.ExceptionMessage": ... # type: ignore def _to_py_deprecated(self) -> ExceptionMessage: ... @@ -320,6 +329,7 @@ class InternBox: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.InternBox": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.InternBox": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.InternBox": ... # type: ignore def _to_py_deprecated(self) -> InternBox: ... @@ -348,6 +358,7 @@ class Serial: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Serial": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Serial": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Serial": ... # type: ignore def _to_py_deprecated(self) -> Serial: ... @@ -381,6 +392,7 @@ class Uri: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Uri": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Uri": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Uri": ... # type: ignore def _to_py_deprecated(self) -> Uri: ... @@ -414,6 +426,7 @@ class Priority: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Priority": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Priority": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Priority": ... # type: ignore def _to_py_deprecated(self) -> Priority: ... @@ -447,6 +460,7 @@ class DeprecatedUnvalidatedAnnotations: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.DeprecatedUnvalidatedAnnotations": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.DeprecatedUnvalidatedAnnotations": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.DeprecatedUnvalidatedAnnotations": ... # type: ignore def _to_py_deprecated(self) -> DeprecatedUnvalidatedAnnotations: ... @@ -475,6 +489,7 @@ class AllowReservedIdentifier: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.AllowReservedIdentifier": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.AllowReservedIdentifier": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.AllowReservedIdentifier": ... # type: ignore def _to_py_deprecated(self) -> AllowReservedIdentifier: ... @@ -503,6 +518,7 @@ class AllowReservedFilename: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.AllowReservedFilename": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.AllowReservedFilename": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.AllowReservedFilename": ... # type: ignore def _to_py_deprecated(self) -> AllowReservedFilename: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi_asyncio/gen-py/facebook_thrift_asyncio/annotation/scope/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi_asyncio/gen-py/facebook_thrift_asyncio/annotation/scope/ttypes.pyi index 4b240628e7630f..b0fcf98a1685a5 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi_asyncio/gen-py/facebook_thrift_asyncio/annotation/scope/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi_asyncio/gen-py/facebook_thrift_asyncio/annotation/scope/ttypes.pyi @@ -42,6 +42,7 @@ class Transitive: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Transitive": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Transitive": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Transitive": ... # type: ignore def _to_py_deprecated(self) -> Transitive: ... @@ -70,6 +71,7 @@ class Program: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Program": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Program": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Program": ... # type: ignore def _to_py_deprecated(self) -> Program: ... @@ -98,6 +100,7 @@ class Struct: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Struct": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Struct": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Struct": ... # type: ignore def _to_py_deprecated(self) -> Struct: ... @@ -126,6 +129,7 @@ class Union: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Union": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Union": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Union": ... # type: ignore def _to_py_deprecated(self) -> Union: ... @@ -154,6 +158,7 @@ class Exception: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Exception": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Exception": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Exception": ... # type: ignore def _to_py_deprecated(self) -> Exception: ... @@ -182,6 +187,7 @@ class Field: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Field": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Field": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Field": ... # type: ignore def _to_py_deprecated(self) -> Field: ... @@ -210,6 +216,7 @@ class Typedef: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Typedef": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Typedef": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Typedef": ... # type: ignore def _to_py_deprecated(self) -> Typedef: ... @@ -238,6 +245,7 @@ class Service: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Service": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Service": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Service": ... # type: ignore def _to_py_deprecated(self) -> Service: ... @@ -266,6 +274,7 @@ class Interaction: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Interaction": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Interaction": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Interaction": ... # type: ignore def _to_py_deprecated(self) -> Interaction: ... @@ -294,6 +303,7 @@ class Function: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Function": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Function": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Function": ... # type: ignore def _to_py_deprecated(self) -> Function: ... @@ -322,6 +332,7 @@ class EnumValue: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.EnumValue": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.EnumValue": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.EnumValue": ... # type: ignore def _to_py_deprecated(self) -> EnumValue: ... @@ -350,6 +361,7 @@ class Const: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Const": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Const": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Const": ... # type: ignore def _to_py_deprecated(self) -> Const: ... @@ -378,6 +390,7 @@ class Enum: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Enum": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Enum": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Enum": ... # type: ignore def _to_py_deprecated(self) -> Enum: ... @@ -406,6 +419,7 @@ class Structured: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Structured": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Structured": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Structured": ... # type: ignore def _to_py_deprecated(self) -> Structured: ... @@ -434,6 +448,7 @@ class Interface: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Interface": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Interface": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Interface": ... # type: ignore def _to_py_deprecated(self) -> Interface: ... @@ -462,6 +477,7 @@ class RootDefinition: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.RootDefinition": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.RootDefinition": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.RootDefinition": ... # type: ignore def _to_py_deprecated(self) -> RootDefinition: ... @@ -490,6 +506,7 @@ class Definition: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Definition": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Definition": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Definition": ... # type: ignore def _to_py_deprecated(self) -> Definition: ... @@ -518,6 +535,7 @@ class DisableSchemaConst: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.DisableSchemaConst": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.DisableSchemaConst": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.DisableSchemaConst": ... # type: ignore def _to_py_deprecated(self) -> DisableSchemaConst: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi_asyncio/gen-py/facebook_thrift_asyncio/annotation/thrift/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi_asyncio/gen-py/facebook_thrift_asyncio/annotation/thrift/ttypes.pyi index 98eb22e87a432d..8e4bb378fa1248 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi_asyncio/gen-py/facebook_thrift_asyncio/annotation/thrift/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi_asyncio/gen-py/facebook_thrift_asyncio/annotation/thrift/ttypes.pyi @@ -53,6 +53,7 @@ class Experimental: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Experimental": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Experimental": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Experimental": ... # type: ignore def _to_py_deprecated(self) -> Experimental: ... @@ -91,6 +92,7 @@ class ReserveIds: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.ReserveIds": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.ReserveIds": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.ReserveIds": ... # type: ignore def _to_py_deprecated(self) -> ReserveIds: ... @@ -124,6 +126,7 @@ class RequiresBackwardCompatibility: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.RequiresBackwardCompatibility": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.RequiresBackwardCompatibility": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.RequiresBackwardCompatibility": ... # type: ignore def _to_py_deprecated(self) -> RequiresBackwardCompatibility: ... @@ -152,6 +155,7 @@ class TerseWrite: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.TerseWrite": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.TerseWrite": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.TerseWrite": ... # type: ignore def _to_py_deprecated(self) -> TerseWrite: ... @@ -180,6 +184,7 @@ class Box: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Box": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Box": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Box": ... # type: ignore def _to_py_deprecated(self) -> Box: ... @@ -208,6 +213,7 @@ class Mixin: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Mixin": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Mixin": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Mixin": ... # type: ignore def _to_py_deprecated(self) -> Mixin: ... @@ -236,6 +242,7 @@ class SerializeInFieldIdOrder: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.SerializeInFieldIdOrder": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.SerializeInFieldIdOrder": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.SerializeInFieldIdOrder": ... # type: ignore def _to_py_deprecated(self) -> SerializeInFieldIdOrder: ... @@ -264,6 +271,7 @@ class BitmaskEnum: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.BitmaskEnum": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.BitmaskEnum": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.BitmaskEnum": ... # type: ignore def _to_py_deprecated(self) -> BitmaskEnum: ... @@ -292,6 +300,7 @@ class ExceptionMessage: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.ExceptionMessage": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.ExceptionMessage": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.ExceptionMessage": ... # type: ignore def _to_py_deprecated(self) -> ExceptionMessage: ... @@ -320,6 +329,7 @@ class InternBox: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.InternBox": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.InternBox": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.InternBox": ... # type: ignore def _to_py_deprecated(self) -> InternBox: ... @@ -348,6 +358,7 @@ class Serial: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Serial": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Serial": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Serial": ... # type: ignore def _to_py_deprecated(self) -> Serial: ... @@ -381,6 +392,7 @@ class Uri: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Uri": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Uri": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Uri": ... # type: ignore def _to_py_deprecated(self) -> Uri: ... @@ -414,6 +426,7 @@ class Priority: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Priority": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Priority": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Priority": ... # type: ignore def _to_py_deprecated(self) -> Priority: ... @@ -447,6 +460,7 @@ class DeprecatedUnvalidatedAnnotations: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.DeprecatedUnvalidatedAnnotations": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.DeprecatedUnvalidatedAnnotations": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.DeprecatedUnvalidatedAnnotations": ... # type: ignore def _to_py_deprecated(self) -> DeprecatedUnvalidatedAnnotations: ... @@ -475,6 +489,7 @@ class AllowReservedIdentifier: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.AllowReservedIdentifier": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.AllowReservedIdentifier": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.AllowReservedIdentifier": ... # type: ignore def _to_py_deprecated(self) -> AllowReservedIdentifier: ... @@ -503,6 +518,7 @@ class AllowReservedFilename: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.AllowReservedFilename": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.AllowReservedFilename": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.AllowReservedFilename": ... # type: ignore def _to_py_deprecated(self) -> AllowReservedFilename: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi_asyncio/gen-py/simple/dependent_asyncio/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi_asyncio/gen-py/simple/dependent_asyncio/ttypes.pyi index b5b8dadde4274b..53ec83c4c266bc 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi_asyncio/gen-py/simple/dependent_asyncio/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi_asyncio/gen-py/simple/dependent_asyncio/ttypes.pyi @@ -65,6 +65,7 @@ class Item: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "simple.dependent.dependent.thrift_types.Item": ... # type: ignore + def _to_mutable_python(self) -> "simple.dependent.dependent.thrift_mutable_types.Item": ... # type: ignore def _to_py3(self) -> "simple.dependent.dependent.types.Item": ... # type: ignore def _to_py_deprecated(self) -> Item: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi_asyncio/gen-py/simple/example_asyncio/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi_asyncio/gen-py/simple/example_asyncio/ttypes.pyi index 81564f7676f405..6b0bdfd704a5d2 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi_asyncio/gen-py/simple/example_asyncio/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/pyi/out/pyi_asyncio/gen-py/simple/example_asyncio/ttypes.pyi @@ -58,6 +58,7 @@ class SimpleException(Thrift.TException): def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "simple.example.shared.thrift_types.SimpleException": ... # type: ignore + def _to_mutable_python(self) -> "simple.example.shared.thrift_mutable_types.SimpleException": ... # type: ignore def _to_py3(self) -> "simple.example.shared.types.SimpleException": ... # type: ignore def _to_py_deprecated(self) -> SimpleException: ... @@ -96,6 +97,7 @@ class MessageException(Thrift.TException): def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "simple.example.shared.thrift_types.MessageException": ... # type: ignore + def _to_mutable_python(self) -> "simple.example.shared.thrift_mutable_types.MessageException": ... # type: ignore def _to_py3(self) -> "simple.example.shared.types.MessageException": ... # type: ignore def _to_py_deprecated(self) -> MessageException: ... @@ -169,6 +171,7 @@ class SimpleStruct: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "simple.example.shared.thrift_types.SimpleStruct": ... # type: ignore + def _to_mutable_python(self) -> "simple.example.shared.thrift_mutable_types.SimpleStruct": ... # type: ignore def _to_py3(self) -> "simple.example.shared.types.SimpleStruct": ... # type: ignore def _to_py_deprecated(self) -> SimpleStruct: ... @@ -252,6 +255,7 @@ class ComplexStruct: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "simple.example.shared.thrift_types.ComplexStruct": ... # type: ignore + def _to_mutable_python(self) -> "simple.example.shared.thrift_mutable_types.ComplexStruct": ... # type: ignore def _to_py3(self) -> "simple.example.shared.types.ComplexStruct": ... # type: ignore def _to_py_deprecated(self) -> ComplexStruct: ... @@ -296,6 +300,7 @@ class UnionStruct: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "simple.example.shared.thrift_types.UnionStruct": ... # type: ignore + def _to_mutable_python(self) -> "simple.example.shared.thrift_mutable_types.UnionStruct": ... # type: ignore def _to_py3(self) -> "simple.example.shared.types.UnionStruct": ... # type: ignore def _to_py_deprecated(self) -> UnionStruct: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/serialization_field_order/out/py/gen-py/module/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/serialization_field_order/out/py/gen-py/module/ttypes.py index 59cd5d98614240..a3a16405ff3604 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/serialization_field_order/out/py/gen-py/module/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/serialization_field_order/out/py/gen-py/module/ttypes.py @@ -197,6 +197,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.Foo, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Foo, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -349,6 +355,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.Foo2, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Foo2, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/serialization_field_order/out/py/gen-py/thrift/annotation/scope/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/serialization_field_order/out/py/gen-py/thrift/annotation/scope/ttypes.py index c08f21be9694a5..c4c5c8179665df 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/serialization_field_order/out/py/gen-py/thrift/annotation/scope/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/serialization_field_order/out/py/gen-py/thrift/annotation/scope/ttypes.py @@ -161,6 +161,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Transitive, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Transitive, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -258,6 +264,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Program, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Program, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -352,6 +364,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Struct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Struct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -446,6 +464,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Union, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Union, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -540,6 +564,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Exception, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Exception, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -634,6 +664,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Field, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Field, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -728,6 +764,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Typedef, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Typedef, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -822,6 +864,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Service, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Service, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -916,6 +964,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Interaction, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Interaction, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1010,6 +1064,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Function, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Function, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1104,6 +1164,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.EnumValue, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.EnumValue, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1198,6 +1264,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Const, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Const, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1289,6 +1361,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Enum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Enum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1383,6 +1461,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Structured, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Structured, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1477,6 +1561,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Interface, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Interface, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1571,6 +1661,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.RootDefinition, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RootDefinition, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1665,6 +1761,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Definition, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Definition, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1760,6 +1862,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.DisableSchemaConst, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DisableSchemaConst, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/serialization_field_order/out/py/gen-py/thrift/annotation/thrift/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/serialization_field_order/out/py/gen-py/thrift/annotation/thrift/ttypes.py index 386d80397db35f..2447eaa8e64b55 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/serialization_field_order/out/py/gen-py/thrift/annotation/thrift/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/serialization_field_order/out/py/gen-py/thrift/annotation/thrift/ttypes.py @@ -165,6 +165,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Experimental, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Experimental, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -355,6 +361,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.ReserveIds, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ReserveIds, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -470,6 +482,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.RequiresBackwardCompatibility, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RequiresBackwardCompatibility, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -574,6 +592,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.TerseWrite, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.TerseWrite, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -696,6 +720,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Box, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Box, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -791,6 +821,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Mixin, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Mixin, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -890,6 +926,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.SerializeInFieldIdOrder, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.SerializeInFieldIdOrder, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -985,6 +1027,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.BitmaskEnum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.BitmaskEnum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1098,6 +1146,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.ExceptionMessage, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ExceptionMessage, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1193,6 +1247,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.InternBox, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.InternBox, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1287,6 +1347,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Serial, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Serial, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1401,6 +1467,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Uri, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Uri, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1523,6 +1595,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Priority, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Priority, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1656,6 +1734,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.DeprecatedUnvalidatedAnnotations, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DeprecatedUnvalidatedAnnotations, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1757,6 +1841,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.AllowReservedIdentifier, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AllowReservedIdentifier, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1848,6 +1938,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.AllowReservedFilename, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AllowReservedFilename, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/serialization_field_order/out/pyi/gen-py/module/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/serialization_field_order/out/pyi/gen-py/module/ttypes.pyi index 79b0891b83e3d4..0cc268f8223d25 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/serialization_field_order/out/pyi/gen-py/module/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/serialization_field_order/out/pyi/gen-py/module/ttypes.pyi @@ -57,6 +57,7 @@ class Foo: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "module.thrift_types.Foo": ... # type: ignore + def _to_mutable_python(self) -> "module.thrift_mutable_types.Foo": ... # type: ignore def _to_py3(self) -> "module.types.Foo": ... # type: ignore def _to_py_deprecated(self) -> Foo: ... @@ -100,6 +101,7 @@ class Foo2: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "module.thrift_types.Foo2": ... # type: ignore + def _to_mutable_python(self) -> "module.thrift_mutable_types.Foo2": ... # type: ignore def _to_py3(self) -> "module.types.Foo2": ... # type: ignore def _to_py_deprecated(self) -> Foo2: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/serialization_field_order/out/pyi/gen-py/thrift/annotation/scope/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/serialization_field_order/out/pyi/gen-py/thrift/annotation/scope/ttypes.pyi index 4b240628e7630f..b0fcf98a1685a5 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/serialization_field_order/out/pyi/gen-py/thrift/annotation/scope/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/serialization_field_order/out/pyi/gen-py/thrift/annotation/scope/ttypes.pyi @@ -42,6 +42,7 @@ class Transitive: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Transitive": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Transitive": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Transitive": ... # type: ignore def _to_py_deprecated(self) -> Transitive: ... @@ -70,6 +71,7 @@ class Program: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Program": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Program": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Program": ... # type: ignore def _to_py_deprecated(self) -> Program: ... @@ -98,6 +100,7 @@ class Struct: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Struct": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Struct": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Struct": ... # type: ignore def _to_py_deprecated(self) -> Struct: ... @@ -126,6 +129,7 @@ class Union: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Union": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Union": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Union": ... # type: ignore def _to_py_deprecated(self) -> Union: ... @@ -154,6 +158,7 @@ class Exception: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Exception": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Exception": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Exception": ... # type: ignore def _to_py_deprecated(self) -> Exception: ... @@ -182,6 +187,7 @@ class Field: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Field": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Field": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Field": ... # type: ignore def _to_py_deprecated(self) -> Field: ... @@ -210,6 +216,7 @@ class Typedef: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Typedef": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Typedef": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Typedef": ... # type: ignore def _to_py_deprecated(self) -> Typedef: ... @@ -238,6 +245,7 @@ class Service: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Service": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Service": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Service": ... # type: ignore def _to_py_deprecated(self) -> Service: ... @@ -266,6 +274,7 @@ class Interaction: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Interaction": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Interaction": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Interaction": ... # type: ignore def _to_py_deprecated(self) -> Interaction: ... @@ -294,6 +303,7 @@ class Function: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Function": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Function": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Function": ... # type: ignore def _to_py_deprecated(self) -> Function: ... @@ -322,6 +332,7 @@ class EnumValue: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.EnumValue": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.EnumValue": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.EnumValue": ... # type: ignore def _to_py_deprecated(self) -> EnumValue: ... @@ -350,6 +361,7 @@ class Const: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Const": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Const": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Const": ... # type: ignore def _to_py_deprecated(self) -> Const: ... @@ -378,6 +390,7 @@ class Enum: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Enum": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Enum": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Enum": ... # type: ignore def _to_py_deprecated(self) -> Enum: ... @@ -406,6 +419,7 @@ class Structured: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Structured": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Structured": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Structured": ... # type: ignore def _to_py_deprecated(self) -> Structured: ... @@ -434,6 +448,7 @@ class Interface: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Interface": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Interface": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Interface": ... # type: ignore def _to_py_deprecated(self) -> Interface: ... @@ -462,6 +477,7 @@ class RootDefinition: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.RootDefinition": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.RootDefinition": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.RootDefinition": ... # type: ignore def _to_py_deprecated(self) -> RootDefinition: ... @@ -490,6 +506,7 @@ class Definition: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Definition": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Definition": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Definition": ... # type: ignore def _to_py_deprecated(self) -> Definition: ... @@ -518,6 +535,7 @@ class DisableSchemaConst: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.DisableSchemaConst": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.DisableSchemaConst": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.DisableSchemaConst": ... # type: ignore def _to_py_deprecated(self) -> DisableSchemaConst: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/serialization_field_order/out/pyi/gen-py/thrift/annotation/thrift/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/serialization_field_order/out/pyi/gen-py/thrift/annotation/thrift/ttypes.pyi index 98eb22e87a432d..8e4bb378fa1248 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/serialization_field_order/out/pyi/gen-py/thrift/annotation/thrift/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/serialization_field_order/out/pyi/gen-py/thrift/annotation/thrift/ttypes.pyi @@ -53,6 +53,7 @@ class Experimental: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Experimental": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Experimental": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Experimental": ... # type: ignore def _to_py_deprecated(self) -> Experimental: ... @@ -91,6 +92,7 @@ class ReserveIds: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.ReserveIds": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.ReserveIds": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.ReserveIds": ... # type: ignore def _to_py_deprecated(self) -> ReserveIds: ... @@ -124,6 +126,7 @@ class RequiresBackwardCompatibility: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.RequiresBackwardCompatibility": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.RequiresBackwardCompatibility": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.RequiresBackwardCompatibility": ... # type: ignore def _to_py_deprecated(self) -> RequiresBackwardCompatibility: ... @@ -152,6 +155,7 @@ class TerseWrite: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.TerseWrite": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.TerseWrite": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.TerseWrite": ... # type: ignore def _to_py_deprecated(self) -> TerseWrite: ... @@ -180,6 +184,7 @@ class Box: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Box": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Box": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Box": ... # type: ignore def _to_py_deprecated(self) -> Box: ... @@ -208,6 +213,7 @@ class Mixin: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Mixin": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Mixin": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Mixin": ... # type: ignore def _to_py_deprecated(self) -> Mixin: ... @@ -236,6 +242,7 @@ class SerializeInFieldIdOrder: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.SerializeInFieldIdOrder": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.SerializeInFieldIdOrder": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.SerializeInFieldIdOrder": ... # type: ignore def _to_py_deprecated(self) -> SerializeInFieldIdOrder: ... @@ -264,6 +271,7 @@ class BitmaskEnum: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.BitmaskEnum": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.BitmaskEnum": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.BitmaskEnum": ... # type: ignore def _to_py_deprecated(self) -> BitmaskEnum: ... @@ -292,6 +300,7 @@ class ExceptionMessage: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.ExceptionMessage": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.ExceptionMessage": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.ExceptionMessage": ... # type: ignore def _to_py_deprecated(self) -> ExceptionMessage: ... @@ -320,6 +329,7 @@ class InternBox: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.InternBox": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.InternBox": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.InternBox": ... # type: ignore def _to_py_deprecated(self) -> InternBox: ... @@ -348,6 +358,7 @@ class Serial: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Serial": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Serial": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Serial": ... # type: ignore def _to_py_deprecated(self) -> Serial: ... @@ -381,6 +392,7 @@ class Uri: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Uri": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Uri": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Uri": ... # type: ignore def _to_py_deprecated(self) -> Uri: ... @@ -414,6 +426,7 @@ class Priority: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Priority": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Priority": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Priority": ... # type: ignore def _to_py_deprecated(self) -> Priority: ... @@ -447,6 +460,7 @@ class DeprecatedUnvalidatedAnnotations: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.DeprecatedUnvalidatedAnnotations": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.DeprecatedUnvalidatedAnnotations": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.DeprecatedUnvalidatedAnnotations": ... # type: ignore def _to_py_deprecated(self) -> DeprecatedUnvalidatedAnnotations: ... @@ -475,6 +489,7 @@ class AllowReservedIdentifier: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.AllowReservedIdentifier": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.AllowReservedIdentifier": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.AllowReservedIdentifier": ... # type: ignore def _to_py_deprecated(self) -> AllowReservedIdentifier: ... @@ -503,6 +518,7 @@ class AllowReservedFilename: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.AllowReservedFilename": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.AllowReservedFilename": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.AllowReservedFilename": ... # type: ignore def _to_py_deprecated(self) -> AllowReservedFilename: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/py/gen-py/module/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/py/gen-py/module/ttypes.py index 6ac952ef8289e2..b8ad9753eaaaa7 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/py/gen-py/module/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/py/gen-py/module/ttypes.py @@ -157,6 +157,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.InitialResponse, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.InitialResponse, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -269,6 +275,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.FinalResponse, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.FinalResponse, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -381,6 +393,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.SinkPayload, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.SinkPayload, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -493,6 +511,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.CompatibleWithKeywordSink, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.CompatibleWithKeywordSink, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -612,6 +636,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.InitialException, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.InitialException, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -731,6 +761,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.SinkException1, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.SinkException1, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -850,6 +886,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.SinkException2, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.SinkException2, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/py/gen-py/thrift/annotation/cpp/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/py/gen-py/thrift/annotation/cpp/ttypes.py index 520b681121a61e..8d60067bbe8759 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/py/gen-py/thrift/annotation/cpp/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/py/gen-py/thrift/annotation/cpp/ttypes.py @@ -209,6 +209,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Name, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Name, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -353,6 +359,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Type, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Type, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -479,6 +491,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Ref, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Ref, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -607,6 +625,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Lazy, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Lazy, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -698,6 +722,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.DisableLazyChecksum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DisableLazyChecksum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -924,6 +954,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Adapter, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Adapter, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1040,6 +1076,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.PackIsset, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.PackIsset, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1158,6 +1200,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.MinimizePadding, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MinimizePadding, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1249,6 +1297,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.ScopedEnumAsUnionType, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ScopedEnumAsUnionType, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1403,6 +1457,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.FieldInterceptor, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.FieldInterceptor, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1494,6 +1554,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.UseOpEncode, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.UseOpEncode, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1630,6 +1696,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.EnumType, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.EnumType, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1724,6 +1796,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Frozen2Exclude, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Frozen2Exclude, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1819,6 +1897,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Frozen2RequiresCompleteContainerParams, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Frozen2RequiresCompleteContainerParams, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1921,6 +2005,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.ProcessInEbThreadUnsafe, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ProcessInEbThreadUnsafe, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2015,6 +2105,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.RuntimeAnnotation, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RuntimeAnnotation, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2112,6 +2208,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.UseCursorSerialization, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.UseCursorSerialization, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2220,6 +2322,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.GenerateDeprecatedHeaderClientMethods, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.GenerateDeprecatedHeaderClientMethods, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/py/gen-py/thrift/annotation/scope/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/py/gen-py/thrift/annotation/scope/ttypes.py index c08f21be9694a5..c4c5c8179665df 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/py/gen-py/thrift/annotation/scope/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/py/gen-py/thrift/annotation/scope/ttypes.py @@ -161,6 +161,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Transitive, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Transitive, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -258,6 +264,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Program, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Program, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -352,6 +364,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Struct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Struct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -446,6 +464,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Union, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Union, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -540,6 +564,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Exception, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Exception, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -634,6 +664,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Field, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Field, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -728,6 +764,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Typedef, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Typedef, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -822,6 +864,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Service, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Service, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -916,6 +964,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Interaction, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Interaction, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1010,6 +1064,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Function, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Function, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1104,6 +1164,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.EnumValue, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.EnumValue, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1198,6 +1264,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Const, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Const, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1289,6 +1361,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Enum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Enum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1383,6 +1461,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Structured, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Structured, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1477,6 +1561,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Interface, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Interface, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1571,6 +1661,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.RootDefinition, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RootDefinition, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1665,6 +1761,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Definition, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Definition, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1760,6 +1862,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.DisableSchemaConst, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DisableSchemaConst, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/py/gen-py/thrift/annotation/thrift/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/py/gen-py/thrift/annotation/thrift/ttypes.py index 386d80397db35f..2447eaa8e64b55 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/py/gen-py/thrift/annotation/thrift/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/py/gen-py/thrift/annotation/thrift/ttypes.py @@ -165,6 +165,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Experimental, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Experimental, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -355,6 +361,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.ReserveIds, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ReserveIds, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -470,6 +482,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.RequiresBackwardCompatibility, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RequiresBackwardCompatibility, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -574,6 +592,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.TerseWrite, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.TerseWrite, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -696,6 +720,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Box, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Box, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -791,6 +821,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Mixin, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Mixin, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -890,6 +926,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.SerializeInFieldIdOrder, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.SerializeInFieldIdOrder, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -985,6 +1027,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.BitmaskEnum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.BitmaskEnum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1098,6 +1146,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.ExceptionMessage, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ExceptionMessage, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1193,6 +1247,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.InternBox, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.InternBox, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1287,6 +1347,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Serial, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Serial, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1401,6 +1467,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Uri, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Uri, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1523,6 +1595,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Priority, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Priority, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1656,6 +1734,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.DeprecatedUnvalidatedAnnotations, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DeprecatedUnvalidatedAnnotations, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1757,6 +1841,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.AllowReservedIdentifier, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AllowReservedIdentifier, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1848,6 +1938,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.AllowReservedFilename, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AllowReservedFilename, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/pyi/gen-py/module/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/pyi/gen-py/module/ttypes.pyi index e21f765de7729f..e143ccb6858e85 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/pyi/gen-py/module/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/pyi/gen-py/module/ttypes.pyi @@ -43,6 +43,7 @@ class InitialResponse: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "module.thrift_types.InitialResponse": ... # type: ignore + def _to_mutable_python(self) -> "module.thrift_mutable_types.InitialResponse": ... # type: ignore def _to_py3(self) -> "module.types.InitialResponse": ... # type: ignore def _to_py_deprecated(self) -> InitialResponse: ... @@ -72,6 +73,7 @@ class FinalResponse: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "module.thrift_types.FinalResponse": ... # type: ignore + def _to_mutable_python(self) -> "module.thrift_mutable_types.FinalResponse": ... # type: ignore def _to_py3(self) -> "module.types.FinalResponse": ... # type: ignore def _to_py_deprecated(self) -> FinalResponse: ... @@ -101,6 +103,7 @@ class SinkPayload: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "module.thrift_types.SinkPayload": ... # type: ignore + def _to_mutable_python(self) -> "module.thrift_mutable_types.SinkPayload": ... # type: ignore def _to_py3(self) -> "module.types.SinkPayload": ... # type: ignore def _to_py_deprecated(self) -> SinkPayload: ... @@ -130,6 +133,7 @@ class CompatibleWithKeywordSink: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "module.thrift_types.CompatibleWithKeywordSink": ... # type: ignore + def _to_mutable_python(self) -> "module.thrift_mutable_types.CompatibleWithKeywordSink": ... # type: ignore def _to_py3(self) -> "module.types.CompatibleWithKeywordSink": ... # type: ignore def _to_py_deprecated(self) -> CompatibleWithKeywordSink: ... @@ -159,6 +163,7 @@ class InitialException(Thrift.TException): def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "module.thrift_types.InitialException": ... # type: ignore + def _to_mutable_python(self) -> "module.thrift_mutable_types.InitialException": ... # type: ignore def _to_py3(self) -> "module.types.InitialException": ... # type: ignore def _to_py_deprecated(self) -> InitialException: ... @@ -188,6 +193,7 @@ class SinkException1(Thrift.TException): def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "module.thrift_types.SinkException1": ... # type: ignore + def _to_mutable_python(self) -> "module.thrift_mutable_types.SinkException1": ... # type: ignore def _to_py3(self) -> "module.types.SinkException1": ... # type: ignore def _to_py_deprecated(self) -> SinkException1: ... @@ -217,6 +223,7 @@ class SinkException2(Thrift.TException): def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "module.thrift_types.SinkException2": ... # type: ignore + def _to_mutable_python(self) -> "module.thrift_mutable_types.SinkException2": ... # type: ignore def _to_py3(self) -> "module.types.SinkException2": ... # type: ignore def _to_py_deprecated(self) -> SinkException2: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/pyi/gen-py/thrift/annotation/cpp/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/pyi/gen-py/thrift/annotation/cpp/ttypes.pyi index b6612e5cc4d267..4b52c6f87ee53a 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/pyi/gen-py/thrift/annotation/cpp/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/pyi/gen-py/thrift/annotation/cpp/ttypes.pyi @@ -63,6 +63,7 @@ class Name: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Name": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Name": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Name": ... # type: ignore def _to_py_deprecated(self) -> Name: ... @@ -97,6 +98,7 @@ class Type: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Type": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Type": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Type": ... # type: ignore def _to_py_deprecated(self) -> Type: ... @@ -126,6 +128,7 @@ class Ref: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Ref": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Ref": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Ref": ... # type: ignore def _to_py_deprecated(self) -> Ref: ... @@ -155,6 +158,7 @@ class Lazy: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Lazy": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Lazy": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Lazy": ... # type: ignore def _to_py_deprecated(self) -> Lazy: ... @@ -179,6 +183,7 @@ class DisableLazyChecksum: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.DisableLazyChecksum": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.DisableLazyChecksum": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.DisableLazyChecksum": ... # type: ignore def _to_py_deprecated(self) -> DisableLazyChecksum: ... @@ -228,6 +233,7 @@ class Adapter: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Adapter": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Adapter": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Adapter": ... # type: ignore def _to_py_deprecated(self) -> Adapter: ... @@ -257,6 +263,7 @@ class PackIsset: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.PackIsset": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.PackIsset": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.PackIsset": ... # type: ignore def _to_py_deprecated(self) -> PackIsset: ... @@ -281,6 +288,7 @@ class MinimizePadding: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.MinimizePadding": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.MinimizePadding": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.MinimizePadding": ... # type: ignore def _to_py_deprecated(self) -> MinimizePadding: ... @@ -305,6 +313,7 @@ class ScopedEnumAsUnionType: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.ScopedEnumAsUnionType": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.ScopedEnumAsUnionType": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.ScopedEnumAsUnionType": ... # type: ignore def _to_py_deprecated(self) -> ScopedEnumAsUnionType: ... @@ -339,6 +348,7 @@ class FieldInterceptor: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.FieldInterceptor": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.FieldInterceptor": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.FieldInterceptor": ... # type: ignore def _to_py_deprecated(self) -> FieldInterceptor: ... @@ -363,6 +373,7 @@ class UseOpEncode: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.UseOpEncode": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.UseOpEncode": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.UseOpEncode": ... # type: ignore def _to_py_deprecated(self) -> UseOpEncode: ... @@ -392,6 +403,7 @@ class EnumType: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.EnumType": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.EnumType": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.EnumType": ... # type: ignore def _to_py_deprecated(self) -> EnumType: ... @@ -416,6 +428,7 @@ class Frozen2Exclude: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Frozen2Exclude": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Frozen2Exclude": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Frozen2Exclude": ... # type: ignore def _to_py_deprecated(self) -> Frozen2Exclude: ... @@ -440,6 +453,7 @@ class Frozen2RequiresCompleteContainerParams: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Frozen2RequiresCompleteContainerParams": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Frozen2RequiresCompleteContainerParams": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Frozen2RequiresCompleteContainerParams": ... # type: ignore def _to_py_deprecated(self) -> Frozen2RequiresCompleteContainerParams: ... @@ -464,6 +478,7 @@ class ProcessInEbThreadUnsafe: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.ProcessInEbThreadUnsafe": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.ProcessInEbThreadUnsafe": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.ProcessInEbThreadUnsafe": ... # type: ignore def _to_py_deprecated(self) -> ProcessInEbThreadUnsafe: ... @@ -488,6 +503,7 @@ class RuntimeAnnotation: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.RuntimeAnnotation": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.RuntimeAnnotation": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.RuntimeAnnotation": ... # type: ignore def _to_py_deprecated(self) -> RuntimeAnnotation: ... @@ -512,6 +528,7 @@ class UseCursorSerialization: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.UseCursorSerialization": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.UseCursorSerialization": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.UseCursorSerialization": ... # type: ignore def _to_py_deprecated(self) -> UseCursorSerialization: ... @@ -536,6 +553,7 @@ class GenerateDeprecatedHeaderClientMethods: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.GenerateDeprecatedHeaderClientMethods": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.GenerateDeprecatedHeaderClientMethods": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.GenerateDeprecatedHeaderClientMethods": ... # type: ignore def _to_py_deprecated(self) -> GenerateDeprecatedHeaderClientMethods: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/pyi/gen-py/thrift/annotation/scope/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/pyi/gen-py/thrift/annotation/scope/ttypes.pyi index a3cb37070feaaa..a189eb23280b5a 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/pyi/gen-py/thrift/annotation/scope/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/pyi/gen-py/thrift/annotation/scope/ttypes.pyi @@ -38,6 +38,7 @@ class Transitive: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Transitive": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Transitive": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Transitive": ... # type: ignore def _to_py_deprecated(self) -> Transitive: ... @@ -62,6 +63,7 @@ class Program: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Program": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Program": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Program": ... # type: ignore def _to_py_deprecated(self) -> Program: ... @@ -86,6 +88,7 @@ class Struct: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Struct": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Struct": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Struct": ... # type: ignore def _to_py_deprecated(self) -> Struct: ... @@ -110,6 +113,7 @@ class Union: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Union": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Union": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Union": ... # type: ignore def _to_py_deprecated(self) -> Union: ... @@ -134,6 +138,7 @@ class Exception: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Exception": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Exception": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Exception": ... # type: ignore def _to_py_deprecated(self) -> Exception: ... @@ -158,6 +163,7 @@ class Field: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Field": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Field": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Field": ... # type: ignore def _to_py_deprecated(self) -> Field: ... @@ -182,6 +188,7 @@ class Typedef: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Typedef": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Typedef": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Typedef": ... # type: ignore def _to_py_deprecated(self) -> Typedef: ... @@ -206,6 +213,7 @@ class Service: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Service": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Service": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Service": ... # type: ignore def _to_py_deprecated(self) -> Service: ... @@ -230,6 +238,7 @@ class Interaction: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Interaction": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Interaction": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Interaction": ... # type: ignore def _to_py_deprecated(self) -> Interaction: ... @@ -254,6 +263,7 @@ class Function: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Function": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Function": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Function": ... # type: ignore def _to_py_deprecated(self) -> Function: ... @@ -278,6 +288,7 @@ class EnumValue: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.EnumValue": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.EnumValue": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.EnumValue": ... # type: ignore def _to_py_deprecated(self) -> EnumValue: ... @@ -302,6 +313,7 @@ class Const: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Const": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Const": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Const": ... # type: ignore def _to_py_deprecated(self) -> Const: ... @@ -326,6 +338,7 @@ class Enum: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Enum": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Enum": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Enum": ... # type: ignore def _to_py_deprecated(self) -> Enum: ... @@ -350,6 +363,7 @@ class Structured: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Structured": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Structured": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Structured": ... # type: ignore def _to_py_deprecated(self) -> Structured: ... @@ -374,6 +388,7 @@ class Interface: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Interface": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Interface": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Interface": ... # type: ignore def _to_py_deprecated(self) -> Interface: ... @@ -398,6 +413,7 @@ class RootDefinition: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.RootDefinition": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.RootDefinition": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.RootDefinition": ... # type: ignore def _to_py_deprecated(self) -> RootDefinition: ... @@ -422,6 +438,7 @@ class Definition: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Definition": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Definition": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Definition": ... # type: ignore def _to_py_deprecated(self) -> Definition: ... @@ -446,6 +463,7 @@ class DisableSchemaConst: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.DisableSchemaConst": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.DisableSchemaConst": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.DisableSchemaConst": ... # type: ignore def _to_py_deprecated(self) -> DisableSchemaConst: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/pyi/gen-py/thrift/annotation/thrift/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/pyi/gen-py/thrift/annotation/thrift/ttypes.pyi index 3ae5d741f11dbb..cc84702707c5ae 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/pyi/gen-py/thrift/annotation/thrift/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/sink/out/pyi/gen-py/thrift/annotation/thrift/ttypes.pyi @@ -49,6 +49,7 @@ class Experimental: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Experimental": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Experimental": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Experimental": ... # type: ignore def _to_py_deprecated(self) -> Experimental: ... @@ -83,6 +84,7 @@ class ReserveIds: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.ReserveIds": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.ReserveIds": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.ReserveIds": ... # type: ignore def _to_py_deprecated(self) -> ReserveIds: ... @@ -112,6 +114,7 @@ class RequiresBackwardCompatibility: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.RequiresBackwardCompatibility": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.RequiresBackwardCompatibility": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.RequiresBackwardCompatibility": ... # type: ignore def _to_py_deprecated(self) -> RequiresBackwardCompatibility: ... @@ -136,6 +139,7 @@ class TerseWrite: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.TerseWrite": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.TerseWrite": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.TerseWrite": ... # type: ignore def _to_py_deprecated(self) -> TerseWrite: ... @@ -160,6 +164,7 @@ class Box: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Box": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Box": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Box": ... # type: ignore def _to_py_deprecated(self) -> Box: ... @@ -184,6 +189,7 @@ class Mixin: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Mixin": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Mixin": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Mixin": ... # type: ignore def _to_py_deprecated(self) -> Mixin: ... @@ -208,6 +214,7 @@ class SerializeInFieldIdOrder: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.SerializeInFieldIdOrder": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.SerializeInFieldIdOrder": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.SerializeInFieldIdOrder": ... # type: ignore def _to_py_deprecated(self) -> SerializeInFieldIdOrder: ... @@ -232,6 +239,7 @@ class BitmaskEnum: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.BitmaskEnum": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.BitmaskEnum": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.BitmaskEnum": ... # type: ignore def _to_py_deprecated(self) -> BitmaskEnum: ... @@ -256,6 +264,7 @@ class ExceptionMessage: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.ExceptionMessage": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.ExceptionMessage": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.ExceptionMessage": ... # type: ignore def _to_py_deprecated(self) -> ExceptionMessage: ... @@ -280,6 +289,7 @@ class InternBox: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.InternBox": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.InternBox": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.InternBox": ... # type: ignore def _to_py_deprecated(self) -> InternBox: ... @@ -304,6 +314,7 @@ class Serial: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Serial": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Serial": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Serial": ... # type: ignore def _to_py_deprecated(self) -> Serial: ... @@ -333,6 +344,7 @@ class Uri: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Uri": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Uri": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Uri": ... # type: ignore def _to_py_deprecated(self) -> Uri: ... @@ -362,6 +374,7 @@ class Priority: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Priority": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Priority": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Priority": ... # type: ignore def _to_py_deprecated(self) -> Priority: ... @@ -391,6 +404,7 @@ class DeprecatedUnvalidatedAnnotations: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.DeprecatedUnvalidatedAnnotations": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.DeprecatedUnvalidatedAnnotations": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.DeprecatedUnvalidatedAnnotations": ... # type: ignore def _to_py_deprecated(self) -> DeprecatedUnvalidatedAnnotations: ... @@ -415,6 +429,7 @@ class AllowReservedIdentifier: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.AllowReservedIdentifier": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.AllowReservedIdentifier": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.AllowReservedIdentifier": ... # type: ignore def _to_py_deprecated(self) -> AllowReservedIdentifier: ... @@ -439,6 +454,7 @@ class AllowReservedFilename: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.AllowReservedFilename": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.AllowReservedFilename": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.AllowReservedFilename": ... # type: ignore def _to_py_deprecated(self) -> AllowReservedFilename: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/py/gen-py/module/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/py/gen-py/module/ttypes.py index d91addf0822df3..9540c85d969f6e 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/py/gen-py/module/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/py/gen-py/module/ttypes.py @@ -143,6 +143,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.FooStreamEx, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.FooStreamEx, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -241,6 +247,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.FooEx, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.FooEx, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -339,6 +351,12 @@ def _to_python(self): python_types = importlib.import_module("module.thrift_types") return thrift.python.converter.to_python_struct(python_types.FooEx2, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.FooEx2, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/py/gen-py/thrift/annotation/cpp/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/py/gen-py/thrift/annotation/cpp/ttypes.py index 520b681121a61e..8d60067bbe8759 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/py/gen-py/thrift/annotation/cpp/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/py/gen-py/thrift/annotation/cpp/ttypes.py @@ -209,6 +209,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Name, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Name, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -353,6 +359,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Type, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Type, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -479,6 +491,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Ref, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Ref, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -607,6 +625,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Lazy, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Lazy, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -698,6 +722,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.DisableLazyChecksum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DisableLazyChecksum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -924,6 +954,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Adapter, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Adapter, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1040,6 +1076,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.PackIsset, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.PackIsset, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1158,6 +1200,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.MinimizePadding, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MinimizePadding, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1249,6 +1297,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.ScopedEnumAsUnionType, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ScopedEnumAsUnionType, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1403,6 +1457,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.FieldInterceptor, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.FieldInterceptor, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1494,6 +1554,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.UseOpEncode, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.UseOpEncode, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1630,6 +1696,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.EnumType, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.EnumType, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1724,6 +1796,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Frozen2Exclude, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Frozen2Exclude, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1819,6 +1897,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Frozen2RequiresCompleteContainerParams, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Frozen2RequiresCompleteContainerParams, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1921,6 +2005,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.ProcessInEbThreadUnsafe, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ProcessInEbThreadUnsafe, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2015,6 +2105,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.RuntimeAnnotation, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RuntimeAnnotation, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2112,6 +2208,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.UseCursorSerialization, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.UseCursorSerialization, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2220,6 +2322,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.GenerateDeprecatedHeaderClientMethods, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.GenerateDeprecatedHeaderClientMethods, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/py/gen-py/thrift/annotation/scope/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/py/gen-py/thrift/annotation/scope/ttypes.py index c08f21be9694a5..c4c5c8179665df 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/py/gen-py/thrift/annotation/scope/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/py/gen-py/thrift/annotation/scope/ttypes.py @@ -161,6 +161,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Transitive, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Transitive, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -258,6 +264,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Program, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Program, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -352,6 +364,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Struct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Struct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -446,6 +464,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Union, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Union, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -540,6 +564,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Exception, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Exception, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -634,6 +664,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Field, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Field, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -728,6 +764,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Typedef, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Typedef, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -822,6 +864,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Service, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Service, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -916,6 +964,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Interaction, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Interaction, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1010,6 +1064,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Function, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Function, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1104,6 +1164,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.EnumValue, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.EnumValue, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1198,6 +1264,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Const, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Const, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1289,6 +1361,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Enum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Enum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1383,6 +1461,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Structured, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Structured, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1477,6 +1561,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Interface, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Interface, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1571,6 +1661,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.RootDefinition, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RootDefinition, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1665,6 +1761,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Definition, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Definition, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1760,6 +1862,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.DisableSchemaConst, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DisableSchemaConst, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/py/gen-py/thrift/annotation/thrift/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/py/gen-py/thrift/annotation/thrift/ttypes.py index 386d80397db35f..2447eaa8e64b55 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/py/gen-py/thrift/annotation/thrift/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/py/gen-py/thrift/annotation/thrift/ttypes.py @@ -165,6 +165,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Experimental, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Experimental, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -355,6 +361,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.ReserveIds, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ReserveIds, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -470,6 +482,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.RequiresBackwardCompatibility, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RequiresBackwardCompatibility, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -574,6 +592,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.TerseWrite, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.TerseWrite, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -696,6 +720,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Box, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Box, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -791,6 +821,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Mixin, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Mixin, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -890,6 +926,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.SerializeInFieldIdOrder, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.SerializeInFieldIdOrder, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -985,6 +1027,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.BitmaskEnum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.BitmaskEnum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1098,6 +1146,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.ExceptionMessage, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ExceptionMessage, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1193,6 +1247,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.InternBox, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.InternBox, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1287,6 +1347,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Serial, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Serial, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1401,6 +1467,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Uri, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Uri, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1523,6 +1595,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Priority, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Priority, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1656,6 +1734,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.DeprecatedUnvalidatedAnnotations, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DeprecatedUnvalidatedAnnotations, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1757,6 +1841,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.AllowReservedIdentifier, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AllowReservedIdentifier, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1848,6 +1938,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.AllowReservedFilename, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AllowReservedFilename, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/pyi/gen-py/module/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/pyi/gen-py/module/ttypes.pyi index a991f1161825fb..7ed3e8799c696e 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/pyi/gen-py/module/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/pyi/gen-py/module/ttypes.pyi @@ -38,6 +38,7 @@ class FooStreamEx(Thrift.TException): def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "module.thrift_types.FooStreamEx": ... # type: ignore + def _to_mutable_python(self) -> "module.thrift_mutable_types.FooStreamEx": ... # type: ignore def _to_py3(self) -> "module.types.FooStreamEx": ... # type: ignore def _to_py_deprecated(self) -> FooStreamEx: ... @@ -62,6 +63,7 @@ class FooEx(Thrift.TException): def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "module.thrift_types.FooEx": ... # type: ignore + def _to_mutable_python(self) -> "module.thrift_mutable_types.FooEx": ... # type: ignore def _to_py3(self) -> "module.types.FooEx": ... # type: ignore def _to_py_deprecated(self) -> FooEx: ... @@ -86,6 +88,7 @@ class FooEx2(Thrift.TException): def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "module.thrift_types.FooEx2": ... # type: ignore + def _to_mutable_python(self) -> "module.thrift_mutable_types.FooEx2": ... # type: ignore def _to_py3(self) -> "module.types.FooEx2": ... # type: ignore def _to_py_deprecated(self) -> FooEx2: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/pyi/gen-py/thrift/annotation/cpp/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/pyi/gen-py/thrift/annotation/cpp/ttypes.pyi index b6612e5cc4d267..4b52c6f87ee53a 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/pyi/gen-py/thrift/annotation/cpp/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/pyi/gen-py/thrift/annotation/cpp/ttypes.pyi @@ -63,6 +63,7 @@ class Name: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Name": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Name": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Name": ... # type: ignore def _to_py_deprecated(self) -> Name: ... @@ -97,6 +98,7 @@ class Type: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Type": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Type": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Type": ... # type: ignore def _to_py_deprecated(self) -> Type: ... @@ -126,6 +128,7 @@ class Ref: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Ref": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Ref": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Ref": ... # type: ignore def _to_py_deprecated(self) -> Ref: ... @@ -155,6 +158,7 @@ class Lazy: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Lazy": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Lazy": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Lazy": ... # type: ignore def _to_py_deprecated(self) -> Lazy: ... @@ -179,6 +183,7 @@ class DisableLazyChecksum: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.DisableLazyChecksum": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.DisableLazyChecksum": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.DisableLazyChecksum": ... # type: ignore def _to_py_deprecated(self) -> DisableLazyChecksum: ... @@ -228,6 +233,7 @@ class Adapter: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Adapter": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Adapter": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Adapter": ... # type: ignore def _to_py_deprecated(self) -> Adapter: ... @@ -257,6 +263,7 @@ class PackIsset: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.PackIsset": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.PackIsset": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.PackIsset": ... # type: ignore def _to_py_deprecated(self) -> PackIsset: ... @@ -281,6 +288,7 @@ class MinimizePadding: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.MinimizePadding": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.MinimizePadding": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.MinimizePadding": ... # type: ignore def _to_py_deprecated(self) -> MinimizePadding: ... @@ -305,6 +313,7 @@ class ScopedEnumAsUnionType: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.ScopedEnumAsUnionType": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.ScopedEnumAsUnionType": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.ScopedEnumAsUnionType": ... # type: ignore def _to_py_deprecated(self) -> ScopedEnumAsUnionType: ... @@ -339,6 +348,7 @@ class FieldInterceptor: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.FieldInterceptor": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.FieldInterceptor": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.FieldInterceptor": ... # type: ignore def _to_py_deprecated(self) -> FieldInterceptor: ... @@ -363,6 +373,7 @@ class UseOpEncode: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.UseOpEncode": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.UseOpEncode": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.UseOpEncode": ... # type: ignore def _to_py_deprecated(self) -> UseOpEncode: ... @@ -392,6 +403,7 @@ class EnumType: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.EnumType": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.EnumType": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.EnumType": ... # type: ignore def _to_py_deprecated(self) -> EnumType: ... @@ -416,6 +428,7 @@ class Frozen2Exclude: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Frozen2Exclude": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Frozen2Exclude": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Frozen2Exclude": ... # type: ignore def _to_py_deprecated(self) -> Frozen2Exclude: ... @@ -440,6 +453,7 @@ class Frozen2RequiresCompleteContainerParams: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.Frozen2RequiresCompleteContainerParams": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.Frozen2RequiresCompleteContainerParams": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.Frozen2RequiresCompleteContainerParams": ... # type: ignore def _to_py_deprecated(self) -> Frozen2RequiresCompleteContainerParams: ... @@ -464,6 +478,7 @@ class ProcessInEbThreadUnsafe: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.ProcessInEbThreadUnsafe": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.ProcessInEbThreadUnsafe": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.ProcessInEbThreadUnsafe": ... # type: ignore def _to_py_deprecated(self) -> ProcessInEbThreadUnsafe: ... @@ -488,6 +503,7 @@ class RuntimeAnnotation: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.RuntimeAnnotation": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.RuntimeAnnotation": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.RuntimeAnnotation": ... # type: ignore def _to_py_deprecated(self) -> RuntimeAnnotation: ... @@ -512,6 +528,7 @@ class UseCursorSerialization: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.UseCursorSerialization": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.UseCursorSerialization": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.UseCursorSerialization": ... # type: ignore def _to_py_deprecated(self) -> UseCursorSerialization: ... @@ -536,6 +553,7 @@ class GenerateDeprecatedHeaderClientMethods: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.cpp.thrift_types.GenerateDeprecatedHeaderClientMethods": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.cpp.thrift_mutable_types.GenerateDeprecatedHeaderClientMethods": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.cpp.types.GenerateDeprecatedHeaderClientMethods": ... # type: ignore def _to_py_deprecated(self) -> GenerateDeprecatedHeaderClientMethods: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/pyi/gen-py/thrift/annotation/scope/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/pyi/gen-py/thrift/annotation/scope/ttypes.pyi index a3cb37070feaaa..a189eb23280b5a 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/pyi/gen-py/thrift/annotation/scope/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/pyi/gen-py/thrift/annotation/scope/ttypes.pyi @@ -38,6 +38,7 @@ class Transitive: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Transitive": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Transitive": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Transitive": ... # type: ignore def _to_py_deprecated(self) -> Transitive: ... @@ -62,6 +63,7 @@ class Program: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Program": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Program": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Program": ... # type: ignore def _to_py_deprecated(self) -> Program: ... @@ -86,6 +88,7 @@ class Struct: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Struct": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Struct": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Struct": ... # type: ignore def _to_py_deprecated(self) -> Struct: ... @@ -110,6 +113,7 @@ class Union: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Union": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Union": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Union": ... # type: ignore def _to_py_deprecated(self) -> Union: ... @@ -134,6 +138,7 @@ class Exception: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Exception": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Exception": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Exception": ... # type: ignore def _to_py_deprecated(self) -> Exception: ... @@ -158,6 +163,7 @@ class Field: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Field": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Field": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Field": ... # type: ignore def _to_py_deprecated(self) -> Field: ... @@ -182,6 +188,7 @@ class Typedef: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Typedef": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Typedef": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Typedef": ... # type: ignore def _to_py_deprecated(self) -> Typedef: ... @@ -206,6 +213,7 @@ class Service: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Service": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Service": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Service": ... # type: ignore def _to_py_deprecated(self) -> Service: ... @@ -230,6 +238,7 @@ class Interaction: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Interaction": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Interaction": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Interaction": ... # type: ignore def _to_py_deprecated(self) -> Interaction: ... @@ -254,6 +263,7 @@ class Function: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Function": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Function": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Function": ... # type: ignore def _to_py_deprecated(self) -> Function: ... @@ -278,6 +288,7 @@ class EnumValue: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.EnumValue": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.EnumValue": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.EnumValue": ... # type: ignore def _to_py_deprecated(self) -> EnumValue: ... @@ -302,6 +313,7 @@ class Const: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Const": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Const": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Const": ... # type: ignore def _to_py_deprecated(self) -> Const: ... @@ -326,6 +338,7 @@ class Enum: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Enum": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Enum": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Enum": ... # type: ignore def _to_py_deprecated(self) -> Enum: ... @@ -350,6 +363,7 @@ class Structured: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Structured": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Structured": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Structured": ... # type: ignore def _to_py_deprecated(self) -> Structured: ... @@ -374,6 +388,7 @@ class Interface: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Interface": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Interface": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Interface": ... # type: ignore def _to_py_deprecated(self) -> Interface: ... @@ -398,6 +413,7 @@ class RootDefinition: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.RootDefinition": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.RootDefinition": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.RootDefinition": ... # type: ignore def _to_py_deprecated(self) -> RootDefinition: ... @@ -422,6 +438,7 @@ class Definition: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.Definition": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.Definition": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.Definition": ... # type: ignore def _to_py_deprecated(self) -> Definition: ... @@ -446,6 +463,7 @@ class DisableSchemaConst: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.scope.thrift_types.DisableSchemaConst": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.scope.thrift_mutable_types.DisableSchemaConst": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.scope.types.DisableSchemaConst": ... # type: ignore def _to_py_deprecated(self) -> DisableSchemaConst: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/pyi/gen-py/thrift/annotation/thrift/ttypes.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/pyi/gen-py/thrift/annotation/thrift/ttypes.pyi index 3ae5d741f11dbb..cc84702707c5ae 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/pyi/gen-py/thrift/annotation/thrift/ttypes.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/stream/out/pyi/gen-py/thrift/annotation/thrift/ttypes.pyi @@ -49,6 +49,7 @@ class Experimental: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Experimental": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Experimental": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Experimental": ... # type: ignore def _to_py_deprecated(self) -> Experimental: ... @@ -83,6 +84,7 @@ class ReserveIds: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.ReserveIds": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.ReserveIds": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.ReserveIds": ... # type: ignore def _to_py_deprecated(self) -> ReserveIds: ... @@ -112,6 +114,7 @@ class RequiresBackwardCompatibility: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.RequiresBackwardCompatibility": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.RequiresBackwardCompatibility": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.RequiresBackwardCompatibility": ... # type: ignore def _to_py_deprecated(self) -> RequiresBackwardCompatibility: ... @@ -136,6 +139,7 @@ class TerseWrite: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.TerseWrite": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.TerseWrite": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.TerseWrite": ... # type: ignore def _to_py_deprecated(self) -> TerseWrite: ... @@ -160,6 +164,7 @@ class Box: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Box": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Box": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Box": ... # type: ignore def _to_py_deprecated(self) -> Box: ... @@ -184,6 +189,7 @@ class Mixin: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Mixin": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Mixin": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Mixin": ... # type: ignore def _to_py_deprecated(self) -> Mixin: ... @@ -208,6 +214,7 @@ class SerializeInFieldIdOrder: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.SerializeInFieldIdOrder": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.SerializeInFieldIdOrder": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.SerializeInFieldIdOrder": ... # type: ignore def _to_py_deprecated(self) -> SerializeInFieldIdOrder: ... @@ -232,6 +239,7 @@ class BitmaskEnum: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.BitmaskEnum": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.BitmaskEnum": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.BitmaskEnum": ... # type: ignore def _to_py_deprecated(self) -> BitmaskEnum: ... @@ -256,6 +264,7 @@ class ExceptionMessage: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.ExceptionMessage": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.ExceptionMessage": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.ExceptionMessage": ... # type: ignore def _to_py_deprecated(self) -> ExceptionMessage: ... @@ -280,6 +289,7 @@ class InternBox: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.InternBox": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.InternBox": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.InternBox": ... # type: ignore def _to_py_deprecated(self) -> InternBox: ... @@ -304,6 +314,7 @@ class Serial: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Serial": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Serial": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Serial": ... # type: ignore def _to_py_deprecated(self) -> Serial: ... @@ -333,6 +344,7 @@ class Uri: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Uri": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Uri": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Uri": ... # type: ignore def _to_py_deprecated(self) -> Uri: ... @@ -362,6 +374,7 @@ class Priority: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.Priority": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.Priority": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.Priority": ... # type: ignore def _to_py_deprecated(self) -> Priority: ... @@ -391,6 +404,7 @@ class DeprecatedUnvalidatedAnnotations: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.DeprecatedUnvalidatedAnnotations": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.DeprecatedUnvalidatedAnnotations": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.DeprecatedUnvalidatedAnnotations": ... # type: ignore def _to_py_deprecated(self) -> DeprecatedUnvalidatedAnnotations: ... @@ -415,6 +429,7 @@ class AllowReservedIdentifier: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.AllowReservedIdentifier": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.AllowReservedIdentifier": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.AllowReservedIdentifier": ... # type: ignore def _to_py_deprecated(self) -> AllowReservedIdentifier: ... @@ -439,6 +454,7 @@ class AllowReservedFilename: def __ne__(self, other: __T.Any) -> bool: ... def __dir__(self) -> __T.Sequence[str]: ... def _to_python(self) -> "facebook.thrift.annotation.thrift.thrift_types.AllowReservedFilename": ... # type: ignore + def _to_mutable_python(self) -> "facebook.thrift.annotation.thrift.thrift_mutable_types.AllowReservedFilename": ... # type: ignore def _to_py3(self) -> "facebook.thrift.annotation.thrift.types.AllowReservedFilename": ... # type: ignore def _to_py_deprecated(self) -> AllowReservedFilename: ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/terse_write/out/py/gen-py/terse_write/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/terse_write/out/py/gen-py/terse_write/ttypes.py index 8dc3f9575488a0..675f1aaf8cea4e 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/terse_write/out/py/gen-py/terse_write/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/terse_write/out/py/gen-py/terse_write/ttypes.py @@ -150,6 +150,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.terse_write.thrift_types") return thrift.python.converter.to_python_struct(python_types.MyStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.terse_write.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MyStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -730,6 +736,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.terse_write.thrift_types") return thrift.python.converter.to_python_struct(python_types.MyUnion, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.terse_write.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MyUnion, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -842,6 +854,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.terse_write.thrift_types") return thrift.python.converter.to_python_struct(python_types.MyStructWithCustomDefault, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.terse_write.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MyStructWithCustomDefault, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1267,6 +1285,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.terse_write.thrift_types") return thrift.python.converter.to_python_struct(python_types.StructLevelTerseStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.terse_write.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.StructLevelTerseStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2022,6 +2046,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.terse_write.thrift_types") return thrift.python.converter.to_python_struct(python_types.FieldLevelTerseStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.terse_write.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.FieldLevelTerseStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2428,6 +2458,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.terse_write.thrift_types") return thrift.python.converter.to_python_struct(python_types.TerseStructWithCustomDefault, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.terse_write.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.TerseStructWithCustomDefault, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2580,6 +2616,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.terse_write.thrift_types") return thrift.python.converter.to_python_struct(python_types.AdaptedFields, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.terse_write.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AdaptedFields, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2694,6 +2736,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.terse_write.thrift_types") return thrift.python.converter.to_python_struct(python_types.WrappedFields, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.terse_write.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.WrappedFields, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2816,6 +2864,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.test.terse_write.thrift_types") return thrift.python.converter.to_python_struct(python_types.TerseException, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.test.terse_write.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.TerseException, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/terse_write/out/py/gen-py/thrift/annotation/cpp/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/terse_write/out/py/gen-py/thrift/annotation/cpp/ttypes.py index 520b681121a61e..8d60067bbe8759 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/terse_write/out/py/gen-py/thrift/annotation/cpp/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/terse_write/out/py/gen-py/thrift/annotation/cpp/ttypes.py @@ -209,6 +209,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Name, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Name, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -353,6 +359,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Type, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Type, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -479,6 +491,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Ref, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Ref, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -607,6 +625,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Lazy, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Lazy, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -698,6 +722,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.DisableLazyChecksum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DisableLazyChecksum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -924,6 +954,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Adapter, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Adapter, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1040,6 +1076,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.PackIsset, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.PackIsset, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1158,6 +1200,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.MinimizePadding, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MinimizePadding, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1249,6 +1297,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.ScopedEnumAsUnionType, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ScopedEnumAsUnionType, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1403,6 +1457,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.FieldInterceptor, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.FieldInterceptor, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1494,6 +1554,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.UseOpEncode, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.UseOpEncode, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1630,6 +1696,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.EnumType, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.EnumType, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1724,6 +1796,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Frozen2Exclude, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Frozen2Exclude, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1819,6 +1897,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Frozen2RequiresCompleteContainerParams, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Frozen2RequiresCompleteContainerParams, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1921,6 +2005,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.ProcessInEbThreadUnsafe, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ProcessInEbThreadUnsafe, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2015,6 +2105,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.RuntimeAnnotation, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RuntimeAnnotation, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2112,6 +2208,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.UseCursorSerialization, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.UseCursorSerialization, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2220,6 +2322,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.GenerateDeprecatedHeaderClientMethods, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.GenerateDeprecatedHeaderClientMethods, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/terse_write/out/py/gen-py/thrift/annotation/hack/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/terse_write/out/py/gen-py/thrift/annotation/hack/ttypes.py index b4e6be4c1c008e..01b0bd0e63955a 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/terse_write/out/py/gen-py/thrift/annotation/hack/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/terse_write/out/py/gen-py/thrift/annotation/hack/ttypes.py @@ -165,6 +165,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.FieldWrapper, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.FieldWrapper, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -324,6 +330,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.Wrapper, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Wrapper, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -469,6 +481,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.Adapter, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Adapter, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -581,6 +599,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.SkipCodegen, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.SkipCodegen, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -715,6 +739,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.Name, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Name, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -844,6 +874,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.UnionEnumAttributes, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.UnionEnumAttributes, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -958,6 +994,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.StructTrait, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.StructTrait, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1125,6 +1167,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.Attributes, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Attributes, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1216,6 +1264,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.StructAsTrait, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.StructAsTrait, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1310,6 +1364,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_types") return thrift.python.converter.to_python_struct(python_types.ModuleInternal, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.hack.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ModuleInternal, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/terse_write/out/py/gen-py/thrift/annotation/scope/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/terse_write/out/py/gen-py/thrift/annotation/scope/ttypes.py index c08f21be9694a5..c4c5c8179665df 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/terse_write/out/py/gen-py/thrift/annotation/scope/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/terse_write/out/py/gen-py/thrift/annotation/scope/ttypes.py @@ -161,6 +161,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Transitive, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Transitive, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -258,6 +264,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Program, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Program, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -352,6 +364,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Struct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Struct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -446,6 +464,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Union, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Union, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -540,6 +564,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Exception, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Exception, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -634,6 +664,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Field, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Field, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -728,6 +764,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Typedef, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Typedef, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -822,6 +864,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Service, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Service, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -916,6 +964,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Interaction, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Interaction, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1010,6 +1064,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Function, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Function, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1104,6 +1164,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.EnumValue, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.EnumValue, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1198,6 +1264,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Const, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Const, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1289,6 +1361,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Enum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Enum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1383,6 +1461,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Structured, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Structured, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1477,6 +1561,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Interface, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Interface, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1571,6 +1661,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.RootDefinition, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RootDefinition, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1665,6 +1761,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Definition, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Definition, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1760,6 +1862,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.DisableSchemaConst, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DisableSchemaConst, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/terse_write/out/py/gen-py/thrift/annotation/thrift/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/terse_write/out/py/gen-py/thrift/annotation/thrift/ttypes.py index 386d80397db35f..2447eaa8e64b55 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/terse_write/out/py/gen-py/thrift/annotation/thrift/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/terse_write/out/py/gen-py/thrift/annotation/thrift/ttypes.py @@ -165,6 +165,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Experimental, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Experimental, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -355,6 +361,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.ReserveIds, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ReserveIds, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -470,6 +482,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.RequiresBackwardCompatibility, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RequiresBackwardCompatibility, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -574,6 +592,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.TerseWrite, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.TerseWrite, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -696,6 +720,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Box, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Box, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -791,6 +821,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Mixin, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Mixin, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -890,6 +926,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.SerializeInFieldIdOrder, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.SerializeInFieldIdOrder, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -985,6 +1027,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.BitmaskEnum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.BitmaskEnum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1098,6 +1146,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.ExceptionMessage, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ExceptionMessage, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1193,6 +1247,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.InternBox, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.InternBox, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1287,6 +1347,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Serial, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Serial, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1401,6 +1467,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Uri, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Uri, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1523,6 +1595,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Priority, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Priority, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1656,6 +1734,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.DeprecatedUnvalidatedAnnotations, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DeprecatedUnvalidatedAnnotations, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1757,6 +1841,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.AllowReservedIdentifier, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AllowReservedIdentifier, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1848,6 +1938,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.AllowReservedFilename, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AllowReservedFilename, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/types/out/py/gen-py/module/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/types/out/py/gen-py/module/ttypes.py index 109ed16b7e3b8f..9ffe91beea7f7a 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/types/out/py/gen-py/module/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/types/out/py/gen-py/module/ttypes.py @@ -166,6 +166,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.empty_struct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.empty_struct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -257,6 +263,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.decorated_struct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.decorated_struct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -563,6 +575,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.ContainerStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ContainerStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -667,6 +685,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.CppTypeStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.CppTypeStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -758,6 +782,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.VirtualStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.VirtualStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -864,6 +894,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.MyStructWithForwardRefEnum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MyStructWithForwardRefEnum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -970,6 +1006,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.TrivialNumeric, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.TrivialNumeric, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1077,6 +1119,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.TrivialNestedWithDefault, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.TrivialNestedWithDefault, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1199,6 +1247,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.ComplexString, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ComplexString, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1306,6 +1360,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.ComplexNestedWithDefault, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ComplexNestedWithDefault, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1457,6 +1517,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.MinPadding, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MinPadding, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1608,6 +1674,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.MinPaddingWithCustomType, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MinPaddingWithCustomType, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1745,6 +1817,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.MyStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MyStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1817,6 +1895,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.MyDataItem, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MyDataItem, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1908,6 +1992,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.Renaming, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Renaming, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2055,6 +2145,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.AnnotatedTypes, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AnnotatedTypes, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2163,6 +2259,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.ForwardUsageRoot, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ForwardUsageRoot, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2255,6 +2357,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.ForwardUsageStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ForwardUsageStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2347,6 +2455,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.ForwardUsageByRef, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ForwardUsageByRef, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2456,6 +2570,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.IncompleteMap, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.IncompleteMap, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2528,6 +2648,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.IncompleteMapDep, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.IncompleteMapDep, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2637,6 +2763,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.CompleteMap, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.CompleteMap, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2709,6 +2841,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.CompleteMapDep, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.CompleteMapDep, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2815,6 +2953,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.IncompleteList, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.IncompleteList, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2887,6 +3031,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.IncompleteListDep, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.IncompleteListDep, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -2993,6 +3143,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.CompleteList, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.CompleteList, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -3065,6 +3221,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.CompleteListDep, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.CompleteListDep, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -3171,6 +3333,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.AdaptedList, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AdaptedList, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -3263,6 +3431,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.AdaptedListDep, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AdaptedListDep, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -3369,6 +3543,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.DependentAdaptedList, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DependentAdaptedList, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -3460,6 +3640,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.DependentAdaptedListDep, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DependentAdaptedListDep, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -3683,6 +3869,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.AllocatorAware, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AllocatorAware, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -3789,6 +3981,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.AllocatorAware2, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AllocatorAware2, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -3910,6 +4108,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.TypedefStruct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.TypedefStruct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -4001,6 +4205,12 @@ def _to_python(self): python_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_types") return thrift.python.converter.to_python_struct(python_types.StructWithDoubleUnderscores, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("apache.thrift.fixtures.types.module.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.StructWithDoubleUnderscores, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/types/out/py/gen-py/thrift/annotation/cpp/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/types/out/py/gen-py/thrift/annotation/cpp/ttypes.py index 6768861c7def04..c34d81335e00c3 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/types/out/py/gen-py/thrift/annotation/cpp/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/types/out/py/gen-py/thrift/annotation/cpp/ttypes.py @@ -184,6 +184,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Name, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Name, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -305,6 +311,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Type, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Type, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -402,6 +414,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Ref, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Ref, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -509,6 +527,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Lazy, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Lazy, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -581,6 +605,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.DisableLazyChecksum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DisableLazyChecksum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -778,6 +808,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Adapter, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Adapter, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -873,6 +909,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.PackIsset, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.PackIsset, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -972,6 +1014,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.MinimizePadding, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.MinimizePadding, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1044,6 +1092,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.ScopedEnumAsUnionType, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ScopedEnumAsUnionType, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1175,6 +1229,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.FieldInterceptor, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.FieldInterceptor, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1247,6 +1307,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.UseOpEncode, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.UseOpEncode, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1354,6 +1420,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.EnumType, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.EnumType, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1429,6 +1501,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Frozen2Exclude, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Frozen2Exclude, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1505,6 +1583,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.Frozen2RequiresCompleteContainerParams, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Frozen2RequiresCompleteContainerParams, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1588,6 +1672,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.ProcessInEbThreadUnsafe, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ProcessInEbThreadUnsafe, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1663,6 +1753,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.RuntimeAnnotation, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RuntimeAnnotation, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1741,6 +1837,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.UseCursorSerialization, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.UseCursorSerialization, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1830,6 +1932,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_types") return thrift.python.converter.to_python_struct(python_types.GenerateDeprecatedHeaderClientMethods, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.cpp.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.GenerateDeprecatedHeaderClientMethods, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/types/out/py/gen-py/thrift/annotation/scope/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/types/out/py/gen-py/thrift/annotation/scope/ttypes.py index 3a0526936816fe..5706510b3082ea 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/types/out/py/gen-py/thrift/annotation/scope/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/types/out/py/gen-py/thrift/annotation/scope/ttypes.py @@ -138,6 +138,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Transitive, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Transitive, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -216,6 +222,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Program, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Program, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -291,6 +303,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Struct, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Struct, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -366,6 +384,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Union, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Union, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -441,6 +465,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Exception, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Exception, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -516,6 +546,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Field, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Field, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -591,6 +627,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Typedef, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Typedef, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -666,6 +708,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Service, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Service, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -741,6 +789,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Interaction, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Interaction, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -816,6 +870,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Function, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Function, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -891,6 +951,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.EnumValue, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.EnumValue, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -966,6 +1032,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Const, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Const, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1038,6 +1110,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Enum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Enum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1113,6 +1191,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Structured, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Structured, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1188,6 +1272,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Interface, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Interface, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1263,6 +1353,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.RootDefinition, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RootDefinition, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1338,6 +1434,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.Definition, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Definition, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1414,6 +1516,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_types") return thrift.python.converter.to_python_struct(python_types.DisableSchemaConst, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.scope.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DisableSchemaConst, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/types/out/py/gen-py/thrift/annotation/thrift/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/types/out/py/gen-py/thrift/annotation/thrift/ttypes.py index 41f5514e75397d..d99e1e493952fb 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/types/out/py/gen-py/thrift/annotation/thrift/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/types/out/py/gen-py/thrift/annotation/thrift/ttypes.py @@ -142,6 +142,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Experimental, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Experimental, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -298,6 +304,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.ReserveIds, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ReserveIds, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -392,6 +404,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.RequiresBackwardCompatibility, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.RequiresBackwardCompatibility, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -477,6 +495,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.TerseWrite, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.TerseWrite, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -580,6 +604,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Box, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Box, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -656,6 +686,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Mixin, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Mixin, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -736,6 +772,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.SerializeInFieldIdOrder, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.SerializeInFieldIdOrder, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -812,6 +854,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.BitmaskEnum, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.BitmaskEnum, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -906,6 +954,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.ExceptionMessage, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.ExceptionMessage, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -982,6 +1036,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.InternBox, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.InternBox, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1057,6 +1117,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Serial, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Serial, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1150,6 +1216,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Uri, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Uri, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1243,6 +1315,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.Priority, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.Priority, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1352,6 +1430,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.DeprecatedUnvalidatedAnnotations, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.DeprecatedUnvalidatedAnnotations, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1434,6 +1518,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.AllowReservedIdentifier, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AllowReservedIdentifier, self) + def _to_py3(self): import importlib import thrift.py3.converter @@ -1506,6 +1596,12 @@ def _to_python(self): python_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_types") return thrift.python.converter.to_python_struct(python_types.AllowReservedFilename, self) + def _to_mutable_python(self): + import importlib + import thrift.python.mutable_converter + python_mutable_types = importlib.import_module("facebook.thrift.annotation.thrift.thrift_mutable_types") + return thrift.python.mutable_converter.to_mutable_python_struct_or_union(python_mutable_types.AllowReservedFilename, self) + def _to_py3(self): import importlib import thrift.py3.converter diff --git a/third-party/thrift/src/thrift/lib/python/test/converter.py b/third-party/thrift/src/thrift/lib/python/test/converter.py index b68ecd47016fa1..829b5455aca725 100644 --- a/third-party/thrift/src/thrift/lib/python/test/converter.py +++ b/third-party/thrift/src/thrift/lib/python/test/converter.py @@ -19,10 +19,13 @@ import unittest +import convertible.thrift_mutable_types as python_mutable_types + import convertible.thrift_types as python_types import convertible.ttypes as py_deprecated_types import convertible.types as py3_types from thrift.python.converter import to_python_struct +from thrift.python.mutable_converter import to_mutable_python_struct_or_union from thrift.python.types import BadEnum @@ -329,6 +332,187 @@ def test_union_with_mismatching_field(self) -> None: self.assertEqual(to.value, True) +class PyDeprecatedToMutablePythonConverterTest(unittest.TestCase): + def test_simple(self) -> None: + simple = py_deprecated_types.Simple( + intField=42, + strField="simple", + intList=[1, 2, 3], + strSet={"hello", "world"}, + strToIntMap={"one": 1, "two": 2}, + color=py_deprecated_types.Color.GREEN, + name="myname", + )._to_mutable_python() + self.assertEqual(simple.intField, 42) + self.assertEqual(simple.strField, "simple") + self.assertEqual(simple.intList, [1, 2, 3]) + self.assertEqual(simple.strSet, {"hello", "world"}) + self.assertEqual(simple.strToIntMap, {"one": 1, "two": 2}) + self.assertEqual(simple.color, python_mutable_types.Color.GREEN) + self.assertEqual(simple.name_, "myname") + + def test_nested(self) -> None: + nested = py_deprecated_types.Nested( + simpleField=py_deprecated_types.Simple( + intField=42, + strField="simple", + intList=[1, 2, 3], + strSet={"hello", "world"}, + strToIntMap={"one": 1, "two": 2}, + color=py_deprecated_types.Color.NONE, + name="myname", + ), + simpleList=[ + py_deprecated_types.Simple( + intField=200, + strField="face", + intList=[4, 5, 6], + strSet={"keep", "calm"}, + strToIntMap={"three": 3, "four": 4}, + color=py_deprecated_types.Color.RED, + name="myname", + ), + py_deprecated_types.Simple( + intField=404, + strField="b00k", + intList=[7, 8, 9], + strSet={"carry", "on"}, + strToIntMap={"five": 5, "six": 6}, + color=py_deprecated_types.Color.GREEN, + name="myname", + ), + ], + colorToSimpleMap={ + py_deprecated_types.Color.BLUE: py_deprecated_types.Simple( + intField=500, + strField="internal", + intList=[10], + strSet={"server", "error"}, + strToIntMap={"seven": 7, "eight": 8, "nine": 9}, + color=py_deprecated_types.Color.BLUE, + name="myname", + ) + }, + )._to_mutable_python() + self.assertEqual(nested.simpleField.intField, 42) + self.assertEqual(nested.simpleList[0].intList, [4, 5, 6]) + self.assertEqual(nested.simpleList[1].strSet, {"carry", "on"}) + self.assertEqual( + nested.colorToSimpleMap[python_mutable_types.Color.BLUE].color, + python_mutable_types.Color.BLUE, + ) + + def test_simple_union(self) -> None: + simple_union = py_deprecated_types.Union(intField=42)._to_mutable_python() + self.assertEqual( + simple_union.fbthrift_current_field, + python_mutable_types.Union.FbThriftUnionFieldEnum.intField, + ) + self.assertEqual(simple_union.fbthrift_current_value, 42) + + def test_union_with_py3_name_annotation(self) -> None: + simple_union = py_deprecated_types.Union(name="myname")._to_mutable_python() + self.assertEqual( + simple_union.fbthrift_current_field, + python_mutable_types.Union.FbThriftUnionFieldEnum.name_, + ) + self.assertEqual(simple_union.fbthrift_current_value, "myname") + + def test_union_with_containers(self) -> None: + union_with_list = py_deprecated_types.Union( + intList=[1, 2, 3] + )._to_mutable_python() + self.assertEqual( + union_with_list.fbthrift_current_field, + python_mutable_types.Union.FbThriftUnionFieldEnum.intList, + ) + self.assertEqual(union_with_list.fbthrift_current_value, [1, 2, 3]) + + def test_complex_union(self) -> None: + complex_union = py_deprecated_types.Union( + simpleField=py_deprecated_types.Simple( + intField=42, + strField="simple", + intList=[1, 2, 3], + strSet={"hello", "world"}, + strToIntMap={"one": 1, "two": 2}, + color=py_deprecated_types.Color.NONE, + ) + )._to_mutable_python() + self.assertEqual( + complex_union.fbthrift_current_field, + python_mutable_types.Union.FbThriftUnionFieldEnum.simple_, + ) + self.assertEqual(complex_union.simple_.intField, 42) + + def test_struct_with_mismatching_field(self) -> None: + tomayto = py_deprecated_types.Tomayto( + to=42, + mayto="blah", + ) + tomahto = to_mutable_python_struct_or_union( + python_mutable_types.Tomahto, + tomayto, + ) + self.assertEqual(tomahto.to, 42) + self.assertEqual(tomahto.mahto, "mahto") + + def test_py_bad_enum(self) -> None: + simple = py_deprecated_types.Simple( + intField=42, + strField="simple", + intList=[1, 2, 3], + strSet={"hello", "world"}, + strToIntMap={"one": 1, "two": 2}, + color=1234, # pyre-ignore[6]: In call `py_deprecated_types.Simple.__init__`, for 6th parameter `color` expected `Optional[Color]` but got `int`. + name="myname", + )._to_mutable_python() + self.assertIsInstance(simple.color, BadEnum) + self.assertEqual( + # pyre-ignore[16]: `python_mutable_types.Color` has no attribute `enum`. It's actually a BadEnum. + simple.color.enum, + python_mutable_types.Color, + ) + + self.assertEqual(int(simple.color), 1234) + + def test_union_with_mismatching_field(self) -> None: + po = to_mutable_python_struct_or_union( + python_mutable_types.Potahto, + py_deprecated_types.Potayto( + po=42, + ), + ) + self.assertEqual( + po.fbthrift_current_field, + python_mutable_types.Potahto.FbThriftUnionFieldEnum.po, + ) + self.assertEqual(po.fbthrift_current_value, 42) + + tah = to_mutable_python_struct_or_union( + python_mutable_types.Potahto, + py_deprecated_types.Potayto( + tay="tay", + ), + ) + self.assertEqual( + tah.fbthrift_current_field, + python_mutable_types.Potahto.FbThriftUnionFieldEnum.EMPTY, + ) + + to = to_mutable_python_struct_or_union( + python_mutable_types.Potahto, + py_deprecated_types.Potayto( + to=True, + ), + ) + self.assertEqual( + to.fbthrift_current_field, + python_mutable_types.Potahto.FbThriftUnionFieldEnum.to, + ) + self.assertEqual(to.fbthrift_current_value, True) + + class PythonToPythonConverterTest(unittest.TestCase): def test_should_return_self(self) -> None: simple = python_types.Simple()