[issue15616] logging.FileHandler not correctly created with PyYaml (unpickling problems?)

2012-08-30 Thread Vinay Sajip
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15616 ___ ___

[issue15616] logging.FileHandler not correctly created with PyYaml (unpickling problems?)

2012-08-11 Thread Jordi Puigsegur
Jordi Puigsegur added the comment: It looks like the change from old to new style classes in python could have triggered this issue. I've created an issue in PyYaml (http://pyyaml.org/ticket/283). Thanks again! -- status: open - pending ___

[issue15616] logging.FileHandler not correctly created with PyYaml (unpickling problems?)

2012-08-10 Thread Jordi Puigsegur
New submission from Jordi Puigsegur: logging.FileHandler and logging.RotatingFileHandler (haven't tried other handlers) do not get correctly initialized in python 2.7 when loaded using PyYaml. Therefore I suspect that there is some problem with the implementation of the pickle protocol of

[issue15616] logging.FileHandler not correctly created with PyYaml (unpickling problems?)

2012-08-10 Thread Jordi Puigsegur
Jordi Puigsegur added the comment: import logging import logging.handlers import yaml logger = logging.getLogger() # root logger # Option 1 - OK ##handler = logging.handlers.RotatingFileHandler(filename = test.log, maxBytes = 262144, backupCount = 3) # Option 2 - RotatingFileHandler fails

[issue15616] logging.FileHandler not correctly created with PyYaml (unpickling problems?)

2012-08-10 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15616 ___ ___

[issue15616] logging.FileHandler not correctly created with PyYaml (unpickling problems?)

2012-08-10 Thread Vinay Sajip
Vinay Sajip added the comment: The problem appears to be in PyYAML, not logging. Note the content of the attribute dictionaries in the following script: import logging import logging.handlers from pprint import pprint import yaml # Option 1 - OK h1 =

[issue15616] logging.FileHandler not correctly created with PyYaml (unpickling problems?)

2012-08-10 Thread Jordi Puigsegur
Jordi Puigsegur added the comment: Thanks for your answer. I am not sure it is a PyYaml bug. Did you notice that the same code works perfectly (with the same version of PyYaml) using python 2.6 and python 2.5? Could it be that the issue lies in some change in the way the pickle protocol is

[issue15616] logging.FileHandler not correctly created with PyYaml (unpickling problems?)

2012-08-10 Thread Jordi Puigsegur
Jordi Puigsegur added the comment: This is the output of your script when run in python 2.6 and the exact same PyYaml version: C:\test.py RotatingFileHandler using code: type 'instance' {'backupCount': 3, 'baseFilename': 'C:\\test.log', 'encoding': None, 'filters': [], 'formatter': None,

[issue15616] logging.FileHandler not correctly created with PyYaml (unpickling problems?)

2012-08-10 Thread Vinay Sajip
Vinay Sajip added the comment: You've only shown that the YAML loading produces the correct results on 2.6. Logging changed from old-style classes in 2.6 to new-style classes in 2.7. This may be what is causing PyYAML a problem, but AFAICT PyYAML should work with new-style classes. Perhaps