• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(1702)  |  Call(897)  |  Derive(0)  |  Import(805)
Issue a deprecation warning for Python 3.x related changes.

Warnings are omitted unless Python is started with the -3 option.

        def warnpy3k(message, category=None, stacklevel=1):
    """Issue a deprecation warning for Python 3.x related changes.

    Warnings are omitted unless Python is started with the -3 option.
    """
    if sys.py3kwarning:
        if category is None:
            category = DeprecationWarning
        warn(message, category, stacklevel+1)
        


src/i/r/ironruby-HEAD/External.LCA_RESTRICTED/Languages/IronPython/27/Lib/mimetools.py   ironruby(Download)
        filterwarnings("ignore", ".*rfc822 has been removed", DeprecationWarning)
    import rfc822
 
from warnings import warnpy3k
warnpy3k("in 3.x, mimetools has been removed in favor of the email package",
         stacklevel=2)
 

src/i/r/ironruby-HEAD/External.LCA_RESTRICTED/Languages/CPython/27/Lib/mimetools.py   ironruby(Download)
        filterwarnings("ignore", ".*rfc822 has been removed", DeprecationWarning)
    import rfc822
 
from warnings import warnpy3k
warnpy3k("in 3.x, mimetools has been removed in favor of the email package",
         stacklevel=2)
 

src/s/t/stackless-HEAD/Lib/mimetools.py   stackless(Download)
        filterwarnings("ignore", ".*rfc822 has been removed", DeprecationWarning)
    import rfc822
 
from warnings import warnpy3k
warnpy3k("in 3.x, mimetools has been removed in favor of the email package",
         stacklevel=2)
 

src/s/l/SlopPy-HEAD/Lib/mimetools.py   SlopPy(Download)
        filterwarnings("ignore", ".*rfc822 has been removed", DeprecationWarning)
    import rfc822
 
from warnings import warnpy3k
warnpy3k("in 3.x, mimetools has been removed in favor of the email package",
         stacklevel=2)
 

src/i/n/IncPy-HEAD/Lib/mimetools.py   IncPy(Download)
        filterwarnings("ignore", ".*rfc822 has been removed", DeprecationWarning)
    import rfc822
 
from warnings import warnpy3k
warnpy3k("in 3.x, mimetools has been removed in favor of the email package",
         stacklevel=2)
 

src/u/n/unladen-swallow-HEAD/Lib/mimetools.py   unladen-swallow(Download)
        filterwarnings("ignore", ".*rfc822 has been removed", DeprecationWarning)
    import rfc822
 
from warnings import warnpy3k
warnpy3k("in 3.x, mimetools has been removed in favor of the email package",
         stacklevel=2)
 

src/p/y/python2.6-HEAD/Lib/mimetools.py   python2.6(Download)
        filterwarnings("ignore", ".*rfc822 has been removed", DeprecationWarning)
    import rfc822
 
from warnings import warnpy3k
warnpy3k("in 3.x, mimetools has been removed in favor of the email package",
         stacklevel=2)
 

src/p/y/python2.6-cmake-HEAD/Lib/mimetools.py   python2.6-cmake(Download)
        filterwarnings("ignore", ".*rfc822 has been removed", DeprecationWarning)
    import rfc822
 
from warnings import warnpy3k
warnpy3k("in 3.x, mimetools has been removed in favor of the email package",
         stacklevel=2)
 

src/p/y/pyvm-HEAD/projects/python_in_a_can/trunk/win32/python-2.7/Lib/mimetools.py   pyvm(Download)
        filterwarnings("ignore", ".*rfc822 has been removed", DeprecationWarning)
    import rfc822
 
from warnings import warnpy3k
warnpy3k("in 3.x, mimetools has been removed in favor of the email package",
         stacklevel=2)
 

src/i/r/ironruby-HEAD/External.LCA_RESTRICTED/Languages/IronPython/27/Lib/ihooks.py   ironruby(Download)
would also do wise to install a different version of reload().
 
"""
from warnings import warnpy3k, warn
warnpy3k("the ihooks module has been removed in Python 3.0", stacklevel=2)
del warnpy3k
 

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next