[issue34999] Different behavior of copied loggers in 3.7

2018-10-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a consequence of implementing pickling for loggers in issue30520. It would be surprising if pickling/unpickling and deep copying preserve identity, but shallow copying creates a new object. -- nosy: +serhiy.storchaka

[issue34999] Different behavior of copied loggers in 3.7

2018-10-16 Thread Vinay Sajip
Vinay Sajip added the comment: This doesn't appear to be inherently a logging problem - it seems to be a change in how copy.copy() is working. If you update mocked_log to insert some statements showing the id of the loggers involved in the copy: def mocked_log(log_level): # Return a

[issue34999] Different behavior of copied loggers in 3.7

2018-10-16 Thread Ned Deily
Change by Ned Deily : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34999] Different behavior of copied loggers in 3.7

2018-10-16 Thread sebix
New submission from sebix : For the unittests of project I mock the function returning the logger. The code to tests can re-initialize the logger because of updated configuration (It's a deamon), so it needs to do that correctly and I test if it works. By mocking the function returning I can