Deprecation warnings (2.7 -> 3 )

nn pruebauno at latinmail.com
Fri Dec 10 11:24:08 EST 2010


On Dec 10, 11:17 am, nn <prueba... at latinmail.com> wrote:
> On Dec 9, 10:15 pm, rusi <rustompm... at gmail.com> wrote:
>
> > In trying to get from 2.x to 3 Terry suggested I use 2.7 with
> > deprecation warnings
>
> > Heres the (first) set
>
> > DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__
> > in 3.x
> > DeprecationWarning: callable() not supported in 3.x; use isinstance(x,
> > collections.Callable)
>
> > Is there one place/site I can go to for understanding all these and
> > trying to clear them?
>
> I don't know any place that explains those. But the second is a pretty
> straightforward: replace "callable(x)" by "isinstance(x,
> collections.Callable)"
>
> The first one is more tricky. You have to find the class with a __eq__
> method in it and copy and paste the __hash__ method from its
> superclass into itself.

And BTW callable was deprecated in 3.0 and then added back in for 3.2.
So if you decide to not support 3.0 and 3.1 you would be fine just
leaving it as is.



More information about the Python-list mailing list