aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python
diff options
context:
space:
mode:
authorGravatar Yuchen Zeng <zyc@google.com>2016-10-25 11:26:17 -0700
committerGravatar Yuchen Zeng <zyc@google.com>2016-10-25 11:26:17 -0700
commitf1cd4490303c0c581777ec52987884e61bbe030d (patch)
tree964e499763da984ed10337a0f32214e919cb84c8 /src/python
parent43aa9a12b96614242a4b385b423a5a2a28569a42 (diff)
parentb40a8fa95b8ede3fe35e7f07bf902cde807879b2 (diff)
Merge remote-tracking branch 'upstream/master' into cares_buildin
Diffstat (limited to 'src/python')
-rw-r--r--src/python/grpcio/grpc_core_dependencies.py41
-rw-r--r--src/python/grpcio_tests/tests/unit/_channel_connectivity_test.py12
-rw-r--r--src/python/grpcio_tests/tests/unit/_channel_ready_future_test.py4
3 files changed, 27 insertions, 30 deletions
diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py
index 1251ee2ba6..16dbe3524e 100644
--- a/src/python/grpcio/grpc_core_dependencies.py
+++ b/src/python/grpcio/grpc_core_dependencies.py
@@ -139,7 +139,6 @@ CORE_SOURCE_FILES = [
'src/core/lib/iomgr/wakeup_fd_nospecial.c',
'src/core/lib/iomgr/wakeup_fd_pipe.c',
'src/core/lib/iomgr/wakeup_fd_posix.c',
- 'src/core/lib/iomgr/workqueue_posix.c',
'src/core/lib/iomgr/workqueue_windows.c',
'src/core/lib/json/json.c',
'src/core/lib/json/json_reader.c',
@@ -165,6 +164,7 @@ CORE_SOURCE_FILES = [
'src/core/lib/surface/version.c',
'src/core/lib/transport/byte_stream.c',
'src/core/lib/transport/connectivity_state.c',
+ 'src/core/lib/transport/mdstr_hash_table.c',
'src/core/lib/transport/metadata.c',
'src/core/lib/transport/metadata_batch.c',
'src/core/lib/transport/static_metadata.c',
@@ -223,25 +223,26 @@ CORE_SOURCE_FILES = [
'src/core/lib/tsi/ssl_transport_security.c',
'src/core/lib/tsi/transport_security.c',
'src/core/ext/transport/chttp2/client/secure/secure_channel_create.c',
- 'src/core/ext/client_config/channel_connectivity.c',
- 'src/core/ext/client_config/client_channel.c',
- 'src/core/ext/client_config/client_channel_factory.c',
- 'src/core/ext/client_config/client_config_plugin.c',
- 'src/core/ext/client_config/connector.c',
- 'src/core/ext/client_config/default_initial_connect_string.c',
- 'src/core/ext/client_config/http_connect_handshaker.c',
- 'src/core/ext/client_config/initial_connect_string.c',
- 'src/core/ext/client_config/lb_policy.c',
- 'src/core/ext/client_config/lb_policy_factory.c',
- 'src/core/ext/client_config/lb_policy_registry.c',
- 'src/core/ext/client_config/parse_address.c',
- 'src/core/ext/client_config/resolver.c',
- 'src/core/ext/client_config/resolver_factory.c',
- 'src/core/ext/client_config/resolver_registry.c',
- 'src/core/ext/client_config/resolver_result.c',
- 'src/core/ext/client_config/subchannel.c',
- 'src/core/ext/client_config/subchannel_index.c',
- 'src/core/ext/client_config/uri_parser.c',
+ 'src/core/ext/client_channel/channel_connectivity.c',
+ 'src/core/ext/client_channel/client_channel.c',
+ 'src/core/ext/client_channel/client_channel_factory.c',
+ 'src/core/ext/client_channel/client_channel_plugin.c',
+ 'src/core/ext/client_channel/connector.c',
+ 'src/core/ext/client_channel/default_initial_connect_string.c',
+ 'src/core/ext/client_channel/http_connect_handshaker.c',
+ 'src/core/ext/client_channel/initial_connect_string.c',
+ 'src/core/ext/client_channel/lb_policy.c',
+ 'src/core/ext/client_channel/lb_policy_factory.c',
+ 'src/core/ext/client_channel/lb_policy_registry.c',
+ 'src/core/ext/client_channel/method_config.c',
+ 'src/core/ext/client_channel/parse_address.c',
+ 'src/core/ext/client_channel/resolver.c',
+ 'src/core/ext/client_channel/resolver_factory.c',
+ 'src/core/ext/client_channel/resolver_registry.c',
+ 'src/core/ext/client_channel/resolver_result.c',
+ 'src/core/ext/client_channel/subchannel.c',
+ 'src/core/ext/client_channel/subchannel_index.c',
+ 'src/core/ext/client_channel/uri_parser.c',
'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c',
'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c',
'src/core/ext/transport/chttp2/client/insecure/channel_create.c',
diff --git a/src/python/grpcio_tests/tests/unit/_channel_connectivity_test.py b/src/python/grpcio_tests/tests/unit/_channel_connectivity_test.py
index 1324ad37b6..3d9dd17ff6 100644
--- a/src/python/grpcio_tests/tests/unit/_channel_connectivity_test.py
+++ b/src/python/grpcio_tests/tests/unit/_channel_connectivity_test.py
@@ -34,8 +34,6 @@ import time
import unittest
import grpc
-from grpc import _channel
-from grpc import _server
from tests.unit.framework.common import test_constants
from tests.unit import _thread_pool
@@ -78,7 +76,7 @@ class ChannelConnectivityTest(unittest.TestCase):
def test_lonely_channel_connectivity(self):
callback = _Callback()
- channel = _channel.Channel('localhost:12345', (), None)
+ channel = grpc.insecure_channel('localhost:12345')
channel.subscribe(callback.update, try_to_connect=False)
first_connectivities = callback.block_until_connectivities_satisfy(bool)
channel.subscribe(callback.update, try_to_connect=True)
@@ -105,13 +103,13 @@ class ChannelConnectivityTest(unittest.TestCase):
def test_immediately_connectable_channel_connectivity(self):
thread_pool = _thread_pool.RecordingThreadPool(max_workers=None)
- server = _server.Server(thread_pool, (), ())
+ server = grpc.server(thread_pool)
port = server.add_insecure_port('[::]:0')
server.start()
first_callback = _Callback()
second_callback = _Callback()
- channel = _channel.Channel('localhost:{}'.format(port), (), None)
+ channel = grpc.insecure_channel('localhost:{}'.format(port))
channel.subscribe(first_callback.update, try_to_connect=False)
first_connectivities = first_callback.block_until_connectivities_satisfy(
bool)
@@ -146,12 +144,12 @@ class ChannelConnectivityTest(unittest.TestCase):
def test_reachable_then_unreachable_channel_connectivity(self):
thread_pool = _thread_pool.RecordingThreadPool(max_workers=None)
- server = _server.Server(thread_pool, (), ())
+ server = grpc.server(thread_pool)
port = server.add_insecure_port('[::]:0')
server.start()
callback = _Callback()
- channel = _channel.Channel('localhost:{}'.format(port), (), None)
+ channel = grpc.insecure_channel('localhost:{}'.format(port))
channel.subscribe(callback.update, try_to_connect=True)
callback.block_until_connectivities_satisfy(_ready_in_connectivities)
# Now take down the server and confirm that channel readiness is repudiated.
diff --git a/src/python/grpcio_tests/tests/unit/_channel_ready_future_test.py b/src/python/grpcio_tests/tests/unit/_channel_ready_future_test.py
index 60d478bcd9..e0a7d15aa7 100644
--- a/src/python/grpcio_tests/tests/unit/_channel_ready_future_test.py
+++ b/src/python/grpcio_tests/tests/unit/_channel_ready_future_test.py
@@ -33,8 +33,6 @@ import threading
import unittest
import grpc
-from grpc import _channel
-from grpc import _server
from tests.unit.framework.common import test_constants
from tests.unit import _thread_pool
@@ -79,7 +77,7 @@ class ChannelReadyFutureTest(unittest.TestCase):
def test_immediately_connectable_channel_connectivity(self):
thread_pool = _thread_pool.RecordingThreadPool(max_workers=None)
- server = _server.Server(thread_pool, (), ())
+ server = grpc.server(thread_pool)
port = server.add_insecure_port('[::]:0')
server.start()
channel = grpc.insecure_channel('localhost:{}'.format(port))