Skip to content

TypeError after upgrading version to 4.6.0 #182

Closed as not planned
Closed as not planned

Description

@vkukushkin88

/usr/local/lib/python3.9/typing.py:852: in subclasscheck
return issubclass(cls, self.origin)
E TypeError: issubclass() arg 1 must be a class

Object declaration:

class RelocationUnit(BaseFrozenModel):
"""Relocation object."""

type: Literal[RelocationType.locale,
              RelocationType.teleport,
              RelocationType.car,
              RelocationType.forced]
relocation_time: timedelta
airport_from: Airport
airport_to: Airport
start_time: datetime
end_time: datetime

on 4.5.0 or less it works perfectly.

Activity

  1. AlexWaygood commented on May 23, 2023

    @AlexWaygood
    Member

    Duplicate of pydantic/pydantic#5821, I believe. There's already been a pydantic PR merged that fixes the issue, we're just waiting for a pydantic release that includes the fix

  2. AlexWaygood commented on May 23, 2023

    @AlexWaygood
    Member

    pydantic v1.10.8 can now be installed from PyPI, and contains the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions