GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: Add support for using static discovery documents by parthea · Pull Request #1109 · googleapis/google-api-python-client

Conversation

@parthea

@parthea parthea commented Nov 26, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • Add new parameter static_discovery to googleapiclient.discovery.build(). When static_discovery is set to True only static discovery documents included in the library will be used.
  • If you prefer to not use static discovery documents, you can disable this feature by setting the static_discovery argument of googleapiclient.discovery.build() to False. For example :
from googleapiclient.discovery import build
build("youtubereporting", "v1", static_discovery=False)
  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #1063 🦕

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Nov 26, 2020
@parthea parthea changed the title Add support for using static discovery documents in the package feat: Add support for using static discovery documents in the package Nov 26, 2020
@parthea
parthea force-pushed the use-static-discovery-docs branch from b21ae24 to a6cdeef Compare November 26, 2020 02:55
@parthea parthea changed the title feat: Add support for using static discovery documents in the package feat: Add support for using static discovery documents Nov 26, 2020
@parthea
parthea force-pushed the use-static-discovery-docs branch 4 times, most recently from 130a961 to c15367e Compare November 27, 2020 03:20
bryanlaura736
bryanlaura736 approved these changes Nov 27, 2020
View reviewed changes
busunkim96
busunkim96 reviewed Nov 30, 2020
View reviewed changes
Comment thread googleapiclient/discovery_cache/__init__.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread googleapiclient/discovery_cache/__init__.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@parthea parthea mentioned this pull request Dec 7, 2020
Discovery document cache file has invalid JSON (possibly being written by two processes) #970
Closed
@parthea parthea self-assigned this Dec 7, 2020
@parthea parthea added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Dec 9, 2020
@busunkim96 busunkim96 mentioned this pull request Dec 11, 2020
chore: release 2.0.0 #1129
Merged
@parthea
parthea force-pushed the use-static-discovery-docs branch from f01705e to a984d80 Compare December 11, 2020 16:46
@parthea parthea removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Dec 12, 2020
@parthea
parthea marked this pull request as ready for review December 12, 2020 01:05
@parthea
parthea requested a review from a team December 12, 2020 01:05
@parthea
parthea force-pushed the use-static-discovery-docs branch from 8fc714f to 83fcfec Compare December 12, 2020 22:23
@parthea
parthea requested a review from SurferJeffAtGoogle December 12, 2020 22:45
bryanlaura736
bryanlaura736 approved these changes Dec 12, 2020
View reviewed changes
@parthea
parthea requested a review from danoscarmike December 13, 2020 00:49
@parthea parthea mentioned this pull request Dec 13, 2020
docs: Reduce noisy changes in docs regen #1135
Merged
4 tasks done
danoscarmike
danoscarmike approved these changes Dec 14, 2020
View reviewed changes
busunkim96
busunkim96 approved these changes Dec 14, 2020
View reviewed changes
@parthea
parthea requested a review from busunkim96 December 17, 2020 13:02
@parthea

parthea commented Dec 17, 2020

Copy link
Copy Markdown
Contributor Author

@busunkim96 @SurferJeffAtGoogle I've updated the docs, please can you take another look?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@parthea
parthea requested a review from JustinBeckwith December 17, 2020 13:08
busunkim96
busunkim96 reviewed Dec 17, 2020
View reviewed changes
Comment thread docs/start.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

JustinBeckwith
JustinBeckwith approved these changes Dec 17, 2020
View reviewed changes
parthea added 10 commits January 14, 2021 01:55
@parthea
Add tests for retrieving static discovery docs
cec0d4c
@parthea
fix doc string
a55e09d
@parthea
Test retrieving doc from internet w/o local copy
9b049bd
@parthea
Return content if discovery doc exists locally
e4cf59c
@parthea
Check for HTTP 404 in case API is not available
ea0237a
@parthea
Rename tests
356512f
@parthea
Update docs to include static_discovery param
a774407
@parthea
Only request docs if static_discovery=False
18281da
@parthea
Fix unit tests
cc2461d
@parthea
Auto generated docs should use static artifacts
b6b6dbb
@parthea
parthea force-pushed the use-static-discovery-docs branch from d846ca4 to b6b6dbb Compare January 14, 2021 01:56
@parthea
Improve note in start.md for clarity
770ab9f
@parthea
parthea requested review from SurferJeffAtGoogle and busunkim96 January 14, 2021 02:28
@parthea

parthea commented Jan 14, 2021

Copy link
Copy Markdown
Contributor Author

@busunkim96 @SurferJeffAtGoogle Please can you take another look?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@parthea
Fix build
3fa2160
busunkim96
busunkim96 approved these changes Jan 14, 2021
View reviewed changes
@parthea
parthea requested review from SurferJeffAtGoogle and removed request for SurferJeffAtGoogle January 14, 2021 23:26
@busunkim96
busunkim96 requested review from SurferJeffAtGoogle and removed request for SurferJeffAtGoogle January 14, 2021 23:29
@parthea
parthea dismissed SurferJeffAtGoogle’s stale review January 14, 2021 23:31

Hi Jeff, All review comments have been addressed. In an effort to move this PR forward, I'm going to dismiss the review as merging is blocked. All of your feedback was very helpful and has already been incorporated into the PR!

@parthea parthea added the automerge Merge the pull request once unit tests and other checks pass. label Jan 14, 2021
@parthea
parthea merged commit 32d1c59 into googleapis:master Jan 14, 2021
@gcf-merge-on-green gcf-merge-on-green Bot removed the automerge Merge the pull request once unit tests and other checks pass. label Jan 14, 2021
@parthea
parthea deleted the use-static-discovery-docs branch January 14, 2021 23:49
gcf-merge-on-green Bot pushed a commit that referenced this pull request Mar 3, 2021
@release-please
chore: release 2.0.0 (#1129)
a9c7ddc
🤖 I have created a release \*beep\* \*boop\* 
---
## [2.0.0](https://www.github.com/googleapis/google-api-python-client/compare/v1.12.8...v2.0.0) (2021-03-03)


### ⚠ BREAKING CHANGES

* **deps:** require 3.6+ (#961)

### Features

* Add support for using static discovery documents ([#1109](https://www.github.com/googleapis/google-api-python-client/issues/1109)) ([32d1c59](https://www.github.com/googleapis/google-api-python-client/commit/32d1c597b364e2641eca33ccf6df802bb218eea1))
* Update synth.py to copy discovery files from discovery-artifact-manager ([#1104](https://www.github.com/googleapis/google-api-python-client/issues/1104)) ([af918e8](https://www.github.com/googleapis/google-api-python-client/commit/af918e8ef422438aaca0c468de8b3b2c184d884e))


### Bug Fixes

* Catch ECONNRESET and other errors more reliably ([#1147](https://www.github.com/googleapis/google-api-python-client/issues/1147)) ([ae9cd99](https://www.github.com/googleapis/google-api-python-client/commit/ae9cd99134160a5540e6f8d6d33d855122854e10))
* **deps:** add upper-bound google-auth dependency ([#1180](https://www.github.com/googleapis/google-api-python-client/issues/1180)) ([c687f42](https://www.github.com/googleapis/google-api-python-client/commit/c687f4207b9c574e539a7eab75201a58f2e91f35))
* handle error on service not enabled ([#1117](https://www.github.com/googleapis/google-api-python-client/issues/1117)) ([c691283](https://www.github.com/googleapis/google-api-python-client/commit/c6912836e88eea45aef7d515383e549082d37717))
* Improve support for error_details ([#1126](https://www.github.com/googleapis/google-api-python-client/issues/1126)) ([e6a1da3](https://www.github.com/googleapis/google-api-python-client/commit/e6a1da3542e230e5287863f339ce1d28292cd92f))
* MediaFileUpload error if file does not exist ([#1127](https://www.github.com/googleapis/google-api-python-client/issues/1127)) ([2c6d029](https://www.github.com/googleapis/google-api-python-client/commit/2c6d0297851c806ef850ca23686c51ca5878ac48))
* replace deprecated socket.error with OSError ([#1161](https://www.github.com/googleapis/google-api-python-client/issues/1161)) ([b7b9986](https://www.github.com/googleapis/google-api-python-client/commit/b7b9986fe13c483eeefb77673b4091911978ee46))
* Use logging level info when file_cache is not available ([#1125](https://www.github.com/googleapis/google-api-python-client/issues/1125)) ([0b32e69](https://www.github.com/googleapis/google-api-python-client/commit/0b32e69900eafec2cd1197ba054d4f9a765a3f29))


### Miscellaneous Chores

* **deps:** require 3.6+ ([#961](https://www.github.com/googleapis/google-api-python-client/issues/961)) ([8325d24](https://www.github.com/googleapis/google-api-python-client/commit/8325d24acaa2b2077acaaea26ea5fafb6dd856c5))


### Documentation

* add networkconnectivity v1alpha1 ([#1176](https://www.github.com/googleapis/google-api-python-client/issues/1176)) ([91b61d3](https://www.github.com/googleapis/google-api-python-client/commit/91b61d3272de9b5aebad0cf1eb76ca53c24f22f9))
* Delete redundant oauth-web.md ([#1142](https://www.github.com/googleapis/google-api-python-client/issues/1142)) ([70bc6c9](https://www.github.com/googleapis/google-api-python-client/commit/70bc6c9db99eed5af7536b87448bd9323db9320b))
* fix MediaIoBaseUpload broken link ([#1112](https://www.github.com/googleapis/google-api-python-client/issues/1112)) ([334b6e6](https://www.github.com/googleapis/google-api-python-client/commit/334b6e6d9e4924398e57bad2e53747584abf8cf4))
* fix regression with incorrect args order in docs ([#1141](https://www.github.com/googleapis/google-api-python-client/issues/1141)) ([4249a7b](https://www.github.com/googleapis/google-api-python-client/commit/4249a7b92e891d1ecaf93944ca9c062ffbd54f77))
* fix typo in thread safety example code ([#1100](https://www.github.com/googleapis/google-api-python-client/issues/1100)) ([5ae088d](https://www.github.com/googleapis/google-api-python-client/commit/5ae088dc027b89517b896a89a0aeb2ca80f492cf))
* Reduce noisy changes in docs regen ([#1135](https://www.github.com/googleapis/google-api-python-client/issues/1135)) ([b1b0c83](https://www.github.com/googleapis/google-api-python-client/commit/b1b0c83ae0737e7b63cb77e4e7757213a216b88e))
* update docs/dyn ([#1096](https://www.github.com/googleapis/google-api-python-client/issues/1096)) ([c2228be](https://www.github.com/googleapis/google-api-python-client/commit/c2228be4630e279e02a25b51566a0f93b67aa499))
* update guidance on service accounts ([#1120](https://www.github.com/googleapis/google-api-python-client/issues/1120)) ([b2ea122](https://www.github.com/googleapis/google-api-python-client/commit/b2ea122c40ccac09c9e7b0b29f6b2bcca6db107b))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
@jay0lee jay0lee mentioned this pull request Jun 29, 2022
Breaking change: 1.8.1 breaks PyInstaller apps and any scenario where library is not installed with pip #876
Closed
mtsanovv added a commit to mtsanovv/youspotube that referenced this pull request Aug 22, 2022
@mtsanovv
Fix YouTube API connection failure
80ce2e8
Essentially, as described in googleapis/google-api-python-client#1109 and googleapis/google-api-python-client#876 - since version 2.0.0 google-api-python-client has included static documents for all Google Discovery APIs. To use them, you'd need to tell PyInstaller to include those static .json files in your build or use static_discovery=False which causes the library to dynamically download the API's discovery file from Google on build(). Otherwise, pyinstaller builds will fail.
@mtsanovv mtsanovv mentioned this pull request Aug 22, 2022
Fix YouTube API connection failure mtsanovv/youspotube#10
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@SurferJeffAtGoogle SurferJeffAtGoogle Awaiting requested review from SurferJeffAtGoogle
4 more reviewers
@JustinBeckwith JustinBeckwith JustinBeckwith approved these changes
@danoscarmike danoscarmike danoscarmike approved these changes
@busunkim96 busunkim96 busunkim96 approved these changes
@bryanlaura736 bryanlaura736 bryanlaura736 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@parthea parthea

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Convert to a static/packaged library

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@parthea @JustinBeckwith @danoscarmike @busunkim96 @SurferJeffAtGoogle @bryanlaura736
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.