Skip to content

google-cloud-core incompatible with App Engine (py27) #3815

@msuozzo

Description

@msuozzo

The polling library in google-cloud-core contains an indirect native dependency (ctypes) via the tenacity library. This has the unfortunate consequence of causing import failures on App Engine because the GAE runtime restricts the use of native dependencies.

To clarify the dependency chain causing the problem:

Project Description Relevant Import Site
google-cloud-core core/google/api/core/future/polling.py
tenacity General-purpose retry library monotonic import
monotonic py27 backport of py33 time.monotonic ctypes import

I couldn't think of a particularly easy fix.

One wacky idea that might work would be to write a monotonic-like function/class that faked monotonicity by storing some fixed number of recent calls to the non-monotonic function (e.g. time.time()). When a new call came in, it would call the time function and instead of returning that value straight away, it would calculate and return the max of the value and the cached previous calls (and, to be definitionally correct, add an epsilon). Given the constraints of tenacity, this might suffice but a simpler solution would obviously be preferred.

Thanks :)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions