Skip to content
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

remove dependency on typing_inspect #472

Open
elijahbenizzy opened this issue Oct 18, 2023 · 1 comment
Open

remove dependency on typing_inspect #472

elijahbenizzy opened this issue Oct 18, 2023 · 1 comment

Comments

@elijahbenizzy
Copy link
Collaborator

elijahbenizzy commented Oct 18, 2023

Is your feature request related to a problem? Please describe.
It is lightweight, but not heavily maintained. We should be able to remove the dependency as the python API stabilizes.

I think typing, included in the stdlib, has most of the stuff we need, especially >3.7 (8? 9?). Specifically get_origin

https://github.com/ilevkivskyi/typing_inspect

Describe the solution you'd like
We should see what we can use in the stdlib, TBD. We should contribute back anything to python typing module that we can't do.

Describe alternatives you've considered

  • Supporting the typing_inspect module
  • Forking/including it in Hamilton

Additional context
Just looking through the code

@zilto
Copy link
Collaborator

zilto commented Nov 8, 2023

Note. For Python <= 3.9, the stdlib typing module doesn't define a __name__ attribute for complex types (e.g., Dict[str, int]). Instead, the information is accessed through .__origin__.__name__

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

No branches or pull requests

2 participants