Title: Core library does not include init in root path · Issue #4247 · googleapis/google-cloud-python · GitHub
Open Graph Title: Core library does not include init in root path · Issue #4247 · googleapis/google-cloud-python
X Title: Core library does not include init in root path · Issue #4247 · googleapis/google-cloud-python
Description: There is clearly a hierarchy in this package, for example "google.cloud.storage" is a particular package that includes the google.cloud core library. But there is no upstream "google" library, and so there is no associated google/__init_...
Open Graph Description: There is clearly a hierarchy in this package, for example "google.cloud.storage" is a particular package that includes the google.cloud core library. But there is no upstream "google" library, and ...
X Description: There is clearly a hierarchy in this package, for example "google.cloud.storage" is a particular package that includes the google.cloud core library. But there is no upstream "google...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/4247
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Core library does not include init in root path","articleBody":"There is clearly a hierarchy in this package, for example \"google.cloud.storage\" is a particular package that includes the google.cloud core library. But there is no upstream \"google\" library, and so there is no associated `google/__init__.py` file created, which can lead to a painful debugging situation where simple code like \"import google.cloud.storage\" fails.\r\n\r\nIn depth:\r\n\r\nThis is a corner case -- but allowing for that: the wheel packages for Google Cloud Python are setup to use subfolders, which is relatively unique in Python packaging. So these packages are all underneath the \"google/\" folder. Unfortunately, there is no root package -- because the Google Cloud Core is not actually a root package, it too is a subfolder.\r\n\r\nThe consequence is that there is no `google/__init__.py` and there is no package that would own that file as a distributable wheel. This has some unfortunate side effects when attempting to do an import google.cloud.storage or similar when using Spark.\r\n\r\nThe workaround is simply to touch that file when packaging dependencies.","author":{"url":"https://github.com/Downchuck","@type":"Person","name":"Downchuck"},"datePublished":"2017-10-24T18:28:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":16},"url":"https://github.com/4247/google-cloud-python/issues/4247"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9218c732-b769-4ff2-d6c4-45ecaa38280b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B596:39FFB3:25226BC:35824AF:6A4D18B1 |
| html-safe-nonce | 956fd8b7863f33d06ac9355fa295314ecee9008ab33eb037a83c9f25265c5f68 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTk2OjM5RkZCMzoyNTIyNkJDOjM1ODI0QUY6NkE0RDE4QjEiLCJ2aXNpdG9yX2lkIjoiNjY3MzI3MTM1NzM3Nzk0MzcyOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4f187f135ba961e13d6c24b4d38457c04703deea556fa1b6a34d2dc671199f68 |
| hovercard-subject-tag | issue:268138579 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-python/4247/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bf07ad5d0f44278a395d1657fcd3acf169740959adf729e501d8ee625226a179/googleapis/google-cloud-python/issues/4247 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bf07ad5d0f44278a395d1657fcd3acf169740959adf729e501d8ee625226a179/googleapis/google-cloud-python/issues/4247 |
| og:image:alt | There is clearly a hierarchy in this package, for example "google.cloud.storage" is a particular package that includes the google.cloud core library. But there is no upstream "google" library, and ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Downchuck |
| hostname | github.com |
| expected-hostname | github.com |
| None | bcb4661e6fb4fe8b394c51ea02ccdb2236d40dc59afc75a3bbba50bf6517134c |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 16316451 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16316451 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | fb70bd3c4b2bec429781b65419e912c66e2d5581 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width