[Checkins] SVN: zope.exceptions/trunk/ PEP8 cleanup and removed obsolete build infrastructure files.

Hanno Schlichting hannosch at hannosch.eu
Tue Jul 6 13:13:55 EDT 2010


Log message for revision 114247:
  PEP8 cleanup and removed obsolete build infrastructure files.
  

Changed:
  U   zope.exceptions/trunk/CHANGES.txt
  D   zope.exceptions/trunk/setup.cfg
  U   zope.exceptions/trunk/setup.py
  D   zope.exceptions/trunk/src/zope/exceptions/DEPENDENCIES.cfg
  U   zope.exceptions/trunk/src/zope/exceptions/exceptionformatter.py
  U   zope.exceptions/trunk/src/zope/exceptions/interfaces.py
  U   zope.exceptions/trunk/src/zope/exceptions/log.py
  U   zope.exceptions/trunk/src/zope/exceptions/tests/__init__.py
  U   zope.exceptions/trunk/src/zope/exceptions/tests/test_exceptionformatter.py

-=-
Modified: zope.exceptions/trunk/CHANGES.txt
===================================================================
--- zope.exceptions/trunk/CHANGES.txt	2010-07-06 17:13:08 UTC (rev 114246)
+++ zope.exceptions/trunk/CHANGES.txt	2010-07-06 17:13:55 UTC (rev 114247)
@@ -2,6 +2,12 @@
 Changes
 =======
 
+3.6.1 (unreleased)
+------------------
+
+- PEP8 cleanup and removed obsolete build infrastructure files.
+
+
 3.6.0 (2010-05-02)
 ------------------
 

Deleted: zope.exceptions/trunk/setup.cfg
===================================================================
--- zope.exceptions/trunk/setup.cfg	2010-07-06 17:13:08 UTC (rev 114246)
+++ zope.exceptions/trunk/setup.cfg	2010-07-06 17:13:55 UTC (rev 114247)
@@ -1,2 +0,0 @@
-[egg_info]
-tag_svn_revision = true

Modified: zope.exceptions/trunk/setup.py
===================================================================
--- zope.exceptions/trunk/setup.py	2010-07-06 17:13:08 UTC (rev 114246)
+++ zope.exceptions/trunk/setup.py	2010-07-06 17:13:55 UTC (rev 114247)
@@ -21,7 +21,7 @@
 import os
 from setuptools import setup, find_packages
 import sys
-if sys.version_info < (3,):
+if sys.version_info < (3, ):
     extra = {}
 else:
     # Python 3 support:
@@ -31,20 +31,19 @@
         use_2to3_fixers = ['zope.fixers'],
     )
 
+
 def read(*rnames):
     return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
 
+
 setup(name='zope.exceptions',
       version = '3.6.1dev',
       author='Zope Foundation and Contributors',
       author_email='zope-dev at zope.org',
       description='Zope Exceptions',
-      long_description=(
-          read('README.txt')
-          + '\n\n' +
-          read('CHANGES.txt')
-          ),
-      keywords = 'zope3 exceptions',
+      long_description=(read('README.txt') + '\n\n' +
+                        read('CHANGES.txt')),
+      keywords = 'zope exceptions',
       classifiers = [
           'Development Status :: 5 - Production/Stable',
           'Environment :: Web Environment',
@@ -71,5 +70,4 @@
       test_suite = 'zope.exceptions.tests',
       include_package_data = True,
       zip_safe = False,
-      **extra
-      )
+      **extra)

Deleted: zope.exceptions/trunk/src/zope/exceptions/DEPENDENCIES.cfg
===================================================================
--- zope.exceptions/trunk/src/zope/exceptions/DEPENDENCIES.cfg	2010-07-06 17:13:08 UTC (rev 114246)
+++ zope.exceptions/trunk/src/zope/exceptions/DEPENDENCIES.cfg	2010-07-06 17:13:55 UTC (rev 114247)
@@ -1,2 +0,0 @@
-zope.interface
-zope.testing

Modified: zope.exceptions/trunk/src/zope/exceptions/exceptionformatter.py
===================================================================
--- zope.exceptions/trunk/src/zope/exceptions/exceptionformatter.py	2010-07-06 17:13:08 UTC (rev 114246)
+++ zope.exceptions/trunk/src/zope/exceptions/exceptionformatter.py	2010-07-06 17:13:55 UTC (rev 114247)
@@ -21,6 +21,7 @@
 
 DEBUG_EXCEPTION_FORMATTER = 1
 
+
 class TextExceptionFormatter(object):
 
     line_sep = '\n'
@@ -90,7 +91,6 @@
                     result.append(extra)
             except:
                 if DEBUG_EXCEPTION_FORMATTER:
-                    import traceback
                     traceback.print_exc()
                 # else just swallow the exception.
         return result

Modified: zope.exceptions/trunk/src/zope/exceptions/interfaces.py
===================================================================
--- zope.exceptions/trunk/src/zope/exceptions/interfaces.py	2010-07-06 17:13:08 UTC (rev 114246)
+++ zope.exceptions/trunk/src/zope/exceptions/interfaces.py	2010-07-06 17:13:55 UTC (rev 114247)
@@ -30,17 +30,21 @@
 """
 from zope.interface import Interface, Attribute, implements
 
+
 class IDuplicationError(Interface):
     pass
 
+
 class DuplicationError(Exception):
     """A duplicate registration was attempted"""
     implements(IDuplicationError)
 
+
 class IUserError(Interface):
     """User error exceptions
     """
 
+
 class UserError(Exception):
     """User errors
 
@@ -49,6 +53,7 @@
     """
     implements(IUserError)
 
+
 class ITracebackSupplement(Interface):
     """Provides valuable information to supplement an exception traceback.
 
@@ -64,8 +69,7 @@
         Normally this generates a URL in the traceback that the user
         can visit to manage the object.  Set to None if unknown or
         not available.
-        """
-        )
+        """)
 
     line = Attribute(
         'line',
@@ -73,8 +77,7 @@
         occurred.
 
         Set to 0 or None if the line number is unknown.
-        """
-        )
+        """)
 
     column = Attribute(
         'column',
@@ -82,16 +85,14 @@
         occurred.
 
         Set to None if the column number is unknown.
-        """
-        )
+        """)
 
     expression = Attribute(
         'expression',
         """Optional.  Set to the expression that was being evaluated.
 
         Set to None if not available or not applicable.
-        """
-        )
+        """)
 
     warnings = Attribute(
         'warnings',
@@ -99,10 +100,8 @@
 
         Set to None if not available, not applicable, or if the exception
         itself provides enough information.
-        """
-        )
+        """)
 
-
     def getInfo(as_html=0):
         """Optional.  Returns a string containing any other useful info.
 

Modified: zope.exceptions/trunk/src/zope/exceptions/log.py
===================================================================
--- zope.exceptions/trunk/src/zope/exceptions/log.py	2010-07-06 17:13:08 UTC (rev 114246)
+++ zope.exceptions/trunk/src/zope/exceptions/log.py	2010-07-06 17:13:55 UTC (rev 114247)
@@ -16,8 +16,10 @@
 
 import logging
 import cStringIO
+
 from zope.exceptions.exceptionformatter import print_exception
 
+
 class Formatter(logging.Formatter):
 
     def formatException(self, ei):

Modified: zope.exceptions/trunk/src/zope/exceptions/tests/__init__.py
===================================================================
--- zope.exceptions/trunk/src/zope/exceptions/tests/__init__.py	2010-07-06 17:13:08 UTC (rev 114246)
+++ zope.exceptions/trunk/src/zope/exceptions/tests/__init__.py	2010-07-06 17:13:55 UTC (rev 114247)
@@ -1,2 +1 @@
-#
-# This file is necessary to make this directory a package.
+#
\ No newline at end of file

Modified: zope.exceptions/trunk/src/zope/exceptions/tests/test_exceptionformatter.py
===================================================================
--- zope.exceptions/trunk/src/zope/exceptions/tests/test_exceptionformatter.py	2010-07-06 17:13:08 UTC (rev 114246)
+++ zope.exceptions/trunk/src/zope/exceptions/tests/test_exceptionformatter.py	2010-07-06 17:13:55 UTC (rev 114247)
@@ -13,11 +13,13 @@
 ##############################################################################
 """ExceptionFormatter tests.
 """
+
 import sys
-from unittest import TestCase, main, makeSuite
+from unittest import TestCase, makeSuite
 
 from zope.exceptions.exceptionformatter import format_exception
 
+
 def tb(as_html=0):
     t, v, b = sys.exc_info()
     try:
@@ -30,7 +32,6 @@
     pass
 
 
-
 class TestingTracebackSupplement(object):
 
     source_url = '/somepath'
@@ -42,7 +43,6 @@
         self.expression = expression
 
 
-
 class Test(TestCase):
 
     def testBasicNamesText(self, as_html=0):
@@ -131,8 +131,10 @@
             self.fail('no exception occurred')
 
     def testQuoteLastLine(self):
-        class C(object): pass
-        try: raise TypeError(C())
+        class C(object):
+            pass
+        try:
+            raise TypeError(C())
         except:
             s = tb(1)
         else:
@@ -143,7 +145,7 @@
     def testMultilineException(self):
         try:
             exec 'syntax error'
-        except:
+        except Exception:
             s = tb()
         # Traceback (most recent call last):
         #   Module zope.exceptions.tests.test_exceptionformatter, line ??, in testMultilineException
@@ -160,6 +162,3 @@
 
 def test_suite():
     return makeSuite(Test)
-
-if __name__=='__main__':
-    main(defaultTest='test_suite')



More information about the checkins mailing list