mirror of https://gitlab.com/ita1024/waf.git
Removed the old __eq__ and __hash__ which are not useful anymore in recent interpreters
This commit is contained in:
parent
e365a30215
commit
281148b8eb
|
@ -99,14 +99,6 @@ class Node(object):
|
||||||
"String representation (abspath), for debugging purposes"
|
"String representation (abspath), for debugging purposes"
|
||||||
return self.abspath()
|
return self.abspath()
|
||||||
|
|
||||||
def __hash__(self):
|
|
||||||
"Node hash, used for storage in dicts. This hash is not persistent."
|
|
||||||
return id(self)
|
|
||||||
|
|
||||||
def __eq__(self, node):
|
|
||||||
"Node comparison, based on the IDs"
|
|
||||||
return id(self) == id(node)
|
|
||||||
|
|
||||||
def __copy__(self):
|
def __copy__(self):
|
||||||
"Implemented to prevent nodes from being copied (raises an exception)"
|
"Implemented to prevent nodes from being copied (raises an exception)"
|
||||||
raise Errors.WafError('nodes are not supposed to be copied')
|
raise Errors.WafError('nodes are not supposed to be copied')
|
||||||
|
|
|
@ -160,10 +160,6 @@ class TaskBase(evil):
|
||||||
return self.fun.__name__
|
return self.fun.__name__
|
||||||
return self.__class__.__name__
|
return self.__class__.__name__
|
||||||
|
|
||||||
def __hash__(self):
|
|
||||||
"Very fast hashing scheme but not persistent (replace/implement in subclasses and see :py:meth:`waflib.Task.Task.uid`)"
|
|
||||||
return id(self)
|
|
||||||
|
|
||||||
def keyword(self):
|
def keyword(self):
|
||||||
if hasattr(self, 'fun'):
|
if hasattr(self, 'fun'):
|
||||||
return 'Function'
|
return 'Function'
|
||||||
|
@ -508,7 +504,6 @@ class Task(TaskBase):
|
||||||
self.uid_ = m.digest()
|
self.uid_ = m.digest()
|
||||||
return self.uid_
|
return self.uid_
|
||||||
|
|
||||||
|
|
||||||
def set_inputs(self, inp):
|
def set_inputs(self, inp):
|
||||||
"""
|
"""
|
||||||
Append the nodes to the *inputs*
|
Append the nodes to the *inputs*
|
||||||
|
|
Loading…
Reference in New Issue