__init__.py
changeset 8748 f5027f8d2478
parent 8696 0bb18407c053
child 9046 6fb3f0106301
child 9299 c5eed908117d
equal deleted inserted replaced
8747:c0d4244e5abc 8748:f5027f8d2478
    36 CW_SOFTWARE_ROOT = __path__[0]
    36 CW_SOFTWARE_ROOT = __path__[0]
    37 
    37 
    38 import sys, os, logging
    38 import sys, os, logging
    39 from StringIO import StringIO
    39 from StringIO import StringIO
    40 
    40 
       
    41 from logilab.common.deprecation import deprecated
    41 from logilab.common.logging_ext import set_log_methods
    42 from logilab.common.logging_ext import set_log_methods
    42 from yams.constraints import BASE_CONVERTERS
    43 from yams.constraints import BASE_CONVERTERS
    43 
       
    44 
    44 
    45 if os.environ.get('APYCOT_ROOT'):
    45 if os.environ.get('APYCOT_ROOT'):
    46     logging.basicConfig(level=logging.CRITICAL)
    46     logging.basicConfig(level=logging.CRITICAL)
    47 else:
    47 else:
    48     logging.basicConfig()
    48     logging.basicConfig()
    55 # make all exceptions accessible from the package
    55 # make all exceptions accessible from the package
    56 from cubicweb._exceptions import *
    56 from cubicweb._exceptions import *
    57 from logilab.common.registry import ObjectNotFound, NoSelectableObject, RegistryNotFound
    57 from logilab.common.registry import ObjectNotFound, NoSelectableObject, RegistryNotFound
    58 
    58 
    59 # convert eid to the right type, raise ValueError if it's not a valid eid
    59 # convert eid to the right type, raise ValueError if it's not a valid eid
    60 typed_eid = int
    60 @deprecated('[3.17] typed_eid() was removed. replace it with int() when needed.')
    61 
    61 def typed_eid(eid):
       
    62     return int(eid)
    62 
    63 
    63 #def log_thread(f, w, a):
    64 #def log_thread(f, w, a):
    64 #    print f.f_code.co_filename, f.f_code.co_name
    65 #    print f.f_code.co_filename, f.f_code.co_name
    65 #import threading
    66 #import threading
    66 #threading.settrace(log_thread)
    67 #threading.settrace(log_thread)