You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary: Cython changes to enable build. The basic idea is the invese of py3 client. To produce serialized message, py3 server uses regular serializer with cpp2 struct. Previously, the cpp2 struct was the internal data member of thrift-py3 object. Now, the cpp2 struct is converted using thrift-python C-API from thrift-python struct composed inside thrift-py3 wrapper.
Reviewed By: prakashgayasen
Differential Revision: D71353613
fbshipit-source-id: ed901ae1f9ed9ea702c1f69203af3bf7625a2caa
@@ -84,6 +85,9 @@ from thrift.py3.stream cimport cServerStream, cServerStreamPublisher, cResponseA
84
85
{{/program:has_stream?}}
85
86
cimport {{#program:py3Namespaces}}{{value}}.{{/program:py3Namespaces}}{{program:name}}.types as _{{#program:py3Namespaces}}{{value}}_{{/program:py3Namespaces}}{{program:name}}_types
86
87
cimport {{#program:py3Namespaces}}{{value}}.{{/program:py3Namespaces}}{{program:name}}.cbindings as _{{#program:py3Namespaces}}{{value}}_{{/program:py3Namespaces}}{{program:name}}_cbindings
88
+
{{#program:inplace_migrate?}}
89
+
cimport {{#program:py3Namespaces}}{{value}}.{{/program:py3Namespaces}}{{program:name}}.thrift_converter as _{{#program:py3Namespaces}}{{value}}_{{/program:py3Namespaces}}{{program:name}}_thrift_converter
90
+
{{/program:inplace_migrate?}}
87
91
import {{#program:py3Namespaces}}{{value}}.{{/program:py3Namespaces}}{{program:name}}.types as _{{#program:py3Namespaces}}{{value}}_{{/program:py3Namespaces}}{{program:name}}_types
88
92
{{#program:includeNamespaces}}
89
93
{{#hasServices?}}
@@ -94,6 +98,9 @@ import {{#includeNamespace}}{{value}}.{{/includeNamespace}}services as _{{#inclu
94
98
import {{#includeNamespace}}{{value}}.{{/includeNamespace}}types as _{{#includeNamespace}}{{value}}_{{/includeNamespace}}types
95
99
cimport {{#includeNamespace}}{{value}}.{{/includeNamespace}}types as _{{#includeNamespace}}{{value}}_{{/includeNamespace}}types
96
100
cimport {{#includeNamespace}}{{value}}.{{/includeNamespace}}cbindings as _{{#includeNamespace}}{{value}}_{{/includeNamespace}}cbindings
101
+
{{#program:inplace_migrate?}}
102
+
cimport {{#includeNamespace}}{{value}}.{{/includeNamespace}}thrift_converter as _{{#includeNamespace}}{{value}}_{{/includeNamespace}}thrift_converter
Copy file name to clipboardexpand all lines: thrift/compiler/test/fixtures/types/out/py3_inplace/gen-py3/apache/thrift/fixtures/types/module/services.pyx
+3-1
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ from thrift.python.common cimport (
48
48
MetadataBox as __MetadataBox,
49
49
)
50
50
51
-
from thrift.py3.types cimport make_unique
51
+
from thrift.py3.types cimport make_unique, deref_const
52
52
53
53
cimport folly.futures
54
54
from folly.executor cimport get_executor
@@ -59,10 +59,12 @@ from folly.memory cimport to_shared_ptr as __to_shared_ptr
59
59
60
60
cimport apache.thrift.fixtures.types.module.types as _apache_thrift_fixtures_types_module_types
61
61
cimport apache.thrift.fixtures.types.module.cbindings as _apache_thrift_fixtures_types_module_cbindings
62
+
cimport apache.thrift.fixtures.types.module.thrift_converter as _apache_thrift_fixtures_types_module_thrift_converter
62
63
import apache.thrift.fixtures.types.module.types as _apache_thrift_fixtures_types_module_types
63
64
import apache.thrift.fixtures.types.included.types as _apache_thrift_fixtures_types_included_types
64
65
cimport apache.thrift.fixtures.types.included.types as _apache_thrift_fixtures_types_included_types
65
66
cimport apache.thrift.fixtures.types.included.cbindings as _apache_thrift_fixtures_types_included_cbindings
67
+
cimport apache.thrift.fixtures.types.included.thrift_converter as _apache_thrift_fixtures_types_included_thrift_converter
66
68
67
69
cimport apache.thrift.fixtures.types.module.services_interface as _fbthrift_services_interface
0 commit comments