Test for "if not PY2" in compatibility code, rather than "if PY3" #10158
Labels
api: logging
Issues related to the Cloud Logging API.
api: pubsub
Issues related to the Pub/Sub API.
api: storage
Issues related to the Cloud Storage API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
At a few place the Python 2/3 compatibility code tests if Python 3 is used, assuming the "else" scenario is Python 2. Such tests will break if Python 4 (or some other post-3 version) is ever released.
The fix is to instead split the code paths into "Python 2" and "not Python 2" groups.
The text was updated successfully, but these errors were encountered: