[Checkins] SVN: zope.location/trunk/ Drop support for Python 2.4 and 2.5.

Tres Seaver cvs-admin at zope.org
Thu May 17 20:40:43 UTC 2012


Log message for revision 125972:
  Drop support for Python 2.4 and 2.5.
  
  Replace deprecated 'zope.component.adapts' usage with equivalent
  'zope.component.adapter' decorator.
  
  Replace deprecated 'zope.interface.implements' usage with equivalent
  'zope.interface.implementer' decorator.
  
  

Changed:
  U   zope.location/trunk/CHANGES.txt
  U   zope.location/trunk/setup.py
  U   zope.location/trunk/src/zope/location/location.py
  U   zope.location/trunk/src/zope/location/location.txt
  U   zope.location/trunk/src/zope/location/pickling.py
  U   zope.location/trunk/src/zope/location/traversing.py

-=-
Modified: zope.location/trunk/CHANGES.txt
===================================================================
--- zope.location/trunk/CHANGES.txt	2012-05-17 20:39:46 UTC (rev 125971)
+++ zope.location/trunk/CHANGES.txt	2012-05-17 20:40:40 UTC (rev 125972)
@@ -2,12 +2,18 @@
 CHANGES
 =======
 
-3.9.2 (unreleased)
+4.0.0 (unreleased)
 ------------------
 
-- Nothing changed yet.
+- Replace deprecated ``zope.component.adapts`` usage with equivalent
+  ``zope.component.adapter`` decorator.
 
+- Replace deprecated ``zope.interface.implements`` usage with equivalent
+  ``zope.interface.implementer`` decorator.
 
+- Drop support for Python 2.4 and 2.5.
+
+
 3.9.1 (2011-08-22)
 ------------------
 

Modified: zope.location/trunk/setup.py
===================================================================
--- zope.location/trunk/setup.py	2012-05-17 20:39:46 UTC (rev 125971)
+++ zope.location/trunk/setup.py	2012-05-17 20:40:40 UTC (rev 125972)
@@ -26,7 +26,7 @@
     return text
 
 setup(name='zope.location',
-      version='3.9.2dev',
+      version='4.0.0dev',
       author='Zope Corporation and Contributors',
       author_email='zope-dev at zope.org',
       description='Zope Location',
@@ -48,6 +48,9 @@
           'Intended Audience :: Developers',
           'License :: OSI Approved :: Zope Public License',
           'Programming Language :: Python',
+          'Programming Language :: Python :: 2',
+          'Programming Language :: Python :: 2.6',
+          'Programming Language :: Python :: 2.7',
           'Natural Language :: English',
           'Operating System :: OS Independent',
           'Topic :: Internet :: WWW/HTTP',

Modified: zope.location/trunk/src/zope/location/location.py
===================================================================
--- zope.location/trunk/src/zope/location/location.py	2012-05-17 20:39:46 UTC (rev 125971)
+++ zope.location/trunk/src/zope/location/location.py	2012-05-17 20:40:40 UTC (rev 125972)
@@ -24,13 +24,13 @@
 from zope.proxy.decorator import DecoratorSpecificationDescriptor
 
 
+ at zope.interface.implementer(ILocation)
 class Location(object):
     """Mix-in that implements ILocation.
 
     It provides the `__parent__` and `__name__` attributes.
 
     """
-    zope.interface.implements(ILocation)
 
     __parent__ = None
     __name__ = None
@@ -84,6 +84,8 @@
         return self.funcs[0](inst)
 
 
+ at zope.interface.implementer(ILocation)
+ at zope.component.adapter(zope.interface.Interface)
 class LocationProxy(ProxyBase):
     """Location-object proxy
 
@@ -92,8 +94,6 @@
 
     """
 
-    zope.component.adapts(zope.interface.Interface)
-    zope.interface.implements(ILocation)
 
     __slots__ = '__parent__', '__name__'
     __safe_for_unpickling__ = True

Modified: zope.location/trunk/src/zope/location/location.txt
===================================================================
--- zope.location/trunk/src/zope/location/location.txt	2012-05-17 20:39:46 UTC (rev 125971)
+++ zope.location/trunk/src/zope/location/location.txt	2012-05-17 20:40:40 UTC (rev 125972)
@@ -10,7 +10,7 @@
 
 Usage within an Object field:
 
-  >>> from zope.interface import implements, Interface
+  >>> from zope.interface import implementer, Interface
   >>> from zope.schema import Object
   >>> from zope.schema.fieldproperty import FieldProperty
   >>> from zope.location.interfaces import ILocation
@@ -18,8 +18,8 @@
   
   >>> class IA(Interface):
   ...     location = Object(schema=ILocation, required=False, default=None)
-  >>> class A(object):
-  ...     implements(IA)
+  >>> @implementer(IA)
+  ... class A(object):
   ...     location = FieldProperty(IA['location'])
   
   >>> a = A()

Modified: zope.location/trunk/src/zope/location/pickling.py
===================================================================
--- zope.location/trunk/src/zope/location/pickling.py	2012-05-17 20:39:46 UTC (rev 125971)
+++ zope.location/trunk/src/zope/location/pickling.py	2012-05-17 20:40:40 UTC (rev 125972)
@@ -16,7 +16,7 @@
 __docformat__ = 'restructuredtext'
 
 from zope.component import adapts
-from zope.interface import implements
+from zope.interface import implementer
 from zope.location.interfaces import ILocation
 from zope.location.location import inside
 
@@ -27,13 +27,13 @@
         "because zope.copy is not available")
 
 
+ at implementer(ICopyHook)
 class LocationCopyHook(object):
     """Copy hook to preserve copying referenced objects that are not
     located inside object that's being copied.
     """
     
     adapts(ILocation)
-    implements(ICopyHook)
     
     def __init__(self, context):
         self.context = context

Modified: zope.location/trunk/src/zope/location/traversing.py
===================================================================
--- zope.location/trunk/src/zope/location/traversing.py	2012-05-17 20:39:46 UTC (rev 125971)
+++ zope.location/trunk/src/zope/location/traversing.py	2012-05-17 20:40:40 UTC (rev 125972)
@@ -23,6 +23,8 @@
 from zope.location.location import Location
 
 
+ at zope.interface.implementer(ILocationInfo)
+ at zope.component.adapter(ILocation)
 class LocationPhysicallyLocatable(object):
     """Provide location information for location objects
     
@@ -33,8 +35,6 @@
     
     """
 
-    zope.component.adapts(ILocation)
-    zope.interface.implements(ILocationInfo)
 
     def __init__(self, context):
         self.context = context
@@ -279,6 +279,8 @@
                 return parent
         return self.getRoot()
 
+ at zope.interface.implementer(ILocationInfo)
+ at zope.component.adapter(IRoot)
 class RootPhysicallyLocatable(object):
     """Provide location information for the root object
     
@@ -293,8 +295,6 @@
     
     """
 
-    zope.component.adapts(IRoot)
-    zope.interface.implements(ILocationInfo)
 
     def __init__(self, context):
         self.context = context



More information about the checkins mailing list