Skip to content

Un-namespace Python packages#9071

Merged
soltanmm-google merged 2 commits intogrpc:masterfrom
soltanmm-google:taking-tradition-as-law-is-a-dangerous-idea
Dec 13, 2016
Merged

Un-namespace Python packages#9071
soltanmm-google merged 2 commits intogrpc:masterfrom
soltanmm-google:taking-tradition-as-law-is-a-dangerous-idea

Conversation

@soltanmm-google
Copy link
Copy Markdown
Contributor

@soltanmm-google soltanmm-google commented Dec 12, 2016

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

@soltanmm-google
Copy link
Copy Markdown
Contributor Author

(clarification: Parts 1+ℕ will be to reduce the impact on users of grpcio-* distributions)

Copy link
Copy Markdown
Contributor

@nathanielmanistaatgoogle nathanielmanistaatgoogle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@soltanmm-google soltanmm-google force-pushed the taking-tradition-as-law-is-a-dangerous-idea branch from 111c8e0 to fb261bf Compare December 12, 2016 23:05
@soltanmm-google
Copy link
Copy Markdown
Contributor Author

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.

@soltanmm-google
Copy link
Copy Markdown
Contributor Author

And thus I eat my words; updated to paper over loss of namespaced packages.

@soltanmm-google soltanmm-google force-pushed the taking-tradition-as-law-is-a-dangerous-idea branch 2 times, most recently from 9d3b9de to 572bfdb Compare December 12, 2016 23:39
Copy link
Copy Markdown
Contributor

@nathanielmanistaatgoogle nathanielmanistaatgoogle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Today I learned that in prose Setuptools is styled with a majuscule first letter.

Thanks!

Copy link
Copy Markdown
Contributor

@nathanielmanistaatgoogle nathanielmanistaatgoogle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind if I ask for changes?

from grpc._cython import cygrpc as _cygrpc


############################### Extension Shims ################################
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop this; we don't really want to help readers navigate to this part of the code.


############################### Extension Shims ################################

try:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a comment to the effect of "these are here to maintain compatibility; do not use!"?

sys.modules.update({'grpc.tools': grpc_tools})
except ImportError:
pass

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop these blank lines; this is one code block.


############################### Extension Shims ################################

try:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... and yeah, let's move these to the very end of the file.

@soltanmm-google soltanmm-google force-pushed the taking-tradition-as-law-is-a-dangerous-idea branch from 572bfdb to 5bd335b Compare December 13, 2016 00:20
Uses dynamic loading to paper-over the negative effects of losing
namespace packages in the previous commit.
@soltanmm-google soltanmm-google force-pushed the taking-tradition-as-law-is-a-dangerous-idea branch from 5bd335b to 53f6d09 Compare December 13, 2016 00:23
@soltanmm-google
Copy link
Copy Markdown
Contributor Author

addressed sans stuff discussed offline

@soltanmm-google soltanmm-google merged commit 343395b into grpc:master Dec 13, 2016
@soltanmm-google soltanmm-google deleted the taking-tradition-as-law-is-a-dangerous-idea branch December 13, 2016 04:57
soltanmm-google added a commit that referenced this pull request Dec 13, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jan 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants