Skip to content

Commit

Permalink
Revert "Make Requirement hashable"
Browse files Browse the repository at this point in the history
This reverts commit 215c172.
  • Loading branch information
abravalheri committed Jan 21, 2022
1 parent 991d65f commit dda204b
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions packaging/requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -144,9 +144,3 @@ def __str__(self) -> str:

def __repr__(self) -> str:
return f"<Requirement('{self}')>"

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))

0 comments on commit dda204b

Please sign in to comment.