Project

General

Profile

Actions

Bug #19895

closed

Strategy to upgrade or fork google python package to solve compatability issues

Added by Peter Amstutz over 2 years ago. Updated about 2 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
SDKs
Target version:
Start date:
01/09/2023
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
1.0

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?

Subtasks 1 (0 open1 closed)

Task #19910: Review 19895-google-api-python-client-2ResolvedLucas Di Pentima01/09/2023

Actions
Actions #1

Updated by Peter Amstutz over 2 years ago

  • Description updated (diff)
Actions #2

Updated by Peter Amstutz over 2 years ago

  • 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
  • Description updated (diff)
  • Assigned To set to Brett Smith
  • Target version changed from 2023-02-01 sprint to 2023-01-18 sprint
Actions #3

Updated by Brett Smith over 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 for static_discovery will be False when the discoveryServiceUrl argument of discovery.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.

Actions #4

Updated by Brett Smith about 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.

Actions #5

Updated by Lucas Di Pentima about 2 years ago

This is great news, thanks for doing the research!

LGTM.

Actions #6

Updated by Brett Smith about 2 years ago

  • Status changed from In Progress to Resolved
Actions #7

Updated by Tom Clegg about 2 years ago

  • Story points set to 1.0
Actions

Also available in: Atom PDF