From 6f8e34c505375b391b268e8162991afef80d78c1 Mon Sep 17 00:00:00 2001 From: Schuyler Martin Date: Wed, 23 Oct 2024 16:28:19 -0600 Subject: [PATCH] v0.3.4 (#217) --- CHANGELOG.md | 3 +++ conda_recipe_manager/parser/dependency.py | 8 ++++++++ docs/conf.py | 2 +- pyproject.toml | 2 +- recipe/meta.yaml | 2 +- 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5489d780..ee8774c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ NOTES: - Version releases in the 0.x.y range may introduce breaking changes. - See the auto-generated release notes for more details. +## 0.3.4 +- Makes `DependencyVariable` type hashable. + ## 0.3.3 - Fixes a bug discovered by user testing relating to manipulating complex dependencies. - Renames a few newer functions from `*_string` to `*_str` for project consistency. diff --git a/conda_recipe_manager/parser/dependency.py b/conda_recipe_manager/parser/dependency.py index 7175fb54..fb266ea4 100644 --- a/conda_recipe_manager/parser/dependency.py +++ b/conda_recipe_manager/parser/dependency.py @@ -144,6 +144,14 @@ def __eq__(self, o: object) -> bool: return False return self.name == o.name + def __hash__(self) -> int: + """ + Hashes this `DependencyVariable` instance. + + :returns: The hash value of this object. + """ + return hash(self.name) + # Type alias for types allowed in a Dependency's `data` field. DependencyData = MatchSpec | DependencyVariable diff --git a/docs/conf.py b/docs/conf.py index 27dceb1d..6adee761 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -11,7 +11,7 @@ """ project = "Conda Recipe Manager" author = "various" -release = "0.3.3" +release = "0.3.4" # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration diff --git a/pyproject.toml b/pyproject.toml index cebbe099..22524f6b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ exclude = ["tests"] [project] name = "conda_recipe_manager" -version = "0.3.3" +version = "0.3.4" authors = [ { name="Anaconda, Inc.", email="distribution_team@anaconda.com" }, ] diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 7ae7cd8d..510cfe83 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set name = "conda-recipe-manager" %} -{% set version = "0.3.3" %} +{% set version = "0.3.4" %} package: name: {{ name|lower }}