omarryhan/aiogoogle

Token expiry check broken in Python 3.6 and lower

Closed this issue · 1 comments

I am not entirely sure if this is a bug or if there simply is no intention to support Python 3.6, but given I was able to pip install it into my Python 3.6.6 environment I suspect the former, so here we go:

Line 25 of auth.utils will not work for Python 3.6 and lower, as .fromisoformat was introduced to the datetime module in version 3.7. You'd need to use something like .strptime(expires_at, '%Y-%m-%dT%H:%M:%S.%f') instead for lower versions

I can submit a PR for this if it is deemed a bug indeed

It's a bug indeed. Py 3.6 is supported. A PR would be appreciated. Thanks!