Skip to content

looker-sdk 21.20.0 throws TypeError for python 3.9.10 #944

Closed
@rowedonalde

Description

@rowedonalde

Due to a change in Python's functools module that was included in the update from 3.9.9->3.9.10, looker_sdk breaks on import. The error seems to be through the cattr dependency:

  File "/opt/app/src/tvsapi/views.py", line 8, in <module>
    import looker_sdk
  File "/usr/local/lib/python3.9/site-packages/looker_sdk/__init__.py", line 32, in <module>
    from looker_sdk.sdk.api31 import methods, methods as methods31  # noqa:F401
  File "/usr/local/lib/python3.9/site-packages/looker_sdk/sdk/api31/methods.py", line 32, in <module>
    from . import models as mdls
  File "/usr/local/lib/python3.9/site-packages/looker_sdk/sdk/api31/models.py", line 11935, in <module>
    sr.converter31.register_structure_hook(
  File "/usr/local/lib/python3.9/site-packages/cattr/converters.py", line 186, in register_structure_hook
    self._structure_func.register_cls_list([(cl, func)])
  File "/usr/local/lib/python3.9/site-packages/cattr/multistrategy_dispatch.py", line 45, in register_cls_list
    self._single_dispatch.register(cls, handler)
  File "/usr/local/lib/python3.9/functools.py", line 855, in register
      raise TypeError(
TypeError: Invalid first argument to `register()`. ForwardRef('AccessToken') is not a class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugRegression or bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions