Thanks to visit codestin.com
Credit goes to github.com

Skip to content

TypeError after upgrading version to 4.6.0 #182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vkukushkin88 opened this issue May 23, 2023 · 2 comments
Closed

TypeError after upgrading version to 4.6.0 #182

vkukushkin88 opened this issue May 23, 2023 · 2 comments

Comments

@vkukushkin88
Copy link

/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.

@AlexWaygood
Copy link
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

@AlexWaygood AlexWaygood closed this as not planned Won't fix, can't repro, duplicate, stale May 23, 2023
@AlexWaygood
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants