diff --git a/CHANGELOG.md b/CHANGELOG.md index d7a6554..f6073de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## [0.12.1] - 2023-07-27 + +### Fixed + +- Make float and int hashable. + ## [0.12.0] - 2023-07-27 ### Added @@ -359,7 +365,8 @@ - Fixed handling of super tables with different sections. - Fixed raw strings escaping. -[unreleased]: https://github.com/sdispater/tomlkit/compare/0.12.0...master +[unreleased]: https://github.com/sdispater/tomlkit/compare/0.12.1...master +[0.12.1]: https://github.com/sdispater/tomlkit/releases/tag/0.12.1 [0.12.0]: https://github.com/sdispater/tomlkit/releases/tag/0.12.0 [0.11.8]: https://github.com/sdispater/tomlkit/releases/tag/0.11.8 [0.11.7]: https://github.com/sdispater/tomlkit/releases/tag/0.11.7 diff --git a/pyproject.toml b/pyproject.toml index ac0807a..9087572 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "tomlkit" -version = "0.12.0" +version = "0.12.1" description = "Style preserving TOML library" authors = [ "Sébastien Eustace ", diff --git a/tomlkit/__init__.py b/tomlkit/__init__.py index 1236d01..1f2bd02 100644 --- a/tomlkit/__init__.py +++ b/tomlkit/__init__.py @@ -27,7 +27,7 @@ from tomlkit.api import ws -__version__ = "0.12.0" +__version__ = "0.12.1" __all__ = [ "aot", "array", diff --git a/tomlkit/items.py b/tomlkit/items.py index 853754a..75e8ae2 100644 --- a/tomlkit/items.py +++ b/tomlkit/items.py @@ -612,6 +612,9 @@ def unwrap(self) -> int: __int__ = unwrap + def __hash__(self) -> int: + return hash(self.unwrap()) + @property def discriminant(self) -> int: return 2 @@ -693,6 +696,9 @@ def unwrap(self) -> float: __float__ = unwrap + def __hash__(self) -> int: + return hash(self.unwrap()) + @property def discriminant(self) -> int: return 3