From c25a3b35bd8e41c4ccf140930b4497ea707b0d6e Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Wed, 18 Feb 2015 02:46:17 +0000 Subject: [PATCH 1/2] Python source reorganization. A top-level "grpc" package is added and RPC Framework is made public. --- src/python/interop/interop/methods.py | 2 +- src/python/interop/interop/server.py | 2 +- src/python/src/{ => grpc}/__init__.py | 0 .../src/{ => grpc}/_adapter/__init__.py | 0 ...blocking_invocation_inline_service_test.py | 4 +- src/python/src/{ => grpc}/_adapter/_c.c | 10 ++-- src/python/src/{ => grpc}/_adapter/_c_test.py | 4 +- src/python/src/{ => grpc}/_adapter/_call.c | 8 ++-- src/python/src/{ => grpc}/_adapter/_call.h | 0 src/python/src/{ => grpc}/_adapter/_channel.c | 2 +- src/python/src/{ => grpc}/_adapter/_channel.h | 0 src/python/src/{ => grpc}/_adapter/_common.py | 0 .../{ => grpc}/_adapter/_completion_queue.c | 6 +-- .../{ => grpc}/_adapter/_completion_queue.h | 0 .../src/{ => grpc}/_adapter/_datatypes.py | 0 src/python/src/{ => grpc}/_adapter/_error.c | 2 +- src/python/src/{ => grpc}/_adapter/_error.h | 0 ...vocation_synchronous_event_service_test.py | 4 +- .../{ => grpc}/_adapter/_face_test_case.py | 18 ++++---- ...ocation_asynchronous_event_service_test.py | 4 +- .../src/{ => grpc}/_adapter/_links_test.py | 14 +++--- .../_adapter/_lonely_rear_link_test.py | 10 ++-- src/python/src/{ => grpc}/_adapter/_low.py | 4 +- .../src/{ => grpc}/_adapter/_low_test.py | 2 +- .../{ => grpc}/_adapter/_proto_scenarios.py | 2 +- src/python/src/{ => grpc}/_adapter/_server.c | 8 ++-- src/python/src/{ => grpc}/_adapter/_server.h | 0 .../{ => grpc}/_adapter/_server_credentials.c | 2 +- .../{ => grpc}/_adapter/_server_credentials.h | 0 .../src/{ => grpc}/_adapter/_test_links.py | 2 +- src/python/src/{ => grpc}/_adapter/fore.py | 12 ++--- src/python/src/{ => grpc}/_adapter/rear.py | 10 ++-- .../_junkdrawer}/__init__.py | 0 .../src/{ => grpc}/_junkdrawer/math_pb2.py | 0 .../src/{ => grpc}/_junkdrawer/stock_pb2.py | 0 .../base => grpc/early_adopter}/__init__.py | 0 .../early_adopter}/_face_utilities.py | 4 +- .../early_adopter}/implementations.py | 12 ++--- .../early_adopter}/interfaces.py | 0 .../early_adopter}/utilities.py | 2 +- .../packets => grpc/framework}/__init__.py | 0 .../framework/base}/__init__.py | 0 .../framework}/base/exceptions.py | 0 .../framework}/base/interfaces.py | 2 +- .../framework}/base/interfaces_test.py | 10 ++-- .../framework/base/packets}/__init__.py | 0 .../framework}/base/packets/_cancellation.py | 4 +- .../framework}/base/packets/_constants.py | 0 .../framework}/base/packets/_context.py | 6 +-- .../framework}/base/packets/_emission.py | 4 +- .../framework}/base/packets/_ends.py | 26 +++++------ .../framework}/base/packets/_expiration.py | 6 +-- .../framework}/base/packets/_ingestion.py | 16 +++---- .../framework}/base/packets/_interfaces.py | 6 +-- .../framework}/base/packets/_reception.py | 4 +- .../framework}/base/packets/_termination.py | 10 ++-- .../framework}/base/packets/_transmission.py | 10 ++-- .../base/packets/implementations.py | 4 +- .../base/packets/implementations_test.py | 8 ++-- .../framework}/base/packets/in_memory.py | 6 +-- .../framework}/base/packets/interfaces.py | 4 +- .../framework}/base/packets/null.py | 2 +- .../framework}/base/packets/packets.py | 2 +- .../framework}/base/util.py | 2 +- .../framework/common}/__init__.py | 0 .../framework}/common/cardinality.py | 0 .../framework/face}/__init__.py | 0 .../framework}/face/_calls.py | 12 ++--- .../framework}/face/_control.py | 10 ++-- .../framework}/face/_service.py | 16 +++---- .../framework}/face/_test_case.py | 8 ++-- ...blocking_invocation_inline_service_test.py | 4 +- .../framework}/face/demonstration.py | 8 ++-- ...vocation_synchronous_event_service_test.py | 4 +- .../framework}/face/exceptions.py | 0 ...ocation_asynchronous_event_service_test.py | 4 +- .../framework}/face/implementations.py | 12 ++--- .../framework}/face/interfaces.py | 6 +-- .../framework/face/testing}/__init__.py | 0 .../framework}/face/testing/base_util.py | 10 ++-- ...ing_invocation_inline_service_test_case.py | 12 ++--- .../framework}/face/testing/callback.py | 2 +- .../framework}/face/testing/control.py | 0 .../framework}/face/testing/coverage.py | 0 .../framework}/face/testing/digest.py | 14 +++--- ...ion_synchronous_event_service_test_case.py | 14 +++--- ...on_asynchronous_event_service_test_case.py | 16 +++---- .../framework}/face/testing/interfaces.py | 2 +- .../framework}/face/testing/serial.py | 0 .../framework}/face/testing/service.py | 4 +- .../framework}/face/testing/stock_service.py | 12 ++--- .../framework}/face/testing/test_case.py | 4 +- .../framework/foundation}/__init__.py | 0 .../framework}/foundation/_later_test.py | 2 +- .../foundation/_logging_pool_test.py | 2 +- .../framework}/foundation/_timer_future.py | 2 +- .../framework}/foundation/abandonment.py | 0 .../framework}/foundation/callable_util.py | 0 .../framework}/foundation/future.py | 0 .../framework}/foundation/later.py | 2 +- .../framework}/foundation/logging_pool.py | 0 .../framework}/foundation/stream.py | 0 .../framework}/foundation/stream_testing.py | 2 +- .../framework}/foundation/stream_util.py | 2 +- src/python/src/setup.py | 46 ++++++++++--------- tools/dockerfile/grpc_python/Dockerfile | 26 +++++------ tools/run_tests/run_python.sh | 26 +++++------ 107 files changed, 284 insertions(+), 282 deletions(-) rename src/python/src/{ => grpc}/__init__.py (100%) rename src/python/src/{ => grpc}/_adapter/__init__.py (100%) rename src/python/src/{ => grpc}/_adapter/_blocking_invocation_inline_service_test.py (67%) rename src/python/src/{ => grpc}/_adapter/_c.c (92%) rename src/python/src/{ => grpc}/_adapter/_c_test.py (98%) rename src/python/src/{ => grpc}/_adapter/_call.c (98%) rename src/python/src/{ => grpc}/_adapter/_call.h (100%) rename src/python/src/{ => grpc}/_adapter/_channel.c (99%) rename src/python/src/{ => grpc}/_adapter/_channel.h (100%) rename src/python/src/{ => grpc}/_adapter/_common.py (100%) rename src/python/src/{ => grpc}/_adapter/_completion_queue.c (99%) rename src/python/src/{ => grpc}/_adapter/_completion_queue.h (100%) rename src/python/src/{ => grpc}/_adapter/_datatypes.py (100%) rename src/python/src/{ => grpc}/_adapter/_error.c (98%) rename src/python/src/{ => grpc}/_adapter/_error.h (100%) rename src/python/src/{ => grpc}/_adapter/_event_invocation_synchronous_event_service_test.py (92%) rename src/python/src/{ => grpc}/_adapter/_face_test_case.py (91%) rename src/python/src/{ => grpc}/_adapter/_future_invocation_asynchronous_event_service_test.py (92%) rename src/python/src/{ => grpc}/_adapter/_links_test.py (97%) rename src/python/src/{ => grpc}/_adapter/_lonely_rear_link_test.py (94%) rename src/python/src/{ => grpc}/_adapter/_low.py (96%) rename src/python/src/{ => grpc}/_adapter/_low_test.py (99%) rename src/python/src/{ => grpc}/_adapter/_proto_scenarios.py (99%) rename src/python/src/{ => grpc}/_adapter/_server.c (97%) rename src/python/src/{ => grpc}/_adapter/_server.h (100%) rename src/python/src/{ => grpc}/_adapter/_server_credentials.c (99%) rename src/python/src/{ => grpc}/_adapter/_server_credentials.h (100%) rename src/python/src/{ => grpc}/_adapter/_test_links.py (98%) rename src/python/src/{ => grpc}/_adapter/fore.py (97%) rename src/python/src/{ => grpc}/_adapter/rear.py (98%) rename src/python/src/{_framework => grpc/_junkdrawer}/__init__.py (100%) rename src/python/src/{ => grpc}/_junkdrawer/math_pb2.py (100%) rename src/python/src/{ => grpc}/_junkdrawer/stock_pb2.py (100%) rename src/python/src/{_framework/base => grpc/early_adopter}/__init__.py (100%) rename src/python/src/{grpc_early_adopter => grpc/early_adopter}/_face_utilities.py (97%) rename src/python/src/{grpc_early_adopter => grpc/early_adopter}/implementations.py (93%) rename src/python/src/{grpc_early_adopter => grpc/early_adopter}/interfaces.py (100%) rename src/python/src/{grpc_early_adopter => grpc/early_adopter}/utilities.py (99%) rename src/python/src/{_framework/base/packets => grpc/framework}/__init__.py (100%) rename src/python/src/{_framework/common => grpc/framework/base}/__init__.py (100%) rename src/python/src/{_framework => grpc/framework}/base/exceptions.py (100%) rename src/python/src/{_framework => grpc/framework}/base/interfaces.py (98%) rename src/python/src/{_framework => grpc/framework}/base/interfaces_test.py (98%) rename src/python/src/{_framework/face => grpc/framework/base/packets}/__init__.py (100%) rename src/python/src/{_framework => grpc/framework}/base/packets/_cancellation.py (96%) rename src/python/src/{_framework => grpc/framework}/base/packets/_constants.py (100%) rename src/python/src/{_framework => grpc/framework}/base/packets/_context.py (94%) rename src/python/src/{_framework => grpc/framework}/base/packets/_emission.py (97%) rename src/python/src/{_framework => grpc/framework}/base/packets/_ends.py (95%) rename src/python/src/{_framework => grpc/framework}/base/packets/_expiration.py (97%) rename src/python/src/{_framework => grpc/framework}/base/packets/_ingestion.py (97%) rename src/python/src/{_framework => grpc/framework}/base/packets/_interfaces.py (97%) rename src/python/src/{_framework => grpc/framework}/base/packets/_reception.py (99%) rename src/python/src/{_framework => grpc/framework}/base/packets/_termination.py (97%) rename src/python/src/{_framework => grpc/framework}/base/packets/_transmission.py (98%) rename src/python/src/{_framework => grpc/framework}/base/packets/implementations.py (96%) rename src/python/src/{_framework => grpc/framework}/base/packets/implementations_test.py (94%) rename src/python/src/{_framework => grpc/framework}/base/packets/in_memory.py (96%) rename src/python/src/{_framework => grpc/framework}/base/packets/interfaces.py (96%) rename src/python/src/{_framework => grpc/framework}/base/packets/null.py (97%) rename src/python/src/{_framework => grpc/framework}/base/packets/packets.py (98%) rename src/python/src/{_framework => grpc/framework}/base/util.py (98%) rename src/python/src/{_framework/face/testing => grpc/framework/common}/__init__.py (100%) rename src/python/src/{_framework => grpc/framework}/common/cardinality.py (100%) rename src/python/src/{_framework/foundation => grpc/framework/face}/__init__.py (100%) rename src/python/src/{_framework => grpc/framework}/face/_calls.py (98%) rename src/python/src/{_framework => grpc/framework}/face/_control.py (96%) rename src/python/src/{_framework => grpc/framework}/face/_service.py (93%) rename src/python/src/{_framework => grpc/framework}/face/_test_case.py (94%) rename src/python/src/{_framework => grpc/framework}/face/blocking_invocation_inline_service_test.py (92%) rename src/python/src/{_framework => grpc/framework}/face/demonstration.py (95%) rename src/python/src/{_framework => grpc/framework}/face/event_invocation_synchronous_event_service_test.py (92%) rename src/python/src/{_framework => grpc/framework}/face/exceptions.py (100%) rename src/python/src/{_framework => grpc/framework}/face/future_invocation_asynchronous_event_service_test.py (92%) rename src/python/src/{_framework => grpc/framework}/face/implementations.py (96%) rename src/python/src/{_framework => grpc/framework}/face/interfaces.py (98%) rename src/python/src/{_junkdrawer => grpc/framework/face/testing}/__init__.py (100%) rename src/python/src/{_framework => grpc/framework}/face/testing/base_util.py (92%) rename src/python/src/{_framework => grpc/framework}/face/testing/blocking_invocation_inline_service_test_case.py (96%) rename src/python/src/{_framework => grpc/framework}/face/testing/callback.py (98%) rename src/python/src/{_framework => grpc/framework}/face/testing/control.py (100%) rename src/python/src/{_framework => grpc/framework}/face/testing/coverage.py (100%) rename src/python/src/{_framework => grpc/framework}/face/testing/digest.py (96%) rename src/python/src/{_framework => grpc/framework}/face/testing/event_invocation_synchronous_event_service_test_case.py (97%) rename src/python/src/{_framework => grpc/framework}/face/testing/future_invocation_asynchronous_event_service_test_case.py (97%) rename src/python/src/{_framework => grpc/framework}/face/testing/interfaces.py (97%) rename src/python/src/{_framework => grpc/framework}/face/testing/serial.py (100%) rename src/python/src/{_framework => grpc/framework}/face/testing/service.py (98%) rename src/python/src/{_framework => grpc/framework}/face/testing/stock_service.py (97%) rename src/python/src/{_framework => grpc/framework}/face/testing/test_case.py (96%) rename src/python/src/{grpc_early_adopter => grpc/framework/foundation}/__init__.py (100%) rename src/python/src/{_framework => grpc/framework}/foundation/_later_test.py (99%) rename src/python/src/{_framework => grpc/framework}/foundation/_logging_pool_test.py (97%) rename src/python/src/{_framework => grpc/framework}/foundation/_timer_future.py (99%) rename src/python/src/{_framework => grpc/framework}/foundation/abandonment.py (100%) rename src/python/src/{_framework => grpc/framework}/foundation/callable_util.py (100%) rename src/python/src/{_framework => grpc/framework}/foundation/future.py (100%) rename src/python/src/{_framework => grpc/framework}/foundation/later.py (97%) rename src/python/src/{_framework => grpc/framework}/foundation/logging_pool.py (100%) rename src/python/src/{_framework => grpc/framework}/foundation/stream.py (100%) rename src/python/src/{_framework => grpc/framework}/foundation/stream_testing.py (98%) rename src/python/src/{_framework => grpc/framework}/foundation/stream_util.py (99%) diff --git a/src/python/interop/interop/methods.py b/src/python/interop/interop/methods.py index e5ce5902ca7..854dbec8cc3 100644 --- a/src/python/interop/interop/methods.py +++ b/src/python/interop/interop/methods.py @@ -29,7 +29,7 @@ """Implementations of interoperability test methods.""" -from grpc_early_adopter import utilities +from grpc.early_adopter import utilities from interop import empty_pb2 from interop import messages_pb2 diff --git a/src/python/interop/interop/server.py b/src/python/interop/interop/server.py index 404c87dd0a9..0035e062a4e 100644 --- a/src/python/interop/interop/server.py +++ b/src/python/interop/interop/server.py @@ -34,7 +34,7 @@ import logging import pkg_resources import time -from grpc_early_adopter import implementations +from grpc.early_adopter import implementations from interop import methods diff --git a/src/python/src/__init__.py b/src/python/src/grpc/__init__.py similarity index 100% rename from src/python/src/__init__.py rename to src/python/src/grpc/__init__.py diff --git a/src/python/src/_adapter/__init__.py b/src/python/src/grpc/_adapter/__init__.py similarity index 100% rename from src/python/src/_adapter/__init__.py rename to src/python/src/grpc/_adapter/__init__.py diff --git a/src/python/src/_adapter/_blocking_invocation_inline_service_test.py b/src/python/src/grpc/_adapter/_blocking_invocation_inline_service_test.py similarity index 67% rename from src/python/src/_adapter/_blocking_invocation_inline_service_test.py rename to src/python/src/grpc/_adapter/_blocking_invocation_inline_service_test.py index 873ce9a5a46..761e5cf6839 100644 --- a/src/python/src/_adapter/_blocking_invocation_inline_service_test.py +++ b/src/python/src/grpc/_adapter/_blocking_invocation_inline_service_test.py @@ -2,8 +2,8 @@ import unittest -from _adapter import _face_test_case -from _framework.face.testing import blocking_invocation_inline_service_test_case as test_case +from grpc._adapter import _face_test_case +from grpc.framework.face.testing import blocking_invocation_inline_service_test_case as test_case class BlockingInvocationInlineServiceTest( diff --git a/src/python/src/_adapter/_c.c b/src/python/src/grpc/_adapter/_c.c similarity index 92% rename from src/python/src/_adapter/_c.c rename to src/python/src/grpc/_adapter/_c.c index 6fb7fa29faf..13eb93fe5ab 100644 --- a/src/python/src/_adapter/_c.c +++ b/src/python/src/grpc/_adapter/_c.c @@ -34,11 +34,11 @@ #include #include -#include "_adapter/_completion_queue.h" -#include "_adapter/_channel.h" -#include "_adapter/_call.h" -#include "_adapter/_server.h" -#include "_adapter/_server_credentials.h" +#include "grpc/_adapter/_completion_queue.h" +#include "grpc/_adapter/_channel.h" +#include "grpc/_adapter/_call.h" +#include "grpc/_adapter/_server.h" +#include "grpc/_adapter/_server_credentials.h" static PyObject *init(PyObject *self, PyObject *args) { grpc_init(); diff --git a/src/python/src/_adapter/_c_test.py b/src/python/src/grpc/_adapter/_c_test.py similarity index 98% rename from src/python/src/_adapter/_c_test.py rename to src/python/src/grpc/_adapter/_c_test.py index 210ac1fff78..d421692ec9c 100644 --- a/src/python/src/_adapter/_c_test.py +++ b/src/python/src/grpc/_adapter/_c_test.py @@ -33,8 +33,8 @@ import threading import time import unittest -from _adapter import _c -from _adapter import _datatypes +from grpc._adapter import _c +from grpc._adapter import _datatypes _TIMEOUT = 3 _FUTURE = time.time() + 60 * 60 * 24 diff --git a/src/python/src/_adapter/_call.c b/src/python/src/grpc/_adapter/_call.c similarity index 98% rename from src/python/src/_adapter/_call.c rename to src/python/src/grpc/_adapter/_call.c index 3bc35be0ef0..a2cc590d28b 100644 --- a/src/python/src/_adapter/_call.c +++ b/src/python/src/grpc/_adapter/_call.c @@ -31,15 +31,15 @@ * */ -#include "_adapter/_call.h" +#include "grpc/_adapter/_call.h" #include #include #include -#include "_adapter/_channel.h" -#include "_adapter/_completion_queue.h" -#include "_adapter/_error.h" +#include "grpc/_adapter/_channel.h" +#include "grpc/_adapter/_completion_queue.h" +#include "grpc/_adapter/_error.h" static int pygrpc_call_init(Call *self, PyObject *args, PyObject *kwds) { const PyObject *channel; diff --git a/src/python/src/_adapter/_call.h b/src/python/src/grpc/_adapter/_call.h similarity index 100% rename from src/python/src/_adapter/_call.h rename to src/python/src/grpc/_adapter/_call.h diff --git a/src/python/src/_adapter/_channel.c b/src/python/src/grpc/_adapter/_channel.c similarity index 99% rename from src/python/src/_adapter/_channel.c rename to src/python/src/grpc/_adapter/_channel.c index d41ebd4479e..6962722ed25 100644 --- a/src/python/src/_adapter/_channel.c +++ b/src/python/src/grpc/_adapter/_channel.c @@ -31,7 +31,7 @@ * */ -#include "_adapter/_channel.h" +#include "grpc/_adapter/_channel.h" #include #include diff --git a/src/python/src/_adapter/_channel.h b/src/python/src/grpc/_adapter/_channel.h similarity index 100% rename from src/python/src/_adapter/_channel.h rename to src/python/src/grpc/_adapter/_channel.h diff --git a/src/python/src/_adapter/_common.py b/src/python/src/grpc/_adapter/_common.py similarity index 100% rename from src/python/src/_adapter/_common.py rename to src/python/src/grpc/_adapter/_common.py diff --git a/src/python/src/_adapter/_completion_queue.c b/src/python/src/grpc/_adapter/_completion_queue.c similarity index 99% rename from src/python/src/_adapter/_completion_queue.c rename to src/python/src/grpc/_adapter/_completion_queue.c index 7c951d24a00..1d593d0d140 100644 --- a/src/python/src/_adapter/_completion_queue.c +++ b/src/python/src/grpc/_adapter/_completion_queue.c @@ -31,13 +31,13 @@ * */ -#include "_adapter/_completion_queue.h" +#include "grpc/_adapter/_completion_queue.h" #include #include #include -#include "_adapter/_call.h" +#include "grpc/_adapter/_call.h" static PyObject *status_class; static PyObject *service_acceptance_class; @@ -500,7 +500,7 @@ static int pygrpc_get_event_kinds(PyObject *event_class) { } int pygrpc_add_completion_queue(PyObject *module) { - char *datatypes_module_path = "_adapter._datatypes"; + char *datatypes_module_path = "grpc._adapter._datatypes"; PyObject *datatypes_module = PyImport_ImportModule(datatypes_module_path); if (datatypes_module == NULL) { PyErr_SetString(PyExc_ImportError, datatypes_module_path); diff --git a/src/python/src/_adapter/_completion_queue.h b/src/python/src/grpc/_adapter/_completion_queue.h similarity index 100% rename from src/python/src/_adapter/_completion_queue.h rename to src/python/src/grpc/_adapter/_completion_queue.h diff --git a/src/python/src/_adapter/_datatypes.py b/src/python/src/grpc/_adapter/_datatypes.py similarity index 100% rename from src/python/src/_adapter/_datatypes.py rename to src/python/src/grpc/_adapter/_datatypes.py diff --git a/src/python/src/_adapter/_error.c b/src/python/src/grpc/_adapter/_error.c similarity index 98% rename from src/python/src/_adapter/_error.c rename to src/python/src/grpc/_adapter/_error.c index 8c04f4bcea7..a8a1dbc1bbf 100644 --- a/src/python/src/_adapter/_error.c +++ b/src/python/src/grpc/_adapter/_error.c @@ -31,7 +31,7 @@ * */ -#include "_adapter/_error.h" +#include "grpc/_adapter/_error.h" #include #include diff --git a/src/python/src/_adapter/_error.h b/src/python/src/grpc/_adapter/_error.h similarity index 100% rename from src/python/src/_adapter/_error.h rename to src/python/src/grpc/_adapter/_error.h diff --git a/src/python/src/_adapter/_event_invocation_synchronous_event_service_test.py b/src/python/src/grpc/_adapter/_event_invocation_synchronous_event_service_test.py similarity index 92% rename from src/python/src/_adapter/_event_invocation_synchronous_event_service_test.py rename to src/python/src/grpc/_adapter/_event_invocation_synchronous_event_service_test.py index 69d91ec7da7..b9a13ce69fd 100644 --- a/src/python/src/_adapter/_event_invocation_synchronous_event_service_test.py +++ b/src/python/src/grpc/_adapter/_event_invocation_synchronous_event_service_test.py @@ -31,8 +31,8 @@ import unittest -from _adapter import _face_test_case -from _framework.face.testing import event_invocation_synchronous_event_service_test_case as test_case +from grpc._adapter import _face_test_case +from grpc.framework.face.testing import event_invocation_synchronous_event_service_test_case as test_case class EventInvocationSynchronousEventServiceTest( diff --git a/src/python/src/_adapter/_face_test_case.py b/src/python/src/grpc/_adapter/_face_test_case.py similarity index 91% rename from src/python/src/_adapter/_face_test_case.py rename to src/python/src/grpc/_adapter/_face_test_case.py index 2c6e6286b57..da73366f446 100644 --- a/src/python/src/_adapter/_face_test_case.py +++ b/src/python/src/grpc/_adapter/_face_test_case.py @@ -31,15 +31,15 @@ import unittest -from _adapter import fore -from _adapter import rear -from _framework.base import util -from _framework.base.packets import implementations as tickets_implementations -from _framework.face import implementations as face_implementations -from _framework.face.testing import coverage -from _framework.face.testing import serial -from _framework.face.testing import test_case -from _framework.foundation import logging_pool +from grpc._adapter import fore +from grpc._adapter import rear +from grpc.framework.base import util +from grpc.framework.base.packets import implementations as tickets_implementations +from grpc.framework.face import implementations as face_implementations +from grpc.framework.face.testing import coverage +from grpc.framework.face.testing import serial +from grpc.framework.face.testing import test_case +from grpc.framework.foundation import logging_pool _TIMEOUT = 3 _MAXIMUM_TIMEOUT = 90 diff --git a/src/python/src/_adapter/_future_invocation_asynchronous_event_service_test.py b/src/python/src/grpc/_adapter/_future_invocation_asynchronous_event_service_test.py similarity index 92% rename from src/python/src/_adapter/_future_invocation_asynchronous_event_service_test.py rename to src/python/src/grpc/_adapter/_future_invocation_asynchronous_event_service_test.py index 3db39dd1540..7d6a4ffc17a 100644 --- a/src/python/src/_adapter/_future_invocation_asynchronous_event_service_test.py +++ b/src/python/src/grpc/_adapter/_future_invocation_asynchronous_event_service_test.py @@ -31,8 +31,8 @@ import unittest -from _adapter import _face_test_case -from _framework.face.testing import future_invocation_asynchronous_event_service_test_case as test_case +from grpc._adapter import _face_test_case +from grpc.framework.face.testing import future_invocation_asynchronous_event_service_test_case as test_case class FutureInvocationAsynchronousEventServiceTest( diff --git a/src/python/src/_adapter/_links_test.py b/src/python/src/grpc/_adapter/_links_test.py similarity index 97% rename from src/python/src/_adapter/_links_test.py rename to src/python/src/grpc/_adapter/_links_test.py index d8bbb271270..ba7660bb920 100644 --- a/src/python/src/_adapter/_links_test.py +++ b/src/python/src/grpc/_adapter/_links_test.py @@ -32,13 +32,13 @@ import threading import unittest -from _adapter import _proto_scenarios -from _adapter import _test_links -from _adapter import fore -from _adapter import rear -from _framework.base import interfaces -from _framework.base.packets import packets as tickets -from _framework.foundation import logging_pool +from grpc._adapter import _proto_scenarios +from grpc._adapter import _test_links +from grpc._adapter import fore +from grpc._adapter import rear +from grpc.framework.base import interfaces +from grpc.framework.base.packets import packets as tickets +from grpc.framework.foundation import logging_pool _IDENTITY = lambda x: x _TIMEOUT = 2 diff --git a/src/python/src/_adapter/_lonely_rear_link_test.py b/src/python/src/grpc/_adapter/_lonely_rear_link_test.py similarity index 94% rename from src/python/src/_adapter/_lonely_rear_link_test.py rename to src/python/src/grpc/_adapter/_lonely_rear_link_test.py index 7ccdb0b5307..fd502a1c817 100644 --- a/src/python/src/_adapter/_lonely_rear_link_test.py +++ b/src/python/src/grpc/_adapter/_lonely_rear_link_test.py @@ -31,11 +31,11 @@ import unittest -from _adapter import _test_links -from _adapter import rear -from _framework.base import interfaces -from _framework.base.packets import packets -from _framework.foundation import logging_pool +from grpc._adapter import _test_links +from grpc._adapter import rear +from grpc.framework.base import interfaces +from grpc.framework.base.packets import packets +from grpc.framework.foundation import logging_pool _IDENTITY = lambda x: x _TIMEOUT = 2 diff --git a/src/python/src/_adapter/_low.py b/src/python/src/grpc/_adapter/_low.py similarity index 96% rename from src/python/src/_adapter/_low.py rename to src/python/src/grpc/_adapter/_low.py index 09105eafa0c..2ef2eb879c1 100644 --- a/src/python/src/_adapter/_low.py +++ b/src/python/src/grpc/_adapter/_low.py @@ -32,8 +32,8 @@ import atexit import gc -from _adapter import _c -from _adapter import _datatypes +from grpc._adapter import _c +from grpc._adapter import _datatypes def _shut_down(): # force garbage collection before shutting down grpc, to ensure all grpc diff --git a/src/python/src/_adapter/_low_test.py b/src/python/src/grpc/_adapter/_low_test.py similarity index 99% rename from src/python/src/_adapter/_low_test.py rename to src/python/src/grpc/_adapter/_low_test.py index 899ccf53c8a..898c62c0026 100644 --- a/src/python/src/_adapter/_low_test.py +++ b/src/python/src/grpc/_adapter/_low_test.py @@ -32,7 +32,7 @@ import time import unittest -from _adapter import _low +from grpc._adapter import _low _STREAM_LENGTH = 300 _TIMEOUT = 5 diff --git a/src/python/src/_adapter/_proto_scenarios.py b/src/python/src/grpc/_adapter/_proto_scenarios.py similarity index 99% rename from src/python/src/_adapter/_proto_scenarios.py rename to src/python/src/grpc/_adapter/_proto_scenarios.py index c452fb523ae..60a622ba8b8 100644 --- a/src/python/src/_adapter/_proto_scenarios.py +++ b/src/python/src/grpc/_adapter/_proto_scenarios.py @@ -32,7 +32,7 @@ import abc import threading -from _junkdrawer import math_pb2 +from grpc._junkdrawer import math_pb2 class ProtoScenario(object): diff --git a/src/python/src/_adapter/_server.c b/src/python/src/grpc/_adapter/_server.c similarity index 97% rename from src/python/src/_adapter/_server.c rename to src/python/src/grpc/_adapter/_server.c index 2f8cc99e44d..d4bf5fb8f64 100644 --- a/src/python/src/_adapter/_server.c +++ b/src/python/src/grpc/_adapter/_server.c @@ -31,14 +31,14 @@ * */ -#include "_adapter/_server.h" +#include "grpc/_adapter/_server.h" #include #include -#include "_adapter/_completion_queue.h" -#include "_adapter/_error.h" -#include "_adapter/_server_credentials.h" +#include "grpc/_adapter/_completion_queue.h" +#include "grpc/_adapter/_error.h" +#include "grpc/_adapter/_server_credentials.h" static int pygrpc_server_init(Server *self, PyObject *args, PyObject *kwds) { const PyObject *completion_queue; diff --git a/src/python/src/_adapter/_server.h b/src/python/src/grpc/_adapter/_server.h similarity index 100% rename from src/python/src/_adapter/_server.h rename to src/python/src/grpc/_adapter/_server.h diff --git a/src/python/src/_adapter/_server_credentials.c b/src/python/src/grpc/_adapter/_server_credentials.c similarity index 99% rename from src/python/src/_adapter/_server_credentials.c rename to src/python/src/grpc/_adapter/_server_credentials.c index 390266ae897..ae85fd3eb75 100644 --- a/src/python/src/_adapter/_server_credentials.c +++ b/src/python/src/grpc/_adapter/_server_credentials.c @@ -31,7 +31,7 @@ * */ -#include "_adapter/_server_credentials.h" +#include "grpc/_adapter/_server_credentials.h" #include #include diff --git a/src/python/src/_adapter/_server_credentials.h b/src/python/src/grpc/_adapter/_server_credentials.h similarity index 100% rename from src/python/src/_adapter/_server_credentials.h rename to src/python/src/grpc/_adapter/_server_credentials.h diff --git a/src/python/src/_adapter/_test_links.py b/src/python/src/grpc/_adapter/_test_links.py similarity index 98% rename from src/python/src/_adapter/_test_links.py rename to src/python/src/grpc/_adapter/_test_links.py index 77d1b00f366..ac0d6e20b69 100644 --- a/src/python/src/_adapter/_test_links.py +++ b/src/python/src/grpc/_adapter/_test_links.py @@ -31,7 +31,7 @@ import threading -from _framework.base.packets import interfaces +from grpc.framework.base.packets import interfaces class ForeLink(interfaces.ForeLink): diff --git a/src/python/src/_adapter/fore.py b/src/python/src/grpc/_adapter/fore.py similarity index 97% rename from src/python/src/_adapter/fore.py rename to src/python/src/grpc/_adapter/fore.py index 28aede1fd9d..f72b2fd5a5f 100644 --- a/src/python/src/_adapter/fore.py +++ b/src/python/src/grpc/_adapter/fore.py @@ -34,12 +34,12 @@ import logging import threading import time -from _adapter import _common -from _adapter import _low -from _framework.base import interfaces -from _framework.base.packets import interfaces as ticket_interfaces -from _framework.base.packets import null -from _framework.base.packets import packets as tickets +from grpc._adapter import _common +from grpc._adapter import _low +from grpc.framework.base import interfaces +from grpc.framework.base.packets import interfaces as ticket_interfaces +from grpc.framework.base.packets import null +from grpc.framework.base.packets import packets as tickets @enum.unique diff --git a/src/python/src/_adapter/rear.py b/src/python/src/grpc/_adapter/rear.py similarity index 98% rename from src/python/src/_adapter/rear.py rename to src/python/src/grpc/_adapter/rear.py index 5e0975ab4e3..c47c0aa0209 100644 --- a/src/python/src/_adapter/rear.py +++ b/src/python/src/grpc/_adapter/rear.py @@ -34,11 +34,11 @@ import logging import threading import time -from _adapter import _common -from _adapter import _low -from _framework.base.packets import interfaces as ticket_interfaces -from _framework.base.packets import null -from _framework.base.packets import packets as tickets +from grpc._adapter import _common +from grpc._adapter import _low +from grpc.framework.base.packets import interfaces as ticket_interfaces +from grpc.framework.base.packets import null +from grpc.framework.base.packets import packets as tickets _INVOCATION_EVENT_KINDS = ( _low.Event.Kind.METADATA_ACCEPTED, diff --git a/src/python/src/_framework/__init__.py b/src/python/src/grpc/_junkdrawer/__init__.py similarity index 100% rename from src/python/src/_framework/__init__.py rename to src/python/src/grpc/_junkdrawer/__init__.py diff --git a/src/python/src/_junkdrawer/math_pb2.py b/src/python/src/grpc/_junkdrawer/math_pb2.py similarity index 100% rename from src/python/src/_junkdrawer/math_pb2.py rename to src/python/src/grpc/_junkdrawer/math_pb2.py diff --git a/src/python/src/_junkdrawer/stock_pb2.py b/src/python/src/grpc/_junkdrawer/stock_pb2.py similarity index 100% rename from src/python/src/_junkdrawer/stock_pb2.py rename to src/python/src/grpc/_junkdrawer/stock_pb2.py diff --git a/src/python/src/_framework/base/__init__.py b/src/python/src/grpc/early_adopter/__init__.py similarity index 100% rename from src/python/src/_framework/base/__init__.py rename to src/python/src/grpc/early_adopter/__init__.py diff --git a/src/python/src/grpc_early_adopter/_face_utilities.py b/src/python/src/grpc/early_adopter/_face_utilities.py similarity index 97% rename from src/python/src/grpc_early_adopter/_face_utilities.py rename to src/python/src/grpc/early_adopter/_face_utilities.py index 8b10be729b2..714f2bb79cb 100644 --- a/src/python/src/grpc_early_adopter/_face_utilities.py +++ b/src/python/src/grpc/early_adopter/_face_utilities.py @@ -30,9 +30,9 @@ import abc import collections -from _framework.face import interfaces as face_interfaces +from grpc.framework.face import interfaces as face_interfaces -from grpc_early_adopter import interfaces +from grpc.early_adopter import interfaces class _InlineUnaryUnaryMethod(face_interfaces.InlineValueInValueOutMethod): diff --git a/src/python/src/grpc_early_adopter/implementations.py b/src/python/src/grpc/early_adopter/implementations.py similarity index 93% rename from src/python/src/grpc_early_adopter/implementations.py rename to src/python/src/grpc/early_adopter/implementations.py index 8a2f7fde616..cd9dd5a57d6 100644 --- a/src/python/src/grpc_early_adopter/implementations.py +++ b/src/python/src/grpc/early_adopter/implementations.py @@ -31,12 +31,12 @@ import threading -from _adapter import fore -from _framework.base.packets import implementations as _tickets_implementations -from _framework.face import implementations as _face_implementations -from _framework.foundation import logging_pool -from grpc_early_adopter import _face_utilities -from grpc_early_adopter import interfaces +from grpc._adapter import fore +from grpc.framework.base.packets import implementations as _tickets_implementations +from grpc.framework.face import implementations as _face_implementations +from grpc.framework.foundation import logging_pool +from grpc.early_adopter import _face_utilities +from grpc.early_adopter import interfaces _MEGA_TIMEOUT = 60 * 60 * 24 _THREAD_POOL_SIZE = 80 diff --git a/src/python/src/grpc_early_adopter/interfaces.py b/src/python/src/grpc/early_adopter/interfaces.py similarity index 100% rename from src/python/src/grpc_early_adopter/interfaces.py rename to src/python/src/grpc/early_adopter/interfaces.py diff --git a/src/python/src/grpc_early_adopter/utilities.py b/src/python/src/grpc/early_adopter/utilities.py similarity index 99% rename from src/python/src/grpc_early_adopter/utilities.py rename to src/python/src/grpc/early_adopter/utilities.py index 333ed3a9db4..a4ee253d830 100644 --- a/src/python/src/grpc_early_adopter/utilities.py +++ b/src/python/src/grpc/early_adopter/utilities.py @@ -29,7 +29,7 @@ """Utilities for use with GRPC.""" -from grpc_early_adopter import interfaces +from grpc.early_adopter import interfaces class _RpcMethod(interfaces.RpcMethod): diff --git a/src/python/src/_framework/base/packets/__init__.py b/src/python/src/grpc/framework/__init__.py similarity index 100% rename from src/python/src/_framework/base/packets/__init__.py rename to src/python/src/grpc/framework/__init__.py diff --git a/src/python/src/_framework/common/__init__.py b/src/python/src/grpc/framework/base/__init__.py similarity index 100% rename from src/python/src/_framework/common/__init__.py rename to src/python/src/grpc/framework/base/__init__.py diff --git a/src/python/src/_framework/base/exceptions.py b/src/python/src/grpc/framework/base/exceptions.py similarity index 100% rename from src/python/src/_framework/base/exceptions.py rename to src/python/src/grpc/framework/base/exceptions.py diff --git a/src/python/src/_framework/base/interfaces.py b/src/python/src/grpc/framework/base/interfaces.py similarity index 98% rename from src/python/src/_framework/base/interfaces.py rename to src/python/src/grpc/framework/base/interfaces.py index 70030e564d6..ed43b253fe5 100644 --- a/src/python/src/_framework/base/interfaces.py +++ b/src/python/src/grpc/framework/base/interfaces.py @@ -33,7 +33,7 @@ import abc import enum # stream is referenced from specification in this module. -from _framework.foundation import stream # pylint: disable=unused-import +from grpc.framework.foundation import stream # pylint: disable=unused-import @enum.unique diff --git a/src/python/src/_framework/base/interfaces_test.py b/src/python/src/grpc/framework/base/interfaces_test.py similarity index 98% rename from src/python/src/_framework/base/interfaces_test.py rename to src/python/src/grpc/framework/base/interfaces_test.py index 8e26d884ec4..b86011c449e 100644 --- a/src/python/src/_framework/base/interfaces_test.py +++ b/src/python/src/grpc/framework/base/interfaces_test.py @@ -32,11 +32,11 @@ import threading import time -from _framework.base import interfaces -from _framework.base import util -from _framework.foundation import stream -from _framework.foundation import stream_testing -from _framework.foundation import stream_util +from grpc.framework.base import interfaces +from grpc.framework.base import util +from grpc.framework.foundation import stream +from grpc.framework.foundation import stream_testing +from grpc.framework.foundation import stream_util TICK = 0.1 SMALL_TIMEOUT = TICK * 50 diff --git a/src/python/src/_framework/face/__init__.py b/src/python/src/grpc/framework/base/packets/__init__.py similarity index 100% rename from src/python/src/_framework/face/__init__.py rename to src/python/src/grpc/framework/base/packets/__init__.py diff --git a/src/python/src/_framework/base/packets/_cancellation.py b/src/python/src/grpc/framework/base/packets/_cancellation.py similarity index 96% rename from src/python/src/_framework/base/packets/_cancellation.py rename to src/python/src/grpc/framework/base/packets/_cancellation.py index 49172d1b974..2373c78842d 100644 --- a/src/python/src/_framework/base/packets/_cancellation.py +++ b/src/python/src/grpc/framework/base/packets/_cancellation.py @@ -29,8 +29,8 @@ """State and behavior for operation cancellation.""" -from _framework.base.packets import _interfaces -from _framework.base.packets import packets +from grpc.framework.base.packets import _interfaces +from grpc.framework.base.packets import packets class CancellationManager(_interfaces.CancellationManager): diff --git a/src/python/src/_framework/base/packets/_constants.py b/src/python/src/grpc/framework/base/packets/_constants.py similarity index 100% rename from src/python/src/_framework/base/packets/_constants.py rename to src/python/src/grpc/framework/base/packets/_constants.py diff --git a/src/python/src/_framework/base/packets/_context.py b/src/python/src/grpc/framework/base/packets/_context.py similarity index 94% rename from src/python/src/_framework/base/packets/_context.py rename to src/python/src/grpc/framework/base/packets/_context.py index be390364b0a..e09d4a60c91 100644 --- a/src/python/src/_framework/base/packets/_context.py +++ b/src/python/src/grpc/framework/base/packets/_context.py @@ -32,9 +32,9 @@ import time # _interfaces and packets are referenced from specification in this module. -from _framework.base import interfaces as base_interfaces -from _framework.base.packets import _interfaces # pylint: disable=unused-import -from _framework.base.packets import packets # pylint: disable=unused-import +from grpc.framework.base import interfaces as base_interfaces +from grpc.framework.base.packets import _interfaces # pylint: disable=unused-import +from grpc.framework.base.packets import packets # pylint: disable=unused-import class OperationContext(base_interfaces.OperationContext): diff --git a/src/python/src/_framework/base/packets/_emission.py b/src/python/src/grpc/framework/base/packets/_emission.py similarity index 97% rename from src/python/src/_framework/base/packets/_emission.py rename to src/python/src/grpc/framework/base/packets/_emission.py index b4be5eb0ff9..9446b8665db 100644 --- a/src/python/src/_framework/base/packets/_emission.py +++ b/src/python/src/grpc/framework/base/packets/_emission.py @@ -30,8 +30,8 @@ """State and behavior for handling emitted values.""" # packets is referenced from specifications in this module. -from _framework.base.packets import _interfaces -from _framework.base.packets import packets # pylint: disable=unused-import +from grpc.framework.base.packets import _interfaces +from grpc.framework.base.packets import packets # pylint: disable=unused-import class _EmissionManager(_interfaces.EmissionManager): diff --git a/src/python/src/_framework/base/packets/_ends.py b/src/python/src/grpc/framework/base/packets/_ends.py similarity index 95% rename from src/python/src/_framework/base/packets/_ends.py rename to src/python/src/grpc/framework/base/packets/_ends.py index b1d16451e2a..15bf3bf330b 100644 --- a/src/python/src/_framework/base/packets/_ends.py +++ b/src/python/src/grpc/framework/base/packets/_ends.py @@ -34,19 +34,19 @@ import threading import uuid # _interfaces and packets are referenced from specification in this module. -from _framework.base import interfaces as base_interfaces -from _framework.base.packets import _cancellation -from _framework.base.packets import _context -from _framework.base.packets import _emission -from _framework.base.packets import _expiration -from _framework.base.packets import _ingestion -from _framework.base.packets import _interfaces # pylint: disable=unused-import -from _framework.base.packets import _reception -from _framework.base.packets import _termination -from _framework.base.packets import _transmission -from _framework.base.packets import interfaces -from _framework.base.packets import packets # pylint: disable=unused-import -from _framework.foundation import callable_util +from grpc.framework.base import interfaces as base_interfaces +from grpc.framework.base.packets import _cancellation +from grpc.framework.base.packets import _context +from grpc.framework.base.packets import _emission +from grpc.framework.base.packets import _expiration +from grpc.framework.base.packets import _ingestion +from grpc.framework.base.packets import _interfaces # pylint: disable=unused-import +from grpc.framework.base.packets import _reception +from grpc.framework.base.packets import _termination +from grpc.framework.base.packets import _transmission +from grpc.framework.base.packets import interfaces +from grpc.framework.base.packets import packets # pylint: disable=unused-import +from grpc.framework.foundation import callable_util _IDLE_ACTION_EXCEPTION_LOG_MESSAGE = 'Exception calling idle action!' diff --git a/src/python/src/_framework/base/packets/_expiration.py b/src/python/src/grpc/framework/base/packets/_expiration.py similarity index 97% rename from src/python/src/_framework/base/packets/_expiration.py rename to src/python/src/grpc/framework/base/packets/_expiration.py index 772e15f08c8..f58db28aa25 100644 --- a/src/python/src/_framework/base/packets/_expiration.py +++ b/src/python/src/grpc/framework/base/packets/_expiration.py @@ -31,9 +31,9 @@ import time -from _framework.base.packets import _interfaces -from _framework.base.packets import packets -from _framework.foundation import later +from grpc.framework.base.packets import _interfaces +from grpc.framework.base.packets import packets +from grpc.framework.foundation import later class _ExpirationManager(_interfaces.ExpirationManager): diff --git a/src/python/src/_framework/base/packets/_ingestion.py b/src/python/src/grpc/framework/base/packets/_ingestion.py similarity index 97% rename from src/python/src/_framework/base/packets/_ingestion.py rename to src/python/src/grpc/framework/base/packets/_ingestion.py index 91f5a35359f..a750195ccba 100644 --- a/src/python/src/_framework/base/packets/_ingestion.py +++ b/src/python/src/grpc/framework/base/packets/_ingestion.py @@ -32,14 +32,14 @@ import abc import collections -from _framework.base import exceptions -from _framework.base import interfaces -from _framework.base.packets import _constants -from _framework.base.packets import _interfaces -from _framework.base.packets import packets -from _framework.foundation import abandonment -from _framework.foundation import callable_util -from _framework.foundation import stream +from grpc.framework.base import exceptions +from grpc.framework.base import interfaces +from grpc.framework.base.packets import _constants +from grpc.framework.base.packets import _interfaces +from grpc.framework.base.packets import packets +from grpc.framework.foundation import abandonment +from grpc.framework.foundation import callable_util +from grpc.framework.foundation import stream _CREATE_CONSUMER_EXCEPTION_LOG_MESSAGE = 'Exception initializing ingestion!' _CONSUME_EXCEPTION_LOG_MESSAGE = 'Exception during ingestion!' diff --git a/src/python/src/_framework/base/packets/_interfaces.py b/src/python/src/grpc/framework/base/packets/_interfaces.py similarity index 97% rename from src/python/src/_framework/base/packets/_interfaces.py rename to src/python/src/grpc/framework/base/packets/_interfaces.py index d1bda95bf74..70d95723910 100644 --- a/src/python/src/_framework/base/packets/_interfaces.py +++ b/src/python/src/grpc/framework/base/packets/_interfaces.py @@ -32,9 +32,9 @@ import abc # base_interfaces and packets are referenced from specification in this module. -from _framework.base import interfaces as base_interfaces # pylint: disable=unused-import -from _framework.base.packets import packets # pylint: disable=unused-import -from _framework.foundation import stream +from grpc.framework.base import interfaces as base_interfaces # pylint: disable=unused-import +from grpc.framework.base.packets import packets # pylint: disable=unused-import +from grpc.framework.foundation import stream class TerminationManager(object): diff --git a/src/python/src/_framework/base/packets/_reception.py b/src/python/src/grpc/framework/base/packets/_reception.py similarity index 99% rename from src/python/src/_framework/base/packets/_reception.py rename to src/python/src/grpc/framework/base/packets/_reception.py index a2a3823d28c..6e2c9c0a4e7 100644 --- a/src/python/src/_framework/base/packets/_reception.py +++ b/src/python/src/grpc/framework/base/packets/_reception.py @@ -31,8 +31,8 @@ import abc -from _framework.base.packets import _interfaces -from _framework.base.packets import packets +from grpc.framework.base.packets import _interfaces +from grpc.framework.base.packets import packets class _Receiver(object): diff --git a/src/python/src/_framework/base/packets/_termination.py b/src/python/src/grpc/framework/base/packets/_termination.py similarity index 97% rename from src/python/src/_framework/base/packets/_termination.py rename to src/python/src/grpc/framework/base/packets/_termination.py index ae3ba1c16f3..5c10da7aa8c 100644 --- a/src/python/src/_framework/base/packets/_termination.py +++ b/src/python/src/grpc/framework/base/packets/_termination.py @@ -31,11 +31,11 @@ import enum -from _framework.base import interfaces -from _framework.base.packets import _constants -from _framework.base.packets import _interfaces -from _framework.base.packets import packets -from _framework.foundation import callable_util +from grpc.framework.base import interfaces +from grpc.framework.base.packets import _constants +from grpc.framework.base.packets import _interfaces +from grpc.framework.base.packets import packets +from grpc.framework.foundation import callable_util _CALLBACK_EXCEPTION_LOG_MESSAGE = 'Exception calling termination callback!' diff --git a/src/python/src/_framework/base/packets/_transmission.py b/src/python/src/grpc/framework/base/packets/_transmission.py similarity index 98% rename from src/python/src/_framework/base/packets/_transmission.py rename to src/python/src/grpc/framework/base/packets/_transmission.py index 24fe6e6164f..ac7f4509db9 100644 --- a/src/python/src/_framework/base/packets/_transmission.py +++ b/src/python/src/grpc/framework/base/packets/_transmission.py @@ -31,11 +31,11 @@ import abc -from _framework.base import interfaces -from _framework.base.packets import _constants -from _framework.base.packets import _interfaces -from _framework.base.packets import packets -from _framework.foundation import callable_util +from grpc.framework.base import interfaces +from grpc.framework.base.packets import _constants +from grpc.framework.base.packets import _interfaces +from grpc.framework.base.packets import packets +from grpc.framework.foundation import callable_util _TRANSMISSION_EXCEPTION_LOG_MESSAGE = 'Exception during transmission!' diff --git a/src/python/src/_framework/base/packets/implementations.py b/src/python/src/grpc/framework/base/packets/implementations.py similarity index 96% rename from src/python/src/_framework/base/packets/implementations.py rename to src/python/src/grpc/framework/base/packets/implementations.py index 2f07054d4d2..28688bcc0f9 100644 --- a/src/python/src/_framework/base/packets/implementations.py +++ b/src/python/src/grpc/framework/base/packets/implementations.py @@ -30,8 +30,8 @@ """Entry points into the packet-exchange-based implementation the base layer.""" # interfaces is referenced from specification in this module. -from _framework.base.packets import _ends -from _framework.base.packets import interfaces # pylint: disable=unused-import +from grpc.framework.base.packets import _ends +from grpc.framework.base.packets import interfaces # pylint: disable=unused-import def front(work_pool, transmission_pool, utility_pool): diff --git a/src/python/src/_framework/base/packets/implementations_test.py b/src/python/src/grpc/framework/base/packets/implementations_test.py similarity index 94% rename from src/python/src/_framework/base/packets/implementations_test.py rename to src/python/src/grpc/framework/base/packets/implementations_test.py index 8bb53531760..628f4b39094 100644 --- a/src/python/src/_framework/base/packets/implementations_test.py +++ b/src/python/src/grpc/framework/base/packets/implementations_test.py @@ -31,10 +31,10 @@ import unittest -from _framework.base import interfaces_test -from _framework.base import util -from _framework.base.packets import implementations -from _framework.foundation import logging_pool +from grpc.framework.base import interfaces_test +from grpc.framework.base import util +from grpc.framework.base.packets import implementations +from grpc.framework.foundation import logging_pool POOL_MAX_WORKERS = 100 DEFAULT_TIMEOUT = 30 diff --git a/src/python/src/_framework/base/packets/in_memory.py b/src/python/src/grpc/framework/base/packets/in_memory.py similarity index 96% rename from src/python/src/_framework/base/packets/in_memory.py rename to src/python/src/grpc/framework/base/packets/in_memory.py index 17daf3acf7b..453fd3b38aa 100644 --- a/src/python/src/_framework/base/packets/in_memory.py +++ b/src/python/src/grpc/framework/base/packets/in_memory.py @@ -31,9 +31,9 @@ import threading -from _framework.base.packets import _constants -from _framework.base.packets import interfaces -from _framework.foundation import callable_util +from grpc.framework.base.packets import _constants +from grpc.framework.base.packets import interfaces +from grpc.framework.foundation import callable_util class _Serializer(object): diff --git a/src/python/src/_framework/base/packets/interfaces.py b/src/python/src/grpc/framework/base/packets/interfaces.py similarity index 96% rename from src/python/src/_framework/base/packets/interfaces.py rename to src/python/src/grpc/framework/base/packets/interfaces.py index 99f9e877726..7c48956ba59 100644 --- a/src/python/src/_framework/base/packets/interfaces.py +++ b/src/python/src/grpc/framework/base/packets/interfaces.py @@ -32,8 +32,8 @@ import abc # packets is referenced from specifications in this module. -from _framework.base import interfaces -from _framework.base.packets import packets # pylint: disable=unused-import +from grpc.framework.base import interfaces +from grpc.framework.base.packets import packets # pylint: disable=unused-import class ForeLink(object): diff --git a/src/python/src/_framework/base/packets/null.py b/src/python/src/grpc/framework/base/packets/null.py similarity index 97% rename from src/python/src/_framework/base/packets/null.py rename to src/python/src/grpc/framework/base/packets/null.py index 9b40a005052..5a2121243bf 100644 --- a/src/python/src/_framework/base/packets/null.py +++ b/src/python/src/grpc/framework/base/packets/null.py @@ -29,7 +29,7 @@ """Null links that ignore tickets passed to them.""" -from _framework.base.packets import interfaces +from grpc.framework.base.packets import interfaces class _NullForeLink(interfaces.ForeLink): diff --git a/src/python/src/_framework/base/packets/packets.py b/src/python/src/grpc/framework/base/packets/packets.py similarity index 98% rename from src/python/src/_framework/base/packets/packets.py rename to src/python/src/grpc/framework/base/packets/packets.py index f7503bdcd65..9e2d4080b8c 100644 --- a/src/python/src/_framework/base/packets/packets.py +++ b/src/python/src/grpc/framework/base/packets/packets.py @@ -33,7 +33,7 @@ import collections import enum # interfaces is referenced from specifications in this module. -from _framework.base import interfaces # pylint: disable=unused-import +from grpc.framework.base import interfaces # pylint: disable=unused-import @enum.unique diff --git a/src/python/src/_framework/base/util.py b/src/python/src/grpc/framework/base/util.py similarity index 98% rename from src/python/src/_framework/base/util.py rename to src/python/src/grpc/framework/base/util.py index 35ce0443fcb..c832c826cfd 100644 --- a/src/python/src/_framework/base/util.py +++ b/src/python/src/grpc/framework/base/util.py @@ -32,7 +32,7 @@ import collections import threading -from _framework.base import interfaces +from grpc.framework.base import interfaces class _ServicedSubscription( diff --git a/src/python/src/_framework/face/testing/__init__.py b/src/python/src/grpc/framework/common/__init__.py similarity index 100% rename from src/python/src/_framework/face/testing/__init__.py rename to src/python/src/grpc/framework/common/__init__.py diff --git a/src/python/src/_framework/common/cardinality.py b/src/python/src/grpc/framework/common/cardinality.py similarity index 100% rename from src/python/src/_framework/common/cardinality.py rename to src/python/src/grpc/framework/common/cardinality.py diff --git a/src/python/src/_framework/foundation/__init__.py b/src/python/src/grpc/framework/face/__init__.py similarity index 100% rename from src/python/src/_framework/foundation/__init__.py rename to src/python/src/grpc/framework/face/__init__.py diff --git a/src/python/src/_framework/face/_calls.py b/src/python/src/grpc/framework/face/_calls.py similarity index 98% rename from src/python/src/_framework/face/_calls.py rename to src/python/src/grpc/framework/face/_calls.py index a7d8be5e432..75a550e3c7d 100644 --- a/src/python/src/_framework/face/_calls.py +++ b/src/python/src/grpc/framework/face/_calls.py @@ -32,12 +32,12 @@ import sys import threading -from _framework.base import interfaces as base_interfaces -from _framework.base import util as base_util -from _framework.face import _control -from _framework.face import interfaces -from _framework.foundation import callable_util -from _framework.foundation import future +from grpc.framework.base import interfaces as base_interfaces +from grpc.framework.base import util as base_util +from grpc.framework.face import _control +from grpc.framework.face import interfaces +from grpc.framework.foundation import callable_util +from grpc.framework.foundation import future _ITERATOR_EXCEPTION_LOG_MESSAGE = 'Exception iterating over requests!' _DONE_CALLBACK_LOG_MESSAGE = 'Exception calling Future "done" callback!' diff --git a/src/python/src/_framework/face/_control.py b/src/python/src/grpc/framework/face/_control.py similarity index 96% rename from src/python/src/_framework/face/_control.py rename to src/python/src/grpc/framework/face/_control.py index 9f1bf6d5fdb..e918907b749 100644 --- a/src/python/src/_framework/face/_control.py +++ b/src/python/src/grpc/framework/face/_control.py @@ -31,11 +31,11 @@ import threading -from _framework.base import interfaces as base_interfaces -from _framework.face import exceptions -from _framework.face import interfaces -from _framework.foundation import abandonment -from _framework.foundation import stream +from grpc.framework.base import interfaces as base_interfaces +from grpc.framework.face import exceptions +from grpc.framework.face import interfaces +from grpc.framework.foundation import abandonment +from grpc.framework.foundation import stream INTERNAL_ERROR_LOG_MESSAGE = ':-( RPC Framework (Face) Internal Error! :-(' diff --git a/src/python/src/_framework/face/_service.py b/src/python/src/grpc/framework/face/_service.py similarity index 93% rename from src/python/src/_framework/face/_service.py rename to src/python/src/grpc/framework/face/_service.py index d758c2f1480..26bde129687 100644 --- a/src/python/src/_framework/face/_service.py +++ b/src/python/src/grpc/framework/face/_service.py @@ -31,14 +31,14 @@ # base_interfaces and interfaces are referenced from specification in this # module. -from _framework.base import interfaces as base_interfaces # pylint: disable=unused-import -from _framework.face import _control -from _framework.face import exceptions -from _framework.face import interfaces # pylint: disable=unused-import -from _framework.foundation import abandonment -from _framework.foundation import callable_util -from _framework.foundation import stream -from _framework.foundation import stream_util +from grpc.framework.base import interfaces as base_interfaces # pylint: disable=unused-import +from grpc.framework.face import _control +from grpc.framework.face import exceptions +from grpc.framework.face import interfaces # pylint: disable=unused-import +from grpc.framework.foundation import abandonment +from grpc.framework.foundation import callable_util +from grpc.framework.foundation import stream +from grpc.framework.foundation import stream_util class _ValueInStreamOutConsumer(stream.Consumer): diff --git a/src/python/src/_framework/face/_test_case.py b/src/python/src/grpc/framework/face/_test_case.py similarity index 94% rename from src/python/src/_framework/face/_test_case.py rename to src/python/src/grpc/framework/face/_test_case.py index 50b55c389f3..a4e17c464ce 100644 --- a/src/python/src/_framework/face/_test_case.py +++ b/src/python/src/grpc/framework/face/_test_case.py @@ -29,10 +29,10 @@ """Common lifecycle code for in-memory-ticket-exchange Face-layer tests.""" -from _framework.face import implementations -from _framework.face.testing import base_util -from _framework.face.testing import test_case -from _framework.foundation import logging_pool +from grpc.framework.face import implementations +from grpc.framework.face.testing import base_util +from grpc.framework.face.testing import test_case +from grpc.framework.foundation import logging_pool _TIMEOUT = 3 _MAXIMUM_POOL_SIZE = 100 diff --git a/src/python/src/_framework/face/blocking_invocation_inline_service_test.py b/src/python/src/grpc/framework/face/blocking_invocation_inline_service_test.py similarity index 92% rename from src/python/src/_framework/face/blocking_invocation_inline_service_test.py rename to src/python/src/grpc/framework/face/blocking_invocation_inline_service_test.py index 96563c94eeb..636cd701ff1 100644 --- a/src/python/src/_framework/face/blocking_invocation_inline_service_test.py +++ b/src/python/src/grpc/framework/face/blocking_invocation_inline_service_test.py @@ -31,8 +31,8 @@ import unittest -from _framework.face import _test_case -from _framework.face.testing import blocking_invocation_inline_service_test_case as test_case +from grpc.framework.face import _test_case +from grpc.framework.face.testing import blocking_invocation_inline_service_test_case as test_case class BlockingInvocationInlineServiceTest( diff --git a/src/python/src/_framework/face/demonstration.py b/src/python/src/grpc/framework/face/demonstration.py similarity index 95% rename from src/python/src/_framework/face/demonstration.py rename to src/python/src/grpc/framework/face/demonstration.py index 501ec6b3f83..d922f6e5ef0 100644 --- a/src/python/src/_framework/face/demonstration.py +++ b/src/python/src/grpc/framework/face/demonstration.py @@ -29,10 +29,10 @@ """Demonstration-suitable implementation of the face layer of RPC Framework.""" -from _framework.base import util as _base_util -from _framework.base.packets import implementations as _tickets_implementations -from _framework.face import implementations -from _framework.foundation import logging_pool +from grpc.framework.base import util as _base_util +from grpc.framework.base.packets import implementations as _tickets_implementations +from grpc.framework.face import implementations +from grpc.framework.foundation import logging_pool _POOL_SIZE_LIMIT = 20 diff --git a/src/python/src/_framework/face/event_invocation_synchronous_event_service_test.py b/src/python/src/grpc/framework/face/event_invocation_synchronous_event_service_test.py similarity index 92% rename from src/python/src/_framework/face/event_invocation_synchronous_event_service_test.py rename to src/python/src/grpc/framework/face/event_invocation_synchronous_event_service_test.py index 48e05b2478e..25f3e297b5c 100644 --- a/src/python/src/_framework/face/event_invocation_synchronous_event_service_test.py +++ b/src/python/src/grpc/framework/face/event_invocation_synchronous_event_service_test.py @@ -31,8 +31,8 @@ import unittest -from _framework.face import _test_case -from _framework.face.testing import event_invocation_synchronous_event_service_test_case as test_case +from grpc.framework.face import _test_case +from grpc.framework.face.testing import event_invocation_synchronous_event_service_test_case as test_case class EventInvocationSynchronousEventServiceTest( diff --git a/src/python/src/_framework/face/exceptions.py b/src/python/src/grpc/framework/face/exceptions.py similarity index 100% rename from src/python/src/_framework/face/exceptions.py rename to src/python/src/grpc/framework/face/exceptions.py diff --git a/src/python/src/_framework/face/future_invocation_asynchronous_event_service_test.py b/src/python/src/grpc/framework/face/future_invocation_asynchronous_event_service_test.py similarity index 92% rename from src/python/src/_framework/face/future_invocation_asynchronous_event_service_test.py rename to src/python/src/grpc/framework/face/future_invocation_asynchronous_event_service_test.py index 96f5fe85d3d..38229ea9f4a 100644 --- a/src/python/src/_framework/face/future_invocation_asynchronous_event_service_test.py +++ b/src/python/src/grpc/framework/face/future_invocation_asynchronous_event_service_test.py @@ -31,8 +31,8 @@ import unittest -from _framework.face import _test_case -from _framework.face.testing import future_invocation_asynchronous_event_service_test_case as test_case +from grpc.framework.face import _test_case +from grpc.framework.face.testing import future_invocation_asynchronous_event_service_test_case as test_case class FutureInvocationAsynchronousEventServiceTest( diff --git a/src/python/src/_framework/face/implementations.py b/src/python/src/grpc/framework/face/implementations.py similarity index 96% rename from src/python/src/_framework/face/implementations.py rename to src/python/src/grpc/framework/face/implementations.py index 94362e20071..c499b907207 100644 --- a/src/python/src/_framework/face/implementations.py +++ b/src/python/src/grpc/framework/face/implementations.py @@ -29,12 +29,12 @@ """Entry points into the Face layer of RPC Framework.""" -from _framework.base import exceptions as _base_exceptions -from _framework.base import interfaces as base_interfaces -from _framework.face import _calls -from _framework.face import _service -from _framework.face import exceptions -from _framework.face import interfaces +from grpc.framework.base import exceptions as _base_exceptions +from grpc.framework.base import interfaces as base_interfaces +from grpc.framework.face import _calls +from grpc.framework.face import _service +from grpc.framework.face import exceptions +from grpc.framework.face import interfaces class _BaseServicer(base_interfaces.Servicer): diff --git a/src/python/src/_framework/face/interfaces.py b/src/python/src/grpc/framework/face/interfaces.py similarity index 98% rename from src/python/src/_framework/face/interfaces.py rename to src/python/src/grpc/framework/face/interfaces.py index 24804543694..548e9ce4dbe 100644 --- a/src/python/src/_framework/face/interfaces.py +++ b/src/python/src/grpc/framework/face/interfaces.py @@ -34,9 +34,9 @@ import enum # exceptions, abandonment, and future are referenced from specification in this # module. -from _framework.face import exceptions # pylint: disable=unused-import -from _framework.foundation import abandonment # pylint: disable=unused-import -from _framework.foundation import future # pylint: disable=unused-import +from grpc.framework.face import exceptions # pylint: disable=unused-import +from grpc.framework.foundation import abandonment # pylint: disable=unused-import +from grpc.framework.foundation import future # pylint: disable=unused-import class CancellableIterator(object): diff --git a/src/python/src/_junkdrawer/__init__.py b/src/python/src/grpc/framework/face/testing/__init__.py similarity index 100% rename from src/python/src/_junkdrawer/__init__.py rename to src/python/src/grpc/framework/face/testing/__init__.py diff --git a/src/python/src/_framework/face/testing/base_util.py b/src/python/src/grpc/framework/face/testing/base_util.py similarity index 92% rename from src/python/src/_framework/face/testing/base_util.py rename to src/python/src/grpc/framework/face/testing/base_util.py index d9ccb3af8fc..7872a6b9e94 100644 --- a/src/python/src/_framework/face/testing/base_util.py +++ b/src/python/src/grpc/framework/face/testing/base_util.py @@ -32,11 +32,11 @@ import abc # interfaces is referenced from specification in this module. -from _framework.base import util as _base_util -from _framework.base.packets import implementations -from _framework.base.packets import in_memory -from _framework.base.packets import interfaces # pylint: disable=unused-import -from _framework.foundation import logging_pool +from grpc.framework.base import util as _base_util +from grpc.framework.base.packets import implementations +from grpc.framework.base.packets import in_memory +from grpc.framework.base.packets import interfaces # pylint: disable=unused-import +from grpc.framework.foundation import logging_pool _POOL_SIZE_LIMIT = 20 diff --git a/src/python/src/_framework/face/testing/blocking_invocation_inline_service_test_case.py b/src/python/src/grpc/framework/face/testing/blocking_invocation_inline_service_test_case.py similarity index 96% rename from src/python/src/_framework/face/testing/blocking_invocation_inline_service_test_case.py rename to src/python/src/grpc/framework/face/testing/blocking_invocation_inline_service_test_case.py index 0b1a2f0bd21..993098f4ae5 100644 --- a/src/python/src/_framework/face/testing/blocking_invocation_inline_service_test_case.py +++ b/src/python/src/grpc/framework/face/testing/blocking_invocation_inline_service_test_case.py @@ -33,12 +33,12 @@ import abc import unittest # pylint: disable=unused-import -from _framework.face import exceptions -from _framework.face.testing import control -from _framework.face.testing import coverage -from _framework.face.testing import digest -from _framework.face.testing import stock_service -from _framework.face.testing import test_case +from grpc.framework.face import exceptions +from grpc.framework.face.testing import control +from grpc.framework.face.testing import coverage +from grpc.framework.face.testing import digest +from grpc.framework.face.testing import stock_service +from grpc.framework.face.testing import test_case _TIMEOUT = 3 diff --git a/src/python/src/_framework/face/testing/callback.py b/src/python/src/grpc/framework/face/testing/callback.py similarity index 98% rename from src/python/src/_framework/face/testing/callback.py rename to src/python/src/grpc/framework/face/testing/callback.py index 7a20869abe9..d0e63c8c562 100644 --- a/src/python/src/_framework/face/testing/callback.py +++ b/src/python/src/grpc/framework/face/testing/callback.py @@ -31,7 +31,7 @@ import threading -from _framework.foundation import stream +from grpc.framework.foundation import stream class Callback(stream.Consumer): diff --git a/src/python/src/_framework/face/testing/control.py b/src/python/src/grpc/framework/face/testing/control.py similarity index 100% rename from src/python/src/_framework/face/testing/control.py rename to src/python/src/grpc/framework/face/testing/control.py diff --git a/src/python/src/_framework/face/testing/coverage.py b/src/python/src/grpc/framework/face/testing/coverage.py similarity index 100% rename from src/python/src/_framework/face/testing/coverage.py rename to src/python/src/grpc/framework/face/testing/coverage.py diff --git a/src/python/src/_framework/face/testing/digest.py b/src/python/src/grpc/framework/face/testing/digest.py similarity index 96% rename from src/python/src/_framework/face/testing/digest.py rename to src/python/src/grpc/framework/face/testing/digest.py index 8d1291c9755..b8fb5733013 100644 --- a/src/python/src/_framework/face/testing/digest.py +++ b/src/python/src/grpc/framework/face/testing/digest.py @@ -34,13 +34,13 @@ import threading # testing_control, interfaces, and testing_service are referenced from # specification in this module. -from _framework.face import exceptions -from _framework.face import interfaces as face_interfaces -from _framework.face.testing import control as testing_control # pylint: disable=unused-import -from _framework.face.testing import interfaces # pylint: disable=unused-import -from _framework.face.testing import service as testing_service # pylint: disable=unused-import -from _framework.foundation import stream -from _framework.foundation import stream_util +from grpc.framework.face import exceptions +from grpc.framework.face import interfaces as face_interfaces +from grpc.framework.face.testing import control as testing_control # pylint: disable=unused-import +from grpc.framework.face.testing import interfaces # pylint: disable=unused-import +from grpc.framework.face.testing import service as testing_service # pylint: disable=unused-import +from grpc.framework.foundation import stream +from grpc.framework.foundation import stream_util _IDENTITY = lambda x: x diff --git a/src/python/src/_framework/face/testing/event_invocation_synchronous_event_service_test_case.py b/src/python/src/grpc/framework/face/testing/event_invocation_synchronous_event_service_test_case.py similarity index 97% rename from src/python/src/_framework/face/testing/event_invocation_synchronous_event_service_test_case.py rename to src/python/src/grpc/framework/face/testing/event_invocation_synchronous_event_service_test_case.py index cb786f500c0..21e669b9080 100644 --- a/src/python/src/_framework/face/testing/event_invocation_synchronous_event_service_test_case.py +++ b/src/python/src/grpc/framework/face/testing/event_invocation_synchronous_event_service_test_case.py @@ -32,13 +32,13 @@ import abc import unittest -from _framework.face import interfaces -from _framework.face.testing import callback as testing_callback -from _framework.face.testing import control -from _framework.face.testing import coverage -from _framework.face.testing import digest -from _framework.face.testing import stock_service -from _framework.face.testing import test_case +from grpc.framework.face import interfaces +from grpc.framework.face.testing import callback as testing_callback +from grpc.framework.face.testing import control +from grpc.framework.face.testing import coverage +from grpc.framework.face.testing import digest +from grpc.framework.face.testing import stock_service +from grpc.framework.face.testing import test_case _TIMEOUT = 3 diff --git a/src/python/src/_framework/face/testing/future_invocation_asynchronous_event_service_test_case.py b/src/python/src/grpc/framework/face/testing/future_invocation_asynchronous_event_service_test_case.py similarity index 97% rename from src/python/src/_framework/face/testing/future_invocation_asynchronous_event_service_test_case.py rename to src/python/src/grpc/framework/face/testing/future_invocation_asynchronous_event_service_test_case.py index 939b238b66e..42db3050e1f 100644 --- a/src/python/src/_framework/face/testing/future_invocation_asynchronous_event_service_test_case.py +++ b/src/python/src/grpc/framework/face/testing/future_invocation_asynchronous_event_service_test_case.py @@ -34,14 +34,14 @@ import contextlib import threading import unittest -from _framework.face import exceptions -from _framework.face.testing import control -from _framework.face.testing import coverage -from _framework.face.testing import digest -from _framework.face.testing import stock_service -from _framework.face.testing import test_case -from _framework.foundation import future -from _framework.foundation import logging_pool +from grpc.framework.face import exceptions +from grpc.framework.face.testing import control +from grpc.framework.face.testing import coverage +from grpc.framework.face.testing import digest +from grpc.framework.face.testing import stock_service +from grpc.framework.face.testing import test_case +from grpc.framework.foundation import future +from grpc.framework.foundation import logging_pool _TIMEOUT = 3 _MAXIMUM_POOL_SIZE = 100 diff --git a/src/python/src/_framework/face/testing/interfaces.py b/src/python/src/grpc/framework/face/testing/interfaces.py similarity index 97% rename from src/python/src/_framework/face/testing/interfaces.py rename to src/python/src/grpc/framework/face/testing/interfaces.py index 253f6f118df..5932dabf1eb 100644 --- a/src/python/src/_framework/face/testing/interfaces.py +++ b/src/python/src/grpc/framework/face/testing/interfaces.py @@ -32,7 +32,7 @@ import abc # cardinality is referenced from specification in this module. -from _framework.common import cardinality # pylint: disable=unused-import +from grpc.framework.common import cardinality # pylint: disable=unused-import class Method(object): diff --git a/src/python/src/_framework/face/testing/serial.py b/src/python/src/grpc/framework/face/testing/serial.py similarity index 100% rename from src/python/src/_framework/face/testing/serial.py rename to src/python/src/grpc/framework/face/testing/serial.py diff --git a/src/python/src/_framework/face/testing/service.py b/src/python/src/grpc/framework/face/testing/service.py similarity index 98% rename from src/python/src/_framework/face/testing/service.py rename to src/python/src/grpc/framework/face/testing/service.py index 771346ec2e1..a58e2ee42e4 100644 --- a/src/python/src/_framework/face/testing/service.py +++ b/src/python/src/grpc/framework/face/testing/service.py @@ -32,8 +32,8 @@ import abc # interfaces is referenced from specification in this module. -from _framework.face import interfaces as face_interfaces # pylint: disable=unused-import -from _framework.face.testing import interfaces +from grpc.framework.face import interfaces as face_interfaces # pylint: disable=unused-import +from grpc.framework.face.testing import interfaces class UnaryUnaryTestMethod(interfaces.Method): diff --git a/src/python/src/_framework/face/testing/stock_service.py b/src/python/src/grpc/framework/face/testing/stock_service.py similarity index 97% rename from src/python/src/_framework/face/testing/stock_service.py rename to src/python/src/grpc/framework/face/testing/stock_service.py index bd82877e838..83c9418b074 100644 --- a/src/python/src/_framework/face/testing/stock_service.py +++ b/src/python/src/grpc/framework/face/testing/stock_service.py @@ -29,12 +29,12 @@ """Examples of Python implementations of the stock.proto Stock service.""" -from _framework.common import cardinality -from _framework.face.testing import service -from _framework.foundation import abandonment -from _framework.foundation import stream -from _framework.foundation import stream_util -from _junkdrawer import stock_pb2 +from grpc.framework.common import cardinality +from grpc.framework.face.testing import service +from grpc.framework.foundation import abandonment +from grpc.framework.foundation import stream +from grpc.framework.foundation import stream_util +from grpc._junkdrawer import stock_pb2 SYMBOL_FORMAT = 'test symbol:%03d' STREAM_LENGTH = 400 diff --git a/src/python/src/_framework/face/testing/test_case.py b/src/python/src/grpc/framework/face/testing/test_case.py similarity index 96% rename from src/python/src/_framework/face/testing/test_case.py rename to src/python/src/grpc/framework/face/testing/test_case.py index 09b5a67f5ad..218a2a8549b 100644 --- a/src/python/src/_framework/face/testing/test_case.py +++ b/src/python/src/grpc/framework/face/testing/test_case.py @@ -32,8 +32,8 @@ import abc # face_interfaces and interfaces are referenced in specification in this module. -from _framework.face import interfaces as face_interfaces # pylint: disable=unused-import -from _framework.face.testing import interfaces # pylint: disable=unused-import +from grpc.framework.face import interfaces as face_interfaces # pylint: disable=unused-import +from grpc.framework.face.testing import interfaces # pylint: disable=unused-import class FaceTestCase(object): diff --git a/src/python/src/grpc_early_adopter/__init__.py b/src/python/src/grpc/framework/foundation/__init__.py similarity index 100% rename from src/python/src/grpc_early_adopter/__init__.py rename to src/python/src/grpc/framework/foundation/__init__.py diff --git a/src/python/src/_framework/foundation/_later_test.py b/src/python/src/grpc/framework/foundation/_later_test.py similarity index 99% rename from src/python/src/_framework/foundation/_later_test.py rename to src/python/src/grpc/framework/foundation/_later_test.py index 50b67907db4..e83e7031289 100644 --- a/src/python/src/_framework/foundation/_later_test.py +++ b/src/python/src/grpc/framework/foundation/_later_test.py @@ -33,7 +33,7 @@ import threading import time import unittest -from _framework.foundation import later +from grpc.framework.foundation import later TICK = 0.1 diff --git a/src/python/src/_framework/foundation/_logging_pool_test.py b/src/python/src/grpc/framework/foundation/_logging_pool_test.py similarity index 97% rename from src/python/src/_framework/foundation/_logging_pool_test.py rename to src/python/src/grpc/framework/foundation/_logging_pool_test.py index f2224d80e5c..11463a8bece 100644 --- a/src/python/src/_framework/foundation/_logging_pool_test.py +++ b/src/python/src/grpc/framework/foundation/_logging_pool_test.py @@ -31,7 +31,7 @@ import unittest -from _framework.foundation import logging_pool +from grpc.framework.foundation import logging_pool _POOL_SIZE = 16 diff --git a/src/python/src/_framework/foundation/_timer_future.py b/src/python/src/grpc/framework/foundation/_timer_future.py similarity index 99% rename from src/python/src/_framework/foundation/_timer_future.py rename to src/python/src/grpc/framework/foundation/_timer_future.py index 4aa66991c5e..2c9996aa9db 100644 --- a/src/python/src/_framework/foundation/_timer_future.py +++ b/src/python/src/grpc/framework/foundation/_timer_future.py @@ -33,7 +33,7 @@ import sys import threading import time -from _framework.foundation import future +from grpc.framework.foundation import future class TimerFuture(future.Future): diff --git a/src/python/src/_framework/foundation/abandonment.py b/src/python/src/grpc/framework/foundation/abandonment.py similarity index 100% rename from src/python/src/_framework/foundation/abandonment.py rename to src/python/src/grpc/framework/foundation/abandonment.py diff --git a/src/python/src/_framework/foundation/callable_util.py b/src/python/src/grpc/framework/foundation/callable_util.py similarity index 100% rename from src/python/src/_framework/foundation/callable_util.py rename to src/python/src/grpc/framework/foundation/callable_util.py diff --git a/src/python/src/_framework/foundation/future.py b/src/python/src/grpc/framework/foundation/future.py similarity index 100% rename from src/python/src/_framework/foundation/future.py rename to src/python/src/grpc/framework/foundation/future.py diff --git a/src/python/src/_framework/foundation/later.py b/src/python/src/grpc/framework/foundation/later.py similarity index 97% rename from src/python/src/_framework/foundation/later.py rename to src/python/src/grpc/framework/foundation/later.py index fc2cf578d0b..1d1e0650413 100644 --- a/src/python/src/_framework/foundation/later.py +++ b/src/python/src/grpc/framework/foundation/later.py @@ -31,7 +31,7 @@ import time -from _framework.foundation import _timer_future +from grpc.framework.foundation import _timer_future def later(delay, computation): diff --git a/src/python/src/_framework/foundation/logging_pool.py b/src/python/src/grpc/framework/foundation/logging_pool.py similarity index 100% rename from src/python/src/_framework/foundation/logging_pool.py rename to src/python/src/grpc/framework/foundation/logging_pool.py diff --git a/src/python/src/_framework/foundation/stream.py b/src/python/src/grpc/framework/foundation/stream.py similarity index 100% rename from src/python/src/_framework/foundation/stream.py rename to src/python/src/grpc/framework/foundation/stream.py diff --git a/src/python/src/_framework/foundation/stream_testing.py b/src/python/src/grpc/framework/foundation/stream_testing.py similarity index 98% rename from src/python/src/_framework/foundation/stream_testing.py rename to src/python/src/grpc/framework/foundation/stream_testing.py index c1acedc5c6e..098a53d5e75 100644 --- a/src/python/src/_framework/foundation/stream_testing.py +++ b/src/python/src/grpc/framework/foundation/stream_testing.py @@ -29,7 +29,7 @@ """Utilities for testing stream-related code.""" -from _framework.foundation import stream +from grpc.framework.foundation import stream class TestConsumer(stream.Consumer): diff --git a/src/python/src/_framework/foundation/stream_util.py b/src/python/src/grpc/framework/foundation/stream_util.py similarity index 99% rename from src/python/src/_framework/foundation/stream_util.py rename to src/python/src/grpc/framework/foundation/stream_util.py index 3a9c0433169..2210e4efcf0 100644 --- a/src/python/src/_framework/foundation/stream_util.py +++ b/src/python/src/grpc/framework/foundation/stream_util.py @@ -32,7 +32,7 @@ import logging import threading -from _framework.foundation import stream +from grpc.framework.foundation import stream _NO_VALUE = object() diff --git a/src/python/src/setup.py b/src/python/src/setup.py index 93af4d68ca9..8e33ebb31c4 100644 --- a/src/python/src/setup.py +++ b/src/python/src/setup.py @@ -32,13 +32,13 @@ from distutils import core as _core _EXTENSION_SOURCES = ( - '_adapter/_c.c', - '_adapter/_call.c', - '_adapter/_channel.c', - '_adapter/_completion_queue.c', - '_adapter/_error.c', - '_adapter/_server.c', - '_adapter/_server_credentials.c', + 'grpc/_adapter/_c.c', + 'grpc/_adapter/_call.c', + 'grpc/_adapter/_channel.c', + 'grpc/_adapter/_completion_queue.c', + 'grpc/_adapter/_error.c', + 'grpc/_adapter/_server.c', + 'grpc/_adapter/_server_credentials.c', ) _EXTENSION_INCLUDE_DIRECTORIES = ( @@ -51,29 +51,31 @@ _EXTENSION_LIBRARIES = ( ) _EXTENSION_MODULE = _core.Extension( - '_adapter._c', sources=list(_EXTENSION_SOURCES), + 'grpc._adapter._c', sources=list(_EXTENSION_SOURCES), include_dirs=_EXTENSION_INCLUDE_DIRECTORIES, libraries=_EXTENSION_LIBRARIES, ) _PACKAGES=( - '_adapter', - '_framework', - '_framework.base', - '_framework.base.packets', - '_framework.common', - '_framework.face', - '_framework.face.testing', - '_framework.foundation', - '_junkdrawer', - 'grpc_early_adopter', + 'grpc', + 'grpc._adapter', + 'grpc._junkdrawer', + 'grpc.early_adopter', + 'grpc.framework', + 'grpc.framework.base', + 'grpc.framework.base.packets', + 'grpc.framework.common', + 'grpc.framework.face', + 'grpc.framework.face.testing', + 'grpc.framework.foundation', ) _PACKAGE_DIRECTORIES = { - '_adapter': '_adapter', - '_framework': '_framework', - '_junkdrawer': '_junkdrawer', - 'grpc_early_adopter': 'grpc_early_adopter', + 'grpc': 'grpc', + 'grpc._adapter': 'grpc/_adapter', + 'grpc._junkdrawer': 'grpc/_junkdrawer', + 'grpc.early_adopter': 'grpc/early_adopter', + 'grpc.framework': 'grpc/framework', } _core.setup( diff --git a/tools/dockerfile/grpc_python/Dockerfile b/tools/dockerfile/grpc_python/Dockerfile index 2390ed7bcfa..d434b473510 100644 --- a/tools/dockerfile/grpc_python/Dockerfile +++ b/tools/dockerfile/grpc_python/Dockerfile @@ -17,19 +17,19 @@ RUN cd /var/local/git/grpc \ # Run Python GRPC's tests RUN cd /var/local/git/grpc \ # TODO(nathaniel): It would be nice for these to be auto-discoverable? - && python2.7 -B -m _adapter._blocking_invocation_inline_service_test - && python2.7 -B -m _adapter._c_test - && python2.7 -B -m _adapter._event_invocation_synchronous_event_service_test - && python2.7 -B -m _adapter._future_invocation_asynchronous_event_service_test - && python2.7 -B -m _adapter._links_test - && python2.7 -B -m _adapter._lonely_rear_link_test - && python2.7 -B -m _adapter._low_test - && python2.7 -B -m _framework.base.packets.implementations_test - && python2.7 -B -m _framework.face.blocking_invocation_inline_service_test - && python2.7 -B -m _framework.face.event_invocation_synchronous_event_service_test - && python2.7 -B -m _framework.face.future_invocation_asynchronous_event_service_test - && python2.7 -B -m _framework.foundation._later_test - && python2.7 -B -m _framework.foundation._logging_pool_test + && python2.7 -B -m grpc._adapter._blocking_invocation_inline_service_test + && python2.7 -B -m grpc._adapter._c_test + && python2.7 -B -m grpc._adapter._event_invocation_synchronous_event_service_test + && python2.7 -B -m grpc._adapter._future_invocation_asynchronous_event_service_test + && python2.7 -B -m grpc._adapter._links_test + && python2.7 -B -m grpc._adapter._lonely_rear_link_test + && python2.7 -B -m grpc._adapter._low_test + && python2.7 -B -m grpc._framework.base.packets.implementations_test + && python2.7 -B -m grpc._framework.face.blocking_invocation_inline_service_test + && python2.7 -B -m grpc._framework.face.event_invocation_synchronous_event_service_test + && python2.7 -B -m grpc._framework.face.future_invocation_asynchronous_event_service_test + && python2.7 -B -m grpc._framework.foundation._later_test + && python2.7 -B -m grpc._framework.foundation._logging_pool_test # Add a cacerts directory containing the Google root pem file, allowing the interop client to access the production test instance ADD cacerts cacerts diff --git a/tools/run_tests/run_python.sh b/tools/run_tests/run_python.sh index 7d3ee73a0e4..b79278857f3 100755 --- a/tools/run_tests/run_python.sh +++ b/tools/run_tests/run_python.sh @@ -9,18 +9,18 @@ root=`pwd` export LD_LIBRARY_PATH=$root/libs/opt source python2.7_virtual_environment/bin/activate # TODO(issue 215): Properly itemize these in run_tests.py so that they can be parallelized. -python2.7 -B -m _adapter._blocking_invocation_inline_service_test -python2.7 -B -m _adapter._c_test -python2.7 -B -m _adapter._event_invocation_synchronous_event_service_test -python2.7 -B -m _adapter._future_invocation_asynchronous_event_service_test -python2.7 -B -m _adapter._links_test -python2.7 -B -m _adapter._lonely_rear_link_test -python2.7 -B -m _adapter._low_test -python2.7 -B -m _framework.base.packets.implementations_test -python2.7 -B -m _framework.face.blocking_invocation_inline_service_test -python2.7 -B -m _framework.face.event_invocation_synchronous_event_service_test -python2.7 -B -m _framework.face.future_invocation_asynchronous_event_service_test -python2.7 -B -m _framework.foundation._later_test -python2.7 -B -m _framework.foundation._logging_pool_test +python2.7 -B -m grpc._adapter._blocking_invocation_inline_service_test +python2.7 -B -m grpc._adapter._c_test +python2.7 -B -m grpc._adapter._event_invocation_synchronous_event_service_test +python2.7 -B -m grpc._adapter._future_invocation_asynchronous_event_service_test +python2.7 -B -m grpc._adapter._links_test +python2.7 -B -m grpc._adapter._lonely_rear_link_test +python2.7 -B -m grpc._adapter._low_test +python2.7 -B -m grpc.framework.base.packets.implementations_test +python2.7 -B -m grpc.framework.face.blocking_invocation_inline_service_test +python2.7 -B -m grpc.framework.face.event_invocation_synchronous_event_service_test +python2.7 -B -m grpc.framework.face.future_invocation_asynchronous_event_service_test +python2.7 -B -m grpc.framework.foundation._later_test +python2.7 -B -m grpc.framework.foundation._logging_pool_test # TODO(nathaniel): Get tests working under 3.4 (requires 3.X-friendly protobuf) # python3.4 -B -m unittest discover -s src/python -p '*.py' From 16b8924068c52eb20e0cfd3b1416c6eb720992c3 Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Wed, 18 Feb 2015 02:53:37 +0000 Subject: [PATCH 2/2] Drop an erroneous trailing backslash. --- tools/dockerfile/grpc_python_base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/dockerfile/grpc_python_base/Dockerfile b/tools/dockerfile/grpc_python_base/Dockerfile index 01292c2e121..98f695a8191 100644 --- a/tools/dockerfile/grpc_python_base/Dockerfile +++ b/tools/dockerfile/grpc_python_base/Dockerfile @@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y \ python-all-dev \ python3-all-dev \ python-pip \ - python-virtualenv \ + python-virtualenv # Install Python packages from PyPI RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.0.0-alpha-1