Bug #19895
closedStrategy to upgrade or fork google python package to solve compatability issues
Description
Users are reporting that when installing the Python SDK from pip, if their project uses other packages that depend on Google API, they get version conflicts.
- Can we upgrade while maintaining Python API compatibility?
- How does this interact with generating API documentation?
- What would be involved with vendoring?
Updated by Peter Amstutz almost 2 years ago
- Target version changed from 2023-02-01 sprint to 2023-01-18 sprint
- Assigned To set to Brett Smith
- Description updated (diff)
- Subject changed from Make vendor fork of google python package to solve compatability issues to Strategy to upgrade or fork google python package to solve compatability issues
Updated by Brett Smith almost 2 years ago
- Status changed from New to In Progress
Based on discussion at standup I believe their UGPRADING.md describes the issues we ran into earlier. Note now:
As of version 2.1.0, for backwards compatibility with version 1.x, if
static_discovery
is not specified, the default value forstatic_discovery
will be False when thediscoveryServiceUrl
argument ofdiscovery.build()
is provided.
(This kind of reminds me how Python 3.0 was a backwards compatibility break with Python 2.x, and then Python 3.3 added a lot of features to improve backwards compatibility if not completely restore it.)
So I think when version 2.0 of the library came out, we saw there was a problem, pinned our version at the time, and haven't revisited since. With the change to the default static_discovery
in 2.1, I'm cautiously optimistic our SDK will work without changes again (the rest of the document is emphatic existing code should continue to work). I'm not in a good position to test builds now but will next time I can.
If I'm right: the only remaining caveat is this library only supports Python 3.7. I think we're currently trying to maintain support for Python 3.6? IMO we could probably drop that; Python 3.6 is now EOL. If we want to continue supporting it, we could maintain our current googleapiclient version requirement for Python 3.6, and upgrade to the latest version for later versions of Python.
Updated by Brett Smith almost 2 years ago
I propose we just change our dependency version to >=2.1. 19895-google-api-python-client-2 @ 1c9c63e7cb21d97dbeae5568cb64d06884f37613 - developer-run-tests: #3437
See discussion in the commit message. On the Python 3.6 issue, google-api-python-client added the requirement for Python 3.7 in 2.53.0, so 3.6 users will be able to get 2.52.0 and still be fine.
Updated by Lucas Di Pentima almost 2 years ago
This is great news, thanks for doing the research!
LGTM.
Updated by Brett Smith almost 2 years ago
- Status changed from In Progress to Resolved
Applied in changeset arvados|a0bee12bba25e564b26972dfb572c5a9e13c8de6.
Updated by Brett Smith almost 2 years ago
- Related to Bug #9989: [SDKs] Python SDK should use a more recent version of the google api client library added