I have just pushed a commit to a topic branch in my repo[0] that fixes the
warnings about __eq__ overriding __hash__ when sympy's tests are run with
the -3 flag.  Included below is the full commit message.  Comments?

[0]: http://github.com/xiongchiamiov/sympy/tree/2to3-support

---------------------------------------------

Define __hash__ functions when __eq__ is overriden for Py3k support.

As hinted at in a bugreport[0] and implemented several years ago in the
py3k branch[1], in Python 3, overriding __eq__ without explicitly
defining __hash__ will cause __hash__ to be set to None.

I have merely defined __hash__ functions so that python2.7 rc2 will not
display any warnings (about this) when run with the -3 flag. Since we
had not defined __hash__ methods previously, they are just calls to the
super-class's __hash__.

[0]: http://bugs.python.org/issue2235
[1]: http://svn.python.org/view?view=rev&revision=51454

--
James Pearson
--
Most histories are written by the winners of conflicts, but those written by the
losers -- if they survive -- are often more interesting.
  -- Iblis Ginjo, The Landscape of Humanity

-- 
You received this message because you are subscribed to the Google Groups 
"sympy-patches" group.
To post to this group, send email to sympy-patc...@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-patches+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-patches?hl=en.

Reply via email to