Skip to content
This repository has been archived by the owner on Feb 6, 2025. It is now read-only.

Remove cached-property dependency #904

Closed
obi1kenobi opened this issue Aug 13, 2020 · 0 comments · Fixed by #905
Closed

Remove cached-property dependency #904

obi1kenobi opened this issue Aug 13, 2020 · 0 comments · Fixed by #905

Comments

@obi1kenobi
Copy link
Contributor

I think we should remove our dependency on cached-property, for a few reasons:

  • We use a very minimal piece of functionality we can easily replicate and improve upon ourselves.
  • It isn't type-hinted, and the open issue for it is over a year old with no activity: Support mypy / static typing pydanny/cached-property#172
  • The lack of type hints means that we have to always suppress mypy's disallow_untyped_decorators rule. It also means that @cached_property properties return type Any, which makes mypy even less useful.
  • @cached_property doesn't inherit from @property, causing a number of other type issues. Here's the tracking issue for it, which has also been inactive in many years: Can cached_property be a subclass of property? pydanny/cached-property#26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant