From dda204b44d28338ba98398598eba8daa8ad2d356 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Tue, 18 Jan 2022 19:48:22 +0000 Subject: [PATCH] Revert "Make Requirement hashable" This reverts commit 215c1723cf9ea3190c5dee307a1b9e3e41d3306c. --- packaging/requirements.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packaging/requirements.py b/packaging/requirements.py index 063a0694..53f9a3aa 100644 --- a/packaging/requirements.py +++ b/packaging/requirements.py @@ -5,7 +5,7 @@ import re import string import urllib.parse -from typing import Any, List, Optional as TOptional, Set +from typing import List, Optional as TOptional, Set from pyparsing import ( # noqa Combine, @@ -144,9 +144,3 @@ def __str__(self) -> str: def __repr__(self) -> str: return f"" - - def __hash__(self) -> int: - return hash((self.__class__.__name__, str(self))) - - def __eq__(self, other: Any) -> bool: - return bool(self.__class__ == other.__class__ and str(self) == str(other))