[Checkins] SVN: zope.intid/trunk/ Rename zope.app.intid to zope.intid. Remove browser-related stuff.

Dan Korostelev nadako at gmail.com
Sat Jan 31 14:22:33 EST 2009


Log message for revision 95786:
  Rename zope.app.intid to zope.intid. Remove browser-related stuff.

Changed:
  U   zope.intid/trunk/CHANGES.txt
  U   zope.intid/trunk/buildout.cfg
  U   zope.intid/trunk/setup.py
  _U  zope.intid/trunk/src/
  D   zope.intid/trunk/src/zope/app/intid/
  A   zope.intid/trunk/src/zope/intid/
  D   zope.intid/trunk/src/zope/intid/DEPENDENCIES.cfg
  D   zope.intid/trunk/src/zope/intid/SETUP.cfg
  U   zope.intid/trunk/src/zope/intid/__init__.py
  D   zope.intid/trunk/src/zope/intid/browser/
  U   zope.intid/trunk/src/zope/intid/configure.zcml
  D   zope.intid/trunk/src/zope/intid/ftesting.zcml
  D   zope.intid/trunk/src/zope/intid/testing.py
  U   zope.intid/trunk/src/zope/intid/tests.py
  D   zope.intid/trunk/src/zope/intid/zope.app.intid-configure.zcml

-=-
Modified: zope.intid/trunk/CHANGES.txt
===================================================================
--- zope.intid/trunk/CHANGES.txt	2009-01-31 19:07:25 UTC (rev 95785)
+++ zope.intid/trunk/CHANGES.txt	2009-01-31 19:22:33 UTC (rev 95786)
@@ -2,45 +2,9 @@
 CHANGES
 =======
 
-3.6.1 (unreleased)
+3.7.0 (unreleased)
 ------------------
 
-- ...
-
-3.6.0 (2009-01-31)
-------------------
-
-- Changed dependency from ``zope.app.container`` to
-  ``zope.container``.
-
-- Move test dependencies ``zope.app.folder`` and
-  ``zope.app.component`` as ``zope.site``.
-
-3.5.1 (2008-12-11)
-------------------
-
-- Make it possible to subscribe object-specific handlers
-  for IntIdAddedEvent/IntIdRemovedEvent. Use them like
-  the zope.app.container.interfaces.IObjectAddedEvent.
-
-- Include utility->id mapping of added ids to the
-  IntIdAddedEvent.
-
-- Removed testing dependencies from install_requires.
-
-3.5.0 (2008-06-19)
-------------------
-
-- Separate subscriber configuration into a separate ZCML file.
-
-
-3.4.1 (2007-10-31)
-------------------
-
-- Resolve ``ZopeSecurityPolicy`` deprecation warning.
-
-
-3.4.0 (2007-10-24)
-------------------
-
-- Initial release independent of the main Zope tree.
+- Split out this package from ``zope.app.intid``. The latter one
+  now only contains browser views and compatibility imports while
+  whole IntId functionality is moved here. 

Modified: zope.intid/trunk/buildout.cfg
===================================================================
--- zope.intid/trunk/buildout.cfg	2009-01-31 19:07:25 UTC (rev 95785)
+++ zope.intid/trunk/buildout.cfg	2009-01-31 19:22:33 UTC (rev 95786)
@@ -4,4 +4,4 @@
 
 [test]
 recipe = zc.recipe.testrunner
-eggs = zope.app.intid [test]
+eggs = zope.intid [test]

Modified: zope.intid/trunk/setup.py
===================================================================
--- zope.intid/trunk/setup.py	2009-01-31 19:07:25 UTC (rev 95785)
+++ zope.intid/trunk/setup.py	2009-01-31 19:22:33 UTC (rev 95786)
@@ -11,7 +11,7 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-"""Setup for zope.app.intid package
+"""Setup for zope.intid package
 
 $Id$
 """
@@ -21,10 +21,10 @@
 def read(*rnames):
     return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
 
-setup(name = 'zope.app.intid',
-      version = '3.6.1dev',
+setup(name = 'zope.intid',
+      version = '3.7.0dev',
       author='Zope Corporation and Contributors',
-      author_email='zope3-dev at zope.org',
+      author_email='zope-dev at zope.org',
       description='Integer Id Utility',
       long_description=(
           read('README.txt')
@@ -42,22 +42,20 @@
           'Operating System :: OS Independent',
           'Topic :: Internet :: WWW/HTTP',
           'Framework :: Zope3'],
-      url='http://cheeseshop.python.org/pypi/zope.app.intid',
+      url='http://cheeseshop.python.org/pypi/zope.intid',
       license='ZPL 2.1',
       packages=find_packages('src'),
       package_dir = {'': 'src'},
-      namespace_packages=['zope', 'zope.app'],
+      namespace_packages=['zope'],
       extras_require = dict(test=['zope.app.testing',
-                                  'zope.app.securitypolicy',
-                                  'zope.site',
-                                  'zope.app.zcmlfiles']),
+                                  'zope.site']),
       install_requires = ['setuptools',
                           'ZODB3',
                           'zope.container',
-                          'zope.app.keyreference',
                           'zope.component',
                           'zope.event',
                           'zope.interface',
+                          'zope.keyreference',
                           'zope.location',
                           'zope.security',
                           ],


Property changes on: zope.intid/trunk/src
___________________________________________________________________
Modified: svn:ignore
   - zope.app.intid.egg-info

   + zope.app.intid.egg-info
zope.intid.egg-info


Deleted: zope.intid/trunk/src/zope/intid/DEPENDENCIES.cfg
===================================================================
--- zope.intid/trunk/src/zope/app/intid/DEPENDENCIES.cfg	2009-01-31 18:56:38 UTC (rev 95784)
+++ zope.intid/trunk/src/zope/intid/DEPENDENCIES.cfg	2009-01-31 19:22:33 UTC (rev 95786)
@@ -1 +0,0 @@
-zope.app.keyreference

Deleted: zope.intid/trunk/src/zope/intid/SETUP.cfg
===================================================================
--- zope.intid/trunk/src/zope/app/intid/SETUP.cfg	2009-01-31 18:56:38 UTC (rev 95784)
+++ zope.intid/trunk/src/zope/intid/SETUP.cfg	2009-01-31 19:22:33 UTC (rev 95786)
@@ -1,3 +0,0 @@
-<data-files zopeskel/etc/package-includes>
-  *-configure.zcml
-</data-files>

Modified: zope.intid/trunk/src/zope/intid/__init__.py
===================================================================
--- zope.intid/trunk/src/zope/app/intid/__init__.py	2009-01-31 18:56:38 UTC (rev 95784)
+++ zope.intid/trunk/src/zope/intid/__init__.py	2009-01-31 19:22:33 UTC (rev 95786)
@@ -23,26 +23,22 @@
 import random
 import BTrees
 
-from ZODB.interfaces import IConnection
 from persistent import Persistent
+from ZODB.interfaces import IConnection
 
+from zope.component import adapter, getAllUtilitiesRegisteredFor, subscribers
 from zope.event import notify
 from zope.interface import implements
-from zope.security.proxy import removeSecurityProxy
 from zope.location.interfaces import ILocation
-from zope.component import adapter, getAllUtilitiesRegisteredFor, queryUtility, subscribers
-from zope.component.interfaces import IFactory
+from zope.security.proxy import removeSecurityProxy
 
-from zope.container.interfaces import IObjectRemovedEvent
-from zope.container.interfaces import IObjectAddedEvent
+from zope.container.interfaces import IObjectAddedEvent, IObjectRemovedEvent
 from zope.container.contained import Contained
-from zope.app.keyreference.interfaces import IKeyReference, NotYet
+from zope.keyreference.interfaces import IKeyReference, NotYet
 
-from zope.app.intid.interfaces import IIntIds, IIntIdEvent
-from zope.app.intid.interfaces import IntIdRemovedEvent
-from zope.app.intid.interfaces import IntIdAddedEvent
+from zope.intid.interfaces import IIntIds, IIntIdEvent
+from zope.intid.interfaces import IntIdAddedEvent, IntIdRemovedEvent
 
-
 class IntIds(Persistent, Contained):
     """This utility provides a two way mapping between objects and
     integer ids.

Modified: zope.intid/trunk/src/zope/intid/configure.zcml
===================================================================
--- zope.intid/trunk/src/zope/app/intid/configure.zcml	2009-01-31 18:56:38 UTC (rev 95784)
+++ zope.intid/trunk/src/zope/intid/configure.zcml	2009-01-31 19:22:33 UTC (rev 95786)
@@ -31,7 +31,4 @@
 
   <include file="subscribers.zcml" />
 
-  <!-- Views -->
-  <include package=".browser" />
-
 </configure>

Deleted: zope.intid/trunk/src/zope/intid/ftesting.zcml
===================================================================
--- zope.intid/trunk/src/zope/app/intid/ftesting.zcml	2009-01-31 18:56:38 UTC (rev 95784)
+++ zope.intid/trunk/src/zope/intid/ftesting.zcml	2009-01-31 19:22:33 UTC (rev 95786)
@@ -1,52 +0,0 @@
-<configure
-   xmlns="http://namespaces.zope.org/zope"
-   i18n_domain="zope"
-   package="zope.app.intid"
-   >
-
-  <!-- This file is the equivalent of site.zcml and it is -->
-  <!-- used for functional testing setup -->
-
-  <include package="zope.app.zcmlfiles" />
-
-  <include package="zope.app.securitypolicy" />
-  <include package="zope.app.securitypolicy" file="meta.zcml" />
-  <include package="zope.formlib" />
-  <include package="zope.app.authentication" />
-  <include package="zope.app.keyreference" />
-  <include package="zope.app.intid" />
-
-  <securityPolicy
-    component="zope.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
-
-  <role id="zope.Anonymous" title="Everybody"
-                 description="All users have this role implicitly" />
-  <role id="zope.Manager" title="Site Manager" />
-
-  <grantAll role="zope.Manager" />
-  <include package="zope.app.securitypolicy.tests" file="functional.zcml" />
-
-  <!-- Principals -->
-
-  <unauthenticatedGroup
-    id="zope.Anybody"
-    title="Unauthenticated Users"
-    />
-
-  <!-- Principal that tests generally run as -->
-  <principal
-      id="zope.mgr"
-      title="Manager"
-      login="mgr"
-      password="mgrpw" />
-
-  <!-- Bootstrap principal used to make local grant to the principal above -->
-  <principal
-      id="zope.globalmgr"
-      title="Manager"
-      login="globalmgr"
-      password="globalmgrpw" />
-
-  <grant role="zope.Manager" principal="zope.globalmgr" />
-
-</configure>

Deleted: zope.intid/trunk/src/zope/intid/testing.py
===================================================================
--- zope.intid/trunk/src/zope/app/intid/testing.py	2009-01-31 18:56:38 UTC (rev 95784)
+++ zope.intid/trunk/src/zope/intid/testing.py	2009-01-31 19:22:33 UTC (rev 95786)
@@ -1,27 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""zope.app.intid common test related classes/functions/objects.
-
-$Id$
-"""
-
-__docformat__ = "reStructuredText"
-
-import os
-from zope.app.testing.functional import ZCMLLayer
-
-IntIdLayer = ZCMLLayer(
-    os.path.join(os.path.split(__file__)[0], 'ftesting.zcml'),
-    __name__, 'IntIdLayer', allow_teardown=True)
-

Modified: zope.intid/trunk/src/zope/intid/tests.py
===================================================================
--- zope.intid/trunk/src/zope/app/intid/tests.py	2009-01-31 18:56:38 UTC (rev 95784)
+++ zope.intid/trunk/src/zope/intid/tests.py	2009-01-31 19:22:33 UTC (rev 95786)
@@ -15,13 +15,11 @@
 
 $Id$
 """
-import re
 import unittest
 import BTrees
 
 from persistent import Persistent
 from persistent.interfaces import IPersistent
-from transaction import commit
 from ZODB.interfaces import IConnection
 
 from zope.interface import implements
@@ -31,18 +29,14 @@
 from zope.component import getSiteManager
 from zope.component.interfaces import IFactory
 
-from zope.traversing.api import traverse
-
 from zope.app.testing import setup, ztapi
 from zope.site.hooks import setSite
+from zope.keyreference.persistent import KeyReferenceToPersistent
+from zope.keyreference.persistent import connectionOfPersistent
+from zope.keyreference.interfaces import IKeyReference
 
-from zope.app.intid import IntIds, intIdEventNotify
-from zope.app.intid.interfaces import IIntIds
-from zope.app.intid.testing import IntIdLayer
-from zope.app.keyreference.persistent import KeyReferenceToPersistent
-from zope.app.keyreference.persistent import connectionOfPersistent
-from zope.app.keyreference.interfaces import IKeyReference
-from zope.app.testing.functional import BrowserTestCase
+from zope.intid import IntIds, intIdEventNotify
+from zope.intid.interfaces import IIntIds
 
 
 class P(Persistent):
@@ -207,9 +201,9 @@
         provideHandler(intIdEventNotify)
 
     def test_removeIntIdSubscriber(self):
-        from zope.app.intid import removeIntIdSubscriber
         from zope.container.contained import ObjectRemovedEvent
-        from zope.app.intid.interfaces import IIntIdRemovedEvent
+        from zope.intid import removeIntIdSubscriber
+        from zope.intid.interfaces import IIntIdRemovedEvent
         from zope.site.interfaces import IFolder
         parent_folder = self.root['folder1']['folder1_1']
         folder = self.root['folder1']['folder1_1']['folder1_1_1']
@@ -245,9 +239,9 @@
         self.assertEquals(objevents[0][1].original_event.object, parent_folder)
 
     def test_addIntIdSubscriber(self):
-        from zope.app.intid import addIntIdSubscriber
         from zope.container.contained import ObjectAddedEvent
-        from zope.app.intid.interfaces import IIntIdAddedEvent
+        from zope.intid import addIntIdSubscriber
+        from zope.intid.interfaces import IIntIdAddedEvent
         from zope.site.interfaces import IFolder
         parent_folder = self.root['folder1']['folder1_1']
         folder = self.root['folder1']['folder1_1']['folder1_1_1']
@@ -291,60 +285,11 @@
         return IntIds(family=BTrees.family64)
 
 
-class TestFunctionalIntIds(BrowserTestCase):
-
-    def setUp(self):
-        from zope.app.intid import IntIds
-        from zope.app.intid.interfaces import IIntIds
-
-        BrowserTestCase.setUp(self)
-
-        self.basepath = '/++etc++site/default'
-        root = self.getRootFolder()
-
-        sm = traverse(root, '/++etc++site')
-        setup.addUtility(sm, 'intid', IIntIds, IntIds())
-        commit()
-
-        type_name = 'BrowserAdd__zope.app.intid.IntIds'
-
-        response = self.publish(
-            self.basepath + '/contents.html',
-            basic='mgr:mgrpw',
-            form={'type_name': type_name,
-                  'new_value': 'mgr' })
-
-    def test(self):
-        response = self.publish(self.basepath + '/intid/@@index.html',
-                                basic='mgr:mgrpw')
-        self.assertEquals(response.getStatus(), 200)
-        # The utility registers in itself when it is being added
-        self.assert_(response.getBody().find('1 objects') > 0)
-        self.assert_('<a href="/++etc++site">/++etc++site</a>'
-                     not in response.getBody())
-
-        response = self.publish(self.basepath + '/intid/@@populate',
-                                basic='mgr:mgrpw')
-        self.assertEquals(response.getStatus(), 302)
-
-        response = self.publish(self.basepath
-                                + '/intid/@@index.html?testing=1',
-                                basic='mgr:mgrpw')
-        self.assertEquals(response.getStatus(), 200)
-        body = response.getBody()
-        self.assert_('3 objects' in body)
-        self.assert_('<a href="/++etc++site">/++etc++site</a>' in body)
-        self.checkForBrokenLinks(body, response.getPath(), basic='mgr:mgrpw')
-
-
 def test_suite():
     suite = unittest.TestSuite()
     suite.addTest(unittest.makeSuite(TestIntIds))
     suite.addTest(unittest.makeSuite(TestIntIds64))
     suite.addTest(unittest.makeSuite(TestSubscribers))
-    # Functional Tests
-    TestFunctionalIntIds.layer = IntIdLayer
-    suite.addTest(unittest.makeSuite(TestFunctionalIntIds))
     return suite
 
 if __name__ == '__main__':

Deleted: zope.intid/trunk/src/zope/intid/zope.app.intid-configure.zcml
===================================================================
--- zope.intid/trunk/src/zope/app/intid/zope.app.intid-configure.zcml	2009-01-31 18:56:38 UTC (rev 95784)
+++ zope.intid/trunk/src/zope/intid/zope.app.intid-configure.zcml	2009-01-31 19:22:33 UTC (rev 95786)
@@ -1 +0,0 @@
-<include package="zope.app.intid" />



More information about the Checkins mailing list