Skip to content

fix: use typing.Awaitable instead of collections.abc.Awaitable - #144

Open
angandotra-coursera wants to merge 1 commit into
awslabs:masterfrom
angandotra-coursera:fix/issue-143-awaitable-typing
Open

fix: use typing.Awaitable instead of collections.abc.Awaitable#144
angandotra-coursera wants to merge 1 commit into
awslabs:masterfrom
angandotra-coursera:fix/issue-143-awaitable-typing

Conversation

@angandotra-coursera

Copy link
Copy Markdown

Summary

  • collections.abc.Awaitable[T] isn't subscriptable until Python 3.9, but this package declares python_requires>=3.6, causing TypeError: 'ABCMeta' object is not subscriptable on Python 3.6-3.8.
  • Reverts the import to typing.Awaitable, which supports subscripting on all supported versions.

Fixes #143

Test plan

  • tox run locally: flake8 OK, mypy OK, unit tests pass (168 passed; 2 pre-existing failures unrelated to this change, in convert_to_milliseconds datetime.max edge case)

collections.abc.Awaitable[T] isn't subscriptable until Python 3.9,
but this package supports python_requires>=3.6, causing a
TypeError on 3.6-3.8. Fixes awslabs#143.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v3.5.0 - TypeError: 'ABCMeta' object is not subscriptable on Python 3.8 — Awaitable[T] in utils.py incompatible with <3.9

1 participant