Skip to content

Commit

Permalink
switch immutables.Map to immutabledict
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasdiener authored and inducer committed Oct 9, 2023
1 parent d748b3a commit 1dc7f73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pymbolic/mapper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from abc import ABC, abstractmethod
from typing import Any, Dict
import pymbolic.primitives as primitives
import immutables
from immutabledict import immutabledict

__doc__ = """
Basic dispatch
Expand Down Expand Up @@ -252,7 +252,7 @@ def get_cache_key(self, expr, *args, **kwargs):
# Must add 'type(expr)', to differentiate between python scalar types.
# In Python, the following conditions are true: "hash(4) == hash(4.0)"
# and "4 == 4.0", but their traversal results cannot be re-used.
return (type(expr), expr, args, immutables.Map(kwargs))
return (type(expr), expr, args, immutabledict(kwargs))

def __call__(self, expr, *args, **kwargs):
result = self._cache.get(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
python_requires="~=3.8",
install_requires=[
"pytools>=2022.1.14",
"immutables",
"immutabledict",
],
extras_require={
"test": ["pytest>=2.3"],
Expand Down

0 comments on commit 1dc7f73

Please sign in to comment.