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

fix: incorrect type hints on memoize key #958 #959

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ntjess
Copy link
Contributor

@ntjess ntjess commented Jan 5, 2025

All Submissions:

Description of changes

Type hints now make code editors happy when caching non-hashable function inputs (fixes #958)

Copy link
Collaborator

@iisakkirotko iisakkirotko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ntjess! Thanks a lot for the PR (and good spot on the issue)!

It seem that as of Python 3.12, importing typing.Hashable is deprecated (see the Python docs), and should be imported from collections.abc instead.

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

Successfully merging this pull request may close these issues.

Incorrect type hints on memoize key
2 participants