[issue27904] Let logging format more messages on demand

2016-08-31 Thread SilentGhost

Changes by SilentGhost :


--
stage: patch review -> resolved

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27904] Let logging format more messages on demand

2016-08-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5f6dac170b9b by R David Murray in branch 'default':
#27904: fix distutils tests.
https://hg.python.org/cpython/rev/5f6dac170b9b

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27904] Let logging format more messages on demand

2016-08-31 Thread R. David Murray

R. David Murray added the comment:

Thanks, Ville.

--
nosy: +r.david.murray
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27904] Let logging format more messages on demand

2016-08-31 Thread Ville Skyttä

Ville Skyttä added the comment:

Here's a patch that fixes the tests.

--
Added file: http://bugs.python.org/file44298/logging-regressions.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27904] Let logging format more messages on demand

2016-08-31 Thread koobs

Changes by koobs :


--
nosy: +koobs

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27904] Let logging format more messages on demand

2016-08-31 Thread SilentGhost

Changes by SilentGhost :


--
resolution: fixed -> 
stage: resolved -> patch review
status: closed -> open
type: performance -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27904] Let logging format more messages on demand

2016-08-31 Thread Xiang Zhang

Xiang Zhang added the comment:

Vinay, this patch introduces regressions.

You can either revert this part:

--- a/Lib/distutils/cmd.py
+++ b/Lib/distutils/cmd.py
@@ -329,8 +329,7 @@ class Command:
 # -- External world manipulation ---

 def warn(self, msg):
-log.warn("warning: %s: %s\n" %
-(self.get_command_name(), msg))
+log.warn("warning: %s: %s\n", self.get_command_name(), msg)

 def execute(self, func, args, msg=None, level=1):
 util.execute(func, args, msg, dry_run=self.dry_run)

or change the test suites to:

diff -r 1340e298aa7e Lib/distutils/tests/test_build_py.py
--- a/Lib/distutils/tests/test_build_py.py  Wed Aug 31 08:22:29 2016 +0100
+++ b/Lib/distutils/tests/test_build_py.py  Wed Aug 31 16:59:27 2016 +0800
@@ -168,7 +168,8 @@
 finally:
 sys.dont_write_bytecode = old_dont_write_bytecode
 
-self.assertIn('byte-compiling is disabled', self.logs[0][1])
+self.assertIn('byte-compiling is disabled',
+  self.logs[0][1] % self.logs[0][2])
 
 
 def test_suite():
diff -r 1340e298aa7e Lib/distutils/tests/test_install_lib.py
--- a/Lib/distutils/tests/test_install_lib.py   Wed Aug 31 08:22:29 2016 +0100
+++ b/Lib/distutils/tests/test_install_lib.py   Wed Aug 31 16:59:27 2016 +0800
@@ -104,7 +104,8 @@
 finally:
 sys.dont_write_bytecode = old_dont_write_bytecode
 
-self.assertIn('byte-compiling is disabled', self.logs[0][1])
+self.assertIn('byte-compiling is disabled',
+  self.logs[0][1] % self.logs[0][2])
 
 
 def test_suite():

--
nosy: +xiang.zhang

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27904] Let logging format more messages on demand

2016-08-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1340e298aa7e by Vinay Sajip in branch 'default':
Closes #27904: Improved logging statements to defer formatting until needed.
https://hg.python.org/cpython/rev/1340e298aa7e

--
nosy: +python-dev
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27904] Let logging format more messages on demand

2016-08-30 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +vinay.sajip
stage:  -> patch review
versions: +Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27904] Let logging format more messages on demand

2016-08-30 Thread Ville Skyttä

New submission from Ville Skyttä:

Avoid some string formatting operations on disabled log levels.

--
files: logging.patch
keywords: patch
messages: 273971
nosy: scop
priority: normal
severity: normal
status: open
title: Let logging format more messages on demand
type: performance
Added file: http://bugs.python.org/file44284/logging.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com