Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pytools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

import builtins
import contextlib
import dataclasses
import logging
import operator
import re
Expand Down Expand Up @@ -3023,7 +3024,7 @@ def unique_union(*args: Iterable[T]) -> Collection[T]:
# }}}


@dataclass_transform(frozen_default=True)
@dataclass_transform(frozen_default=True, field_specifiers=(dataclasses.field,))
def opt_frozen_dataclass(
*,
init: bool = True,
Expand Down
6 changes: 2 additions & 4 deletions pytools/persistent_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,12 @@
from collections.abc import Callable, Iterator, Mapping
from dataclasses import fields as dc_fields, is_dataclass
from enum import Enum
from typing import TYPE_CHECKING, Any, TypeVar, cast
from typing import Any, TypeVar, cast
from warnings import warn

from siphash24 import siphash13


if TYPE_CHECKING:
from pytools import Hash
from pytools import Hash # noqa: TC001 # Some places are importing it from here.


class RecommendedHashNotFoundWarning(UserWarning):
Expand Down Expand Up @@ -264,7 +262,7 @@
import math
if math.isnan(key):
# Also applies to np.nan, float("nan")
warn("Encountered a NaN while hashing. Since NaNs compare unequal "

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest without Numpy

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest without Numpy

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.10 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.10 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.10 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.10 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.10 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.10 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.10 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.10 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.10 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.10 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.12 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.12 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.12 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.12 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.12 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.12 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.12 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.12 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.12 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.12 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.x ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.x ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.x ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.x ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.x ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.x ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.x ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.x ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.x ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.x ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.10 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.10 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.10 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.10 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.10 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.10 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.10 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.10 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.10 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.10 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.12 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.12 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.12 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.12 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.12 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.12 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.12 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.12 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.12 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.12 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.x macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.x macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.x macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.x macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.x macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.x macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.x macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.x macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.x macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Py3.x macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Pypypy3.10 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Pypypy3.10 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Pypypy3.10 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Pypypy3.10 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Pypypy3.10 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Pypypy3.10 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Pypypy3.10 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Pypypy3.10 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Pypypy3.10 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Pypypy3.10 ubuntu-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Pypypy3.10 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Pypypy3.10 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Pypypy3.10 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Pypypy3.10 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Pypypy3.10 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Pypypy3.10 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Pypypy3.10 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Pypypy3.10 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Pypypy3.10 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.

Check warning on line 265 in pytools/persistent_dict.py

View workflow job for this annotation

GitHub Actions / Pytest on Pypypy3.10 macos-latest

Encountered a NaN while hashing. Since NaNs compare unequal to themselves, the resulting key can not be retrieved from a PersistentDict and will lead to a collision error on retrieval.
"to themselves, the resulting key can not be retrieved from a "
"PersistentDict and will lead to a collision error on retrieval.",
stacklevel=1)
Expand Down
4 changes: 2 additions & 2 deletions pytools/tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from __future__ import annotations

from collections.abc import Iterable
from dataclasses import dataclass
from dataclasses import dataclass, field
from typing import TYPE_CHECKING, Any, TypeVar
from warnings import warn

Expand Down Expand Up @@ -118,7 +118,7 @@ def __eq__(self, other: object) -> bool:
T = TypeVar("T")


@dataclass_transform(eq_default=True, frozen_default=True)
@dataclass_transform(eq_default=True, frozen_default=True, field_specifiers=(field,))
def tag_dataclass(cls: type[T]) -> type[T]:
return dataclass(init=True, frozen=True, eq=True, repr=True)(cls)

Expand Down
Loading