[Checkins] SVN: zope.app.intid/trunk/ Get ready for release.

Stephan Richter srichter at cosmos.phy.tufts.edu
Wed Oct 24 20:03:16 EDT 2007


Log message for revision 81076:
  Get ready for release.
  

Changed:
  A   zope.app.intid/trunk/CHANGES.txt
  U   zope.app.intid/trunk/README.txt
  U   zope.app.intid/trunk/buildout.cfg
  D   zope.app.intid/trunk/setup.cfg
  U   zope.app.intid/trunk/setup.py
  _U  zope.app.intid/trunk/src/
  D   zope.app.intid/trunk/src/zope/app/intid/ftests.py
  U   zope.app.intid/trunk/src/zope/app/intid/tests.py

-=-
Added: zope.app.intid/trunk/CHANGES.txt
===================================================================
--- zope.app.intid/trunk/CHANGES.txt	                        (rev 0)
+++ zope.app.intid/trunk/CHANGES.txt	2007-10-25 00:03:15 UTC (rev 81076)
@@ -0,0 +1,8 @@
+=======
+CHANGES
+=======
+
+3.4.0 (2007-10-24)
+------------------
+
+- Initial release independent of the main Zope tree.


Property changes on: zope.app.intid/trunk/CHANGES.txt
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: zope.app.intid/trunk/README.txt
===================================================================
--- zope.app.intid/trunk/README.txt	2007-10-24 23:23:26 UTC (rev 81075)
+++ zope.app.intid/trunk/README.txt	2007-10-25 00:03:15 UTC (rev 81076)
@@ -1,7 +1,4 @@
-zope.app.intid Package Readme
-=============================
-
-Overview
---------
-
-
+This package provides an API to create integer ids for any object. Later
+objects can be looked up by their id as well. This functionality is commonly
+used in situations where dealing with objects is undesirably, such as in
+search indices or any code that needs an easy hash of an object.

Modified: zope.app.intid/trunk/buildout.cfg
===================================================================
--- zope.app.intid/trunk/buildout.cfg	2007-10-24 23:23:26 UTC (rev 81075)
+++ zope.app.intid/trunk/buildout.cfg	2007-10-25 00:03:15 UTC (rev 81076)
@@ -1,9 +1,7 @@
 [buildout]
 develop = .
 parts = test
-find-links = http://download.zope.org/distribution/
 
 [test]
 recipe = zc.recipe.testrunner
-defaults = ['--tests-pattern', '^f?tests$']
 eggs = zope.app.intid [test]

Deleted: zope.app.intid/trunk/setup.cfg
===================================================================
--- zope.app.intid/trunk/setup.cfg	2007-10-24 23:23:26 UTC (rev 81075)
+++ zope.app.intid/trunk/setup.cfg	2007-10-25 00:03:15 UTC (rev 81076)
@@ -1,2 +0,0 @@
-[egg_info]
-tag_svn_revision = 1
\ No newline at end of file

Modified: zope.app.intid/trunk/setup.py
===================================================================
--- zope.app.intid/trunk/setup.py	2007-10-24 23:23:26 UTC (rev 81075)
+++ zope.app.intid/trunk/setup.py	2007-10-25 00:03:15 UTC (rev 81076)
@@ -15,26 +15,43 @@
 
 $Id$
 """
-
 import os
-
 from setuptools import setup, find_packages
 
+def read(*rnames):
+    return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+
 setup(name = 'zope.app.intid',
-      version = '3.4.0a2',
-      url = 'http://svn.zope.org/zope.app.intid',
-      license = 'ZPL 2.1',
-      description = 'Zope intid',
-      author = 'Zope Corporation and Contributors',
-      author_email = 'zope3-dev at zope.org',
-      long_description = "",
-
-      packages = find_packages('src'),
+      version = '3.4.0',
+      author='Zope Corporation and Contributors',
+      author_email='zope3-dev at zope.org',
+      description='Integer Id Utility',
+      long_description=(
+          read('README.txt')
+          + '\n\n' +
+          read('CHANGES.txt')
+          ),
+      keywords = "zope3 integer id utility",
+      classifiers = [
+          'Development Status :: 5 - Production/Stable',
+          'Environment :: Web Environment',
+          'Intended Audience :: Developers',
+          'License :: OSI Approved :: Zope Public License',
+          'Programming Language :: Python',
+          'Natural Language :: English',
+          'Operating System :: OS Independent',
+          'Topic :: Internet :: WWW/HTTP',
+          'Framework :: Zope3'],
+      url='http://cheeseshop.python.org/pypi/zope.app.intid',
+      license='ZPL 2.1',
+      packages=find_packages('src'),
       package_dir = {'': 'src'},
-
-      namespace_packages = ['zope', 'zope.app'],
+      namespace_packages=['zope', 'zope.app'],
+      extras_require = dict(test=['zope.app.testing',
+                                  'zope.app.securitypolicy',
+                                  'zope.app.zcmlfiles']),
       install_requires = ['setuptools',
-                          'ZODB3 >=3.8.0a1.dev-r74780',
+                          'ZODB3',
                           'zope.app.component',
                           'zope.app.container',
                           'zope.app.folder',
@@ -47,10 +64,6 @@
                           'zope.location',
                           'zope.security',
                           ],
-      extras_require = dict(test=['zope.app.testing',
-                                  'zope.app.securitypolicy',
-                                  'zope.app.zcmlfiles']),
       include_package_data = True,
-
       zip_safe = False,
       )


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


Deleted: zope.app.intid/trunk/src/zope/app/intid/ftests.py
===================================================================
--- zope.app.intid/trunk/src/zope/app/intid/ftests.py	2007-10-24 23:23:26 UTC (rev 81075)
+++ zope.app.intid/trunk/src/zope/app/intid/ftests.py	2007-10-25 00:03:15 UTC (rev 81076)
@@ -1,89 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2001, 2002 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.
-#
-##############################################################################
-"""Functional tests for the unique id utility.
-
-$Id$
-"""
-import unittest
-import re
-from transaction import commit
-
-from zope.app import zapi
-from zope.app.testing import ztapi, setup
-from zope.app.testing.functional import BrowserTestCase
-from zope.app.intid.testing import IntIdLayer
-
-class TestIntIds(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 = zapi.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' })
-
-#        root = self.getRootFolder()
-#        default = zapi.traverse(root, '/++etc++site/default')
-#        rm = default.getRegistrationManager()
-#        registration = UtilityRegistration(
-#            'cwm', IIntIds, zapi.traverse(self.basepath+'/intid'))
-#        pd_id = rm.addRegistration(registration)
-#        zapi.traverse(rm, pd_id).status = ActiveStatus
-
-    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()
-    TestIntIds.layer = IntIdLayer
-    suite.addTest(unittest.makeSuite(TestIntIds))
-    return suite
-
-
-if __name__ == '__main__':
-    unittest.main()

Modified: zope.app.intid/trunk/src/zope/app/intid/tests.py
===================================================================
--- zope.app.intid/trunk/src/zope/app/intid/tests.py	2007-10-24 23:23:26 UTC (rev 81075)
+++ zope.app.intid/trunk/src/zope/app/intid/tests.py	2007-10-25 00:03:15 UTC (rev 81076)
@@ -15,12 +15,13 @@
 
 $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
@@ -33,11 +34,13 @@
 from zope.app import zapi
 from zope.app.component.hooks import setSite
 
+from zope.app.intid import IntIds
 from zope.app.intid.interfaces import IIntIds
-from zope.app.intid import IntIds
+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
 
 
 class P(Persistent):
@@ -51,7 +54,7 @@
         return self
 
     database_name = 'ConnectionStub'
-    
+
     def add(self, ob):
         ob._p_jar = self
         ob._p_oid = self.next
@@ -88,7 +91,7 @@
     def test(self):
         u = self.createIntIds()
         obj = P()
-        
+
         obj._p_jar = ConnectionStub()
 
         self.assertRaises(KeyError, u.getId, obj)
@@ -255,11 +258,60 @@
         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 = zapi.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__':



More information about the Checkins mailing list