mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
gh-129463: Remove two attributes from ForwardRef equality (#132283)
This commit is contained in:
parent
884df116d7
commit
5e80fee41a
3 changed files with 10 additions and 4 deletions
|
@ -225,8 +225,6 @@ class ForwardRef:
|
|||
# because dictionaries are not hashable.
|
||||
and self.__globals__ is other.__globals__
|
||||
and self.__forward_is_class__ == other.__forward_is_class__
|
||||
and self.__code__ == other.__code__
|
||||
and self.__ast_node__ == other.__ast_node__
|
||||
and self.__cell__ == other.__cell__
|
||||
and self.__owner__ == other.__owner__
|
||||
)
|
||||
|
@ -237,8 +235,6 @@ class ForwardRef:
|
|||
self.__forward_module__,
|
||||
id(self.__globals__), # dictionaries are not hashable, so hash by identity
|
||||
self.__forward_is_class__,
|
||||
self.__code__,
|
||||
self.__ast_node__,
|
||||
self.__cell__,
|
||||
self.__owner__,
|
||||
))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue