Skip to content

Commit

Permalink
RF: remove explicit hash=True from @attr.s
Browse files Browse the repository at this point in the history
See #430 (comment)
for more reasoning -- objects should still be hashable
  • Loading branch information
yarikoptic committed Jun 17, 2019
1 parent b49f7d6 commit fae7a7e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions reproman/distributions/debian.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

# TODO: flyweight/singleton ?
# To make them hashable we need to freeze them... not sure if we are ready:
#@attr.s(cmp=True, hash=True, frozen=True)
#@attr.s(cmp=True, frozen=True)
@attr.s
class APTSource(SpecObject):
"""APT origin information
Expand All @@ -69,7 +69,7 @@ class APTSource(SpecObject):
_register_with_representer(APTSource)


@attr.s(slots=True, frozen=True, hash=True)
@attr.s(slots=True, frozen=True)
class DEBPackage(Package):
"""Debian package information"""
name = attrib(default=attr.NOTHING)
Expand Down
2 changes: 1 addition & 1 deletion reproman/distributions/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from ..utils import attrib


@attr.s(slots=True, frozen=True, hash=True)
@attr.s(slots=True, frozen=True)
class DockerImage(Package):
"""Docker image information"""
id = attrib(default=attr.NOTHING)
Expand Down
2 changes: 1 addition & 1 deletion reproman/distributions/redhat.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class RPMSource(SpecObject):
_register_with_representer(RPMSource)


@attr.s(slots=True, frozen=True, hash=True)
@attr.s(slots=True, frozen=True)
class RPMPackage(Package):
"""Redhat package information"""
name = attrib(default=attr.NOTHING)
Expand Down
2 changes: 1 addition & 1 deletion reproman/distributions/singularity.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from ..utils import attrib, md5sum, chpwd


@attr.s(slots=True, frozen=True, hash=True)
@attr.s(slots=True, frozen=True)
class SingularityImage(Package):
"""Singularity image information"""
md5 = attrib(default=attr.NOTHING)
Expand Down

0 comments on commit fae7a7e

Please sign in to comment.