Skip to content

Fix the grpc.aio import hack and its unit test#24416

Merged
lidizheng merged 1 commit intogrpc:masterfrom
lidizheng:fix-aio-import
Oct 15, 2020
Merged

Fix the grpc.aio import hack and its unit test#24416
lidizheng merged 1 commit intogrpc:masterfrom
lidizheng:fix-aio-import

Conversation

@lidizheng
Copy link
Copy Markdown
Contributor

@lidizheng lidizheng commented Oct 15, 2020

I made a mistake in #24398. The grpc.aio fix isn't working after the roll back, because the __name__ of the __init__.py file of gRPC Python module is "grpc" instead of grpc.__init__. So, it won't load "aio" module under any setup by default.

The init_test wasn't testing direct import of "grpc.aio", because it takes a dependency on AioTestBase which does from grpc import aio. The module space is still polluted, so the test didn't caught the error.

Here is the cherry-pick for google3 (cl/335987017).

@lidizheng lidizheng added lang/Python release notes: no Indicates if PR should not be in release notes labels Oct 15, 2020
@lidizheng lidizheng marked this pull request as ready for review October 15, 2020 00:12
@lidizheng lidizheng requested a review from gnossen October 15, 2020 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lang/Python release notes: no Indicates if PR should not be in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants