--- a/appobject.py Thu Mar 17 12:03:50 2011 +0100
+++ b/appobject.py Thu Mar 17 12:14:58 2011 +0100
@@ -576,4 +576,8 @@
def propval(self, propid):
return self._cw.property_value(self._cwpropkey(propid))
+ # these are overridden by set_log_methods below
+ # only defining here to prevent pylint from complaining
+ info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None
+
set_log_methods(AppObject, getLogger('cubicweb.appobject'))
--- a/cwconfig.py Thu Mar 17 12:03:50 2011 +0100
+++ b/cwconfig.py Thu Mar 17 12:14:58 2011 +0100
@@ -1182,6 +1182,13 @@
SMTP_LOCK.release()
return True
+ # these are overridden by set_log_methods below
+ # only defining here to prevent pylint from complaining
+ @classmethod
+ def debug(cls, msg, *a, **kw):
+ pass
+ info = warning = error = critical = exception = debug
+
set_log_methods(CubicWebNoAppConfiguration,
logging.getLogger('cubicweb.configuration'))
--- a/dbapi.py Thu Mar 17 12:03:50 2011 +0100
+++ b/dbapi.py Thu Mar 17 12:14:58 2011 +0100
@@ -376,6 +376,9 @@
def del_session_data(self, key):
self.session.data.pop(key, None)
+ # these are overridden by set_log_methods below
+ # only defining here to prevent pylint from complaining
+ info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None
set_log_methods(DBAPIRequest, getLogger('cubicweb.dbapi'))
--- a/doc/book/en/annexes/rql/debugging.rst Thu Mar 17 12:03:50 2011 +0100
+++ b/doc/book/en/annexes/rql/debugging.rst Thu Mar 17 12:14:58 2011 +0100
@@ -33,7 +33,7 @@
Enable verbose output
~~~~~~~~~~~~~~~~~~~~~
-It may be interested to enable a verboser output to debug your RQL statements:
+To debug your RQL statements, it can be useful to enable a verbose output:
.. sourcecode:: python
--- a/migration.py Thu Mar 17 12:03:50 2011 +0100
+++ b/migration.py Thu Mar 17 12:14:58 2011 +0100
@@ -434,6 +434,9 @@
if exists(newconfig):
os.unlink(newconfig)
+ # these are overridden by set_log_methods below
+ # only defining here to prevent pylint from complaining
+ info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None
from logging import getLogger
from cubicweb import set_log_methods
--- a/rtags.py Thu Mar 17 12:03:50 2011 +0100
+++ b/rtags.py Thu Mar 17 12:14:58 2011 +0100
@@ -160,6 +160,9 @@
return self.get(etype, rtype, ttype, role)
return self.get(ttype, rtype, etype, role)
+ # these are overridden by set_log_methods below
+ # only defining here to prevent pylint from complaining
+ info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None
class RelationTagsSet(RelationTags):
--- a/schema.py Thu Mar 17 12:03:50 2011 +0100
+++ b/schema.py Thu Mar 17 12:14:58 2011 +0100
@@ -934,6 +934,10 @@
def minimal_rql(self):
return 'Any %s WHERE %s' % (self.mainvars, self.expression)
+ # these are overridden by set_log_methods below
+ # only defining here to prevent pylint from complaining
+ info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None
+
class ERQLExpression(RQLExpression):
def __init__(self, expression, mainvars=None, eid=None):
@@ -1094,6 +1098,9 @@
"""called when a file without handler associated has been found"""
self.warning('ignoring file %r', filepath)
+ # these are overridden by set_log_methods below
+ # only defining here to prevent pylint from complaining
+ info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None
class CubicWebSchemaLoader(BootstrapSchemaLoader):
"""cubicweb specific schema loader, automatically adding metadata to the
@@ -1131,6 +1138,9 @@
self.info('loading %s', filepath)
self.handle_file(filepath)
+ # these are overridden by set_log_methods below
+ # only defining here to prevent pylint from complaining
+ info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None
set_log_methods(CubicWebSchemaLoader, getLogger('cubicweb.schemaloader'))
set_log_methods(BootstrapSchemaLoader, getLogger('cubicweb.bootstrapschemaloader'))
--- a/server/__init__.py Thu Mar 17 12:03:50 2011 +0100
+++ b/server/__init__.py Thu Mar 17 12:14:58 2011 +0100
@@ -62,9 +62,9 @@
DEBUG |= debugmode
class debugged(object):
- """repository debugging context manager / decorator
+ """Context manager and decorator to help debug the repository.
- Can be used either as a context manager:
+ It can be used either as a context manager:
>>> with debugged(server.DBG_RQL | server.DBG_REPO):
... # some code in which you want to debug repository activity,
@@ -77,8 +77,8 @@
... # some code in which you want to debug repository activity,
... # seing information about RQL being executed an repository events
- debug mode will be reseted at its original value when leaving the "with"
- block or the decorated function
+ The debug mode will be reset to its original value when leaving the "with"
+ block or the decorated function.
"""
def __init__(self, debugmode):
self.debugmode = debugmode
--- a/server/hook.py Thu Mar 17 12:03:50 2011 +0100
+++ b/server/hook.py Thu Mar 17 12:14:58 2011 +0100
@@ -454,6 +454,9 @@
order = 0
# XXX deprecated
enabled = True
+ # stop pylint from complaining about missing attributes in Hooks classes
+ eidfrom = eidto = entity = rtype = None
+
@classmethod
def check_events(cls):
@@ -757,6 +760,10 @@
def config(self):
return self.session.repo.config
+ # these are overridden by set_log_methods below
+ # only defining here to prevent pylint from complaining
+ info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None
+
set_log_methods(Operation, getLogger('cubicweb.session'))
def _container_add(container, value):
--- a/server/querier.py Thu Mar 17 12:03:50 2011 +0100
+++ b/server/querier.py Thu Mar 17 12:14:58 2011 +0100
@@ -747,6 +747,10 @@
# return a result set object
return ResultSet(results, rql, args, descr, orig_rqlst)
+ # these are overridden by set_log_methods below
+ # only defining here to prevent pylint from complaining
+ info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None
+
from logging import getLogger
from cubicweb import set_log_methods
LOGGER = getLogger('cubicweb.querier')
--- a/server/repository.py Thu Mar 17 12:03:50 2011 +0100
+++ b/server/repository.py Thu Mar 17 12:14:58 2011 +0100
@@ -1471,6 +1471,9 @@
if not source is self.system_source
and source.support_relation(rtype))
+ # these are overridden by set_log_methods below
+ # only defining here to prevent pylint from complaining
+ info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None
def pyro_unregister(config):
"""unregister the repository from the pyro name server"""
--- a/server/session.py Thu Mar 17 12:03:50 2011 +0100
+++ b/server/session.py Thu Mar 17 12:14:58 2011 +0100
@@ -1032,6 +1032,10 @@
"""return a result set for the given eid"""
return self.entity_from_eid(eid)
+ # these are overridden by set_log_methods below
+ # only defining here to prevent pylint from complaining
+ info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None
+
class InternalSession(Session):
"""special session created internaly by the repository"""
--- a/server/sqlutils.py Thu Mar 17 12:03:50 2011 +0100
+++ b/server/sqlutils.py Thu Mar 17 12:14:58 2011 +0100
@@ -284,6 +284,9 @@
attrs[SQL_PREFIX+'eid'] = entity.eid
return attrs
+ # these are overridden by set_log_methods below
+ # only defining here to prevent pylint from complaining
+ info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None
from logging import getLogger
from cubicweb import set_log_methods
--- a/vregistry.py Thu Mar 17 12:03:50 2011 +0100
+++ b/vregistry.py Thu Mar 17 12:14:58 2011 +0100
@@ -237,6 +237,10 @@
select_best = deprecated('[3.6] select_best is now private')(_select_best)
+ # these are overridden by set_log_methods below
+ # only defining here to prevent pylint from complaining
+ info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None
+
class VRegistry(dict):
"""class responsible to register, propose and select the various
@@ -517,6 +521,9 @@
raise
self.exception('appobject %s registration failed: %s',
appobjectcls, ex)
+ # these are overridden by set_log_methods below
+ # only defining here to prevent pylint from complaining
+ info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None
# init logging
--- a/web/application.py Thu Mar 17 12:03:50 2011 +0100
+++ b/web/application.py Thu Mar 17 12:14:58 2011 +0100
@@ -234,6 +234,9 @@
req.remove_cookie(req.get_cookie(), sessioncookie)
raise LogOut(url=goto_url)
+ # these are overridden by set_log_methods below
+ # only defining here to prevent pylint from complaining
+ info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None
class CubicWebPublisher(object):
"""the publisher is a singleton hold by the web frontend, and is responsible
@@ -458,6 +461,9 @@
template = 'main-template'
return template
+ # these are overridden by set_log_methods below
+ # only defining here to prevent pylint from complaining
+ info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None
set_log_methods(CubicWebPublisher, LOGGER)
set_log_methods(CookieSessionHandler, LOGGER)
--- a/web/propertysheet.py Thu Mar 17 12:03:50 2011 +0100
+++ b/web/propertysheet.py Thu Mar 17 12:14:58 2011 +0100
@@ -115,6 +115,10 @@
def compile(self, content):
return self._percent_rgx.sub('%%', content) % self
+ # these are overridden by set_log_methods below
+ # only defining here to prevent pylint from complaining
+ info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None
+
from cubicweb.web import LOGGER
from logilab.common.logging_ext import set_log_methods
set_log_methods(PropertySheet, LOGGER)
--- a/wsgi/handler.py Thu Mar 17 12:03:50 2011 +0100
+++ b/wsgi/handler.py Thu Mar 17 12:14:58 2011 +0100
@@ -193,6 +193,10 @@
content = self.appli.need_login_content(req)
return WSGIResponse(code, req, content)
+ # these are overridden by set_log_methods below
+ # only defining here to prevent pylint from complaining
+ info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None
+
from logging import getLogger
from cubicweb import set_log_methods