[Checkins] SVN: zope.interface/branches/regebro-python3/ Some minor cleanups in preparation for merge.
Lennart Regebro
regebro at gmail.com
Thu Apr 8 14:57:00 EDT 2010
Log message for revision 110691:
Some minor cleanups in preparation for merge.
Changed:
U zope.interface/branches/regebro-python3/CHANGES.txt
D zope.interface/branches/regebro-python3/setup.cfg
U zope.interface/branches/regebro-python3/src/zope/interface/advice.py
U zope.interface/branches/regebro-python3/src/zope/interface/interface.py
-=-
Modified: zope.interface/branches/regebro-python3/CHANGES.txt
===================================================================
--- zope.interface/branches/regebro-python3/CHANGES.txt 2010-04-08 17:06:48 UTC (rev 110690)
+++ zope.interface/branches/regebro-python3/CHANGES.txt 2010-04-08 18:56:59 UTC (rev 110691)
@@ -10,7 +10,25 @@
Martin v Löwis
Thomas Lotze
Wolfgang Schnerring
-
+
+ The 3.1 support is completely backwards compatible. However, the implements
+ syntax used under Python 2.X does not work under 3.X, since it depends on
+ how metaclasses are implemented and this has changed. Instead it now supports
+ a decorator syntax (also under Python 2.X):
+
+ class Foo:
+ implements(IFoo)
+ ...
+
+ can now also be written
+
+ @implementor(IFoo):
+ class Foo:
+ ...
+
+ There are 2to3 fixers available to do this change automatically in the
+ zope.fixers package.
+
- Python 2.3 is no longer supported.
Deleted: zope.interface/branches/regebro-python3/setup.cfg
===================================================================
--- zope.interface/branches/regebro-python3/setup.cfg 2010-04-08 17:06:48 UTC (rev 110690)
+++ zope.interface/branches/regebro-python3/setup.cfg 2010-04-08 18:56:59 UTC (rev 110691)
@@ -1,2 +0,0 @@
-[egg_info]
-tag_svn_revision = true
Modified: zope.interface/branches/regebro-python3/src/zope/interface/advice.py
===================================================================
--- zope.interface/branches/regebro-python3/src/zope/interface/advice.py 2010-04-08 17:06:48 UTC (rev 110690)
+++ zope.interface/branches/regebro-python3/src/zope/interface/advice.py 2010-04-08 18:56:59 UTC (rev 110691)
@@ -109,7 +109,6 @@
previousMetaclass = caller_locals.get('__metaclass__')
if __python3:
- # XXX This is probably not gonna work.
defaultMetaclass = caller_globals.get('__metaclass__', type)
else:
defaultMetaclass = caller_globals.get('__metaclass__', ClassType)
Modified: zope.interface/branches/regebro-python3/src/zope/interface/interface.py
===================================================================
--- zope.interface/branches/regebro-python3/src/zope/interface/interface.py 2010-04-08 17:06:48 UTC (rev 110690)
+++ zope.interface/branches/regebro-python3/src/zope/interface/interface.py 2010-04-08 18:56:59 UTC (rev 110691)
@@ -473,7 +473,7 @@
# `Attribute` and `Method`
for name, attr in attrs.items():
if name == '__locals__':
- # This happens under Python 3 sometimes
+ # This happens under Python 3 sometimes, not sure why. /regebro
continue
if isinstance(attr, Attribute):
attr.interface = self
More information about the checkins
mailing list