Un-namespace Python packages#9071
Conversation
|
(clarification: Parts 1+ℕ will be to reduce the impact on users of |
nathanielmanistaatgoogle
left a comment
There was a problem hiding this comment.
So... should this include a src/python/grpcio/grpc/tools.py, health.py, and reflection.py as suggested?
Content looks good but the commit message should be made serious. Sorry to quash fun.
Setuptools was updated and our hacky namespace-package-chickens came back to roost. This removes the unsupported namespace package hacks.
111c8e0 to
fb261bf
Compare
|
This shouldn't include those, I don't think. This should just green the build, and whatever parts we decide to paper-over the user-experience bumps can come after. |
|
And thus I eat my words; updated to paper over loss of namespaced packages. |
9d3b9de to
572bfdb
Compare
nathanielmanistaatgoogle
left a comment
There was a problem hiding this comment.
Today I learned that in prose Setuptools is styled with a majuscule first letter.
Thanks!
nathanielmanistaatgoogle
left a comment
There was a problem hiding this comment.
Mind if I ask for changes?
src/python/grpcio/grpc/__init__.py
Outdated
| from grpc._cython import cygrpc as _cygrpc | ||
|
|
||
|
|
||
| ############################### Extension Shims ################################ |
There was a problem hiding this comment.
Drop this; we don't really want to help readers navigate to this part of the code.
src/python/grpcio/grpc/__init__.py
Outdated
|
|
||
| ############################### Extension Shims ################################ | ||
|
|
||
| try: |
There was a problem hiding this comment.
Add a comment to the effect of "these are here to maintain compatibility; do not use!"?
src/python/grpcio/grpc/__init__.py
Outdated
| sys.modules.update({'grpc.tools': grpc_tools}) | ||
| except ImportError: | ||
| pass | ||
|
|
There was a problem hiding this comment.
Drop these blank lines; this is one code block.
src/python/grpcio/grpc/__init__.py
Outdated
|
|
||
| ############################### Extension Shims ################################ | ||
|
|
||
| try: |
There was a problem hiding this comment.
... and yeah, let's move these to the very end of the file.
572bfdb to
5bd335b
Compare
Uses dynamic loading to paper-over the negative effects of losing namespace packages in the previous commit.
5bd335b to
53f6d09
Compare
|
addressed sans stuff discussed offline |
…TEVE Backport of #9071
Part 1 of a fix to being horribly and utterly broken w/ the setuptools update that we'll eventually want to duplicate on
v1.0.x.This breaks everything but
grpcio.cc @ctiller
Failures: #8989, #9082