[pypy-svn] r75080 - pypy/branch/fast-forward/pypy/module/exceptions

benjamin at codespeak.net benjamin at codespeak.net
Thu Jun 3 22:46:52 CEST 2010


Author: benjamin
Date: Thu Jun  3 22:46:50 2010
New Revision: 75080

Modified:
   pypy/branch/fast-forward/pypy/module/exceptions/__init__.py
   pypy/branch/fast-forward/pypy/module/exceptions/interp_exceptions.py
Log:
add BytesWarning

Modified: pypy/branch/fast-forward/pypy/module/exceptions/__init__.py
==============================================================================
--- pypy/branch/fast-forward/pypy/module/exceptions/__init__.py	(original)
+++ pypy/branch/fast-forward/pypy/module/exceptions/__init__.py	Thu Jun  3 22:46:50 2010
@@ -9,6 +9,7 @@
         'AssertionError' : 'interp_exceptions.W_AssertionError',
         'AttributeError' : 'interp_exceptions.W_AttributeError',
         'BaseException' : 'interp_exceptions.W_BaseException',
+        'BytesWarning'  : 'interp_exceptions.W_BytesWarning',
         'DeprecationWarning' : 'interp_exceptions.W_DeprecationWarning',
         'EOFError' : 'interp_exceptions.W_EOFError',
         'EnvironmentError' : 'interp_exceptions.W_EnvironmentError',

Modified: pypy/branch/fast-forward/pypy/module/exceptions/interp_exceptions.py
==============================================================================
--- pypy/branch/fast-forward/pypy/module/exceptions/interp_exceptions.py	(original)
+++ pypy/branch/fast-forward/pypy/module/exceptions/interp_exceptions.py	Thu Jun  3 22:46:50 2010
@@ -60,6 +60,7 @@
       |    |         +-- UnicodeEncodeError
       |    |         +-- UnicodeTranslateError
       +-- Warning
+           +-- BytesWarning
            +-- DeprecationWarning
            +-- PendingDeprecationWarning
            +-- RuntimeWarning
@@ -423,6 +424,9 @@
     winerror = readwrite_attrproperty_w('w_winerror', W_WindowsError),
     )
 
+W_BytesWarning = _new_exception('BytesWarning', W_Warning,
+                                """Mixing bytes and unicode""")
+
 W_DeprecationWarning = _new_exception('DeprecationWarning', W_Warning,
                         """Base class for warnings about deprecated features.""")
 



More information about the Pypy-commit mailing list