Title: Lazy load defaults by dhermes · Pull Request #657 · googleapis/google-cloud-python · GitHub
Open Graph Title: Lazy load defaults by dhermes · Pull Request #657 · googleapis/google-cloud-python
X Title: Lazy load defaults by dhermes · Pull Request #657 · googleapis/google-cloud-python
Description: @tseaver This can be split into 3 distinct PRs if you like: Use an Environment class and an instance in _implicit_environ (attrs of instance replace class "constants") Moving the code for set_default_dataset_id from __init__ to _implicit_environ Add a lazy loading descriptor for setting the default dataset ID on the default instance from _implicit_environ Still missing: a lazy loading descriptor for connection (it's pretty tangled in to the tests, so I wanted to discuss this before putting in too much work on that) UPDATE: I think the best strategy for testing might be to just replace _implicit_environ.DEFAULT_ENVIRON with a fake instance that has Nones explicitly set in place of the lazily loaded pieces
Open Graph Description: @tseaver This can be split into 3 distinct PRs if you like: Use an Environment class and an instance in _implicit_environ (attrs of instance replace class "constants") Moving the code fo...
X Description: @tseaver This can be split into 3 distinct PRs if you like: Use an Environment class and an instance in _implicit_environ (attrs of instance replace class "constants") Moving the...
Opengraph URL: https://github.com/googleapis/google-cloud-python/pull/657
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:cb501383-5dec-6751-634d-9f4b7e414111 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9BAA:3861F:13BC899:1AD0AF8:6A4D7418 |
| html-safe-nonce | d5c087c34af6e414cb2048496c58b58b28cb2fda2e6b13ea39e9dcd153797c42 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QkFBOjM4NjFGOjEzQkM4OTk6MUFEMEFGODo2QTRENzQxOCIsInZpc2l0b3JfaWQiOiI0MjE2MDcwMTQ0NDIwMzEyMDg4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 65ae70f25e5744e8cec6b6ca26eb20fcfb67af0247d498cd98a1eb8080e014ee |
| hovercard-subject-tag | pull_request:29421460 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/googleapis/google-cloud-python/pull/657/files |
| twitter:image | https://avatars.githubusercontent.com/u/520669?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/520669?s=400&v=4 |
| og:image:alt | @tseaver This can be split into 3 distinct PRs if you like: Use an Environment class and an instance in _implicit_environ (attrs of instance replace class "constants") Moving the code fo... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | c78260c7b3f4ac4b0356c8208537f05406a3a2d46a9ec3f735b372dcc519c39e |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 399fff412f48461d435721c009efc17ea44be72f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width