[issue17453] logging.config.fileConfig error
Changes by Łukasz Langa luk...@langa.pl: -- resolution: - works for me stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17453 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17453] logging.config.fileConfig error
Hervé Coatanhay added the comment: Yes it does. I fixed my configuration generation and everything is running as expected. Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17453 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17453] logging.config.fileConfig error
Łukasz Langa added the comment: Treating as empty values was a bug in configparser pre 3.2 (it made it impossible to store as a value). Simply change [section] option = to [section] option = Does that solve your problem? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17453 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17453] logging.config.fileConfig error
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- nosy: -vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17453 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17453] logging.config.fileConfig error
Éric Araujo added the comment: Unless the 2.7 configparser docs mention that two quotes are parsed as an empty string, I think this is an implementation accident, should not be relied upon and 3.x should not be changed to match it. Values in configparser files are not Python strings: we write root, not root. -- nosy: +eric.araujo versions: -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17453 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17453] logging.config.fileConfig error
Vinay Sajip added the comment: Removing myself from nosy, as it appears to be a ConfigParser issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17453 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17453] logging.config.fileConfig error
Changes by Łukasz Langa luk...@langa.pl: -- assignee: - lukasz.langa versions: +Python 3.2, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17453 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17453] logging.config.fileConfig error
New submission from Hervé Coatanhay: In python 2.7 this code works: import logging.config import StringIO a=[loggers] ... keys = root ... [logger_root] ... handlers = ... [formatters] ... keys = ... [handlers] ... keys = ... logging.config.fileConfig(StringIO.StringIO(a)) whereas in python 3.3 it raises an exception: import logging.config import io a=[loggers] ... keys = root ... [logger_root] ... handlers = ... [formatters] ... keys = ... [handlers] ... keys = ... logging.config.fileConfig(io.StringIO(a)) Traceback (most recent call last): File stdin, line 1, in module File /opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/logging/config.py, line 70, in fileConfig formatters = _create_formatters(cp) File /opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/logging/config.py, line 114, in _create_formatters class_name = cp[sectname].get(class) File /opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/configparser.py, line 942, in __getitem__ raise KeyError(key) KeyError: 'formatter_' -- components: Library (Lib) messages: 184435 nosy: Alzakath priority: normal severity: normal status: open title: logging.config.fileConfig error type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17453 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17453] logging.config.fileConfig error
Changes by Ned Deily n...@acm.org: -- nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17453 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17453] logging.config.fileConfig error
Vinay Sajip added the comment: What is your intent in setting up a configuration like that? How do you expect it to behave? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17453 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17453] logging.config.fileConfig error
Radu Voicilas added the comment: Even though it seems kind of weird to have all those keys set to the empty string, I still think that configparser should handle this case, which might be relevant for some other uses cases (not logging configs). The attached patch should take care of this. -- keywords: +patch nosy: +raduv Added file: http://bugs.python.org/file29466/issue17453.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17453 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17453] logging.config.fileConfig error
Hervé Coatanhay added the comment: My complete configuration is this: [loggers] keys = app_admin,root,app_test_py3 [logger_root] handlers = [formatters] keys = app_admin,app_test_py3 [handlers] keys = app_admin,app_test_py3 [logger_app_admin] propagate = 1 handlers = app_admin qualname = nagare.application.admin level = INFO [handler_app_admin] formatter = app_admin class = StreamHandler args = (sys.stderr,) [formatter_app_admin] format = %(asctime)s - %(name)s - %(levelname)s - %(message)s [logger_app_test_py3] propagate = 1 handlers = app_test_py3 qualname = nagare.application.test_py3 level = INFO [formatter_app_test_py3] format = %(asctime)s - %(name)s - %(levelname)s - %(message)s [handler_app_test_py3] formatter = app_test_py3 class = StreamHandler args = (sys.stderr,) I wanted to provided a non-working configuration as small as possible, that was accepted by python 2.7. It seems you are right there is a problem with this configuration as it shuts down logging in python 2.7. It looks like i have a bug in my configuration generation. By the way the patch restores python 2.7 behavior as expected, thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17453 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17453] logging.config.fileConfig error
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +lukasz.langa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17453 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com