[Interface-dev] zope.interface on Python 3: Only two errors left!

Lennart Regebro regebro at gmail.com
Wed Apr 8 08:29:49 EDT 2009


Man, this has taken WAY to much time. Most of that to try to fiddle
with the fixer to make it work properly.

Anyway, it's getting close. I currently have only two errors left
amongst the tests. And then I should move @implements_only(IFoo) to
@implememts(IFoo, inherit=False). And then I should move the custom
build_2to3 and test_2to3 methods to setuptools.

After that this branch should be ready for testing and review.


Here are the errors I still have left. Advice on these would be appreciated.

1. None is no longer orderable. This means that this test fails:

ERROR: test_w_None (zope.interface.tests.test_sorting.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/projects/zope.interface/build/lib.linux-i686-3.0/zope/interface/tests/test_sorting.py",
line 40, in test_w_None
    l.sort()
TypeError: unorderable types: NoneType() < NoneType()


It tries to sort a list of interfaces:         l = [I1, None, I3, I5,
None, I6, I4, I2]
I don't know if this is significant, but I have the feeling that this
may be very significant for the component registry. The only idea I
have of how to solve this in that case is that the component registry
uses a sort(l, key=keyfunc) everywhere.




2. implementedBy builtins.object appears in __bases__. I'm not sure why.

FAIL: Doctest: README.txt
----------------------------------------------------------------------
File "/home/projects/zope.interface/build/lib.linux-i686-3.0/zope/interface/tests/../README.txt",
line 557, in README.txt
Failed example:
    baz_implements.__bases__
Expected:
    (<InterfaceClass __main__.IBaz>,)
Got:
    (<InterfaceClass __main__.IBaz>, <implementedBy builtins.object>)


-- 
Lennart Regebro: Pythonista, Barista, Notsotrista.
http://regebro.wordpress.com/
+33 661 58 14 64


More information about the Interface-dev mailing list