Issue 11648: openlog()s 'logopt' keyword broken in syslog module (original) (raw)

Created on 2011-03-23 02:42 by tbielawa, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
syslog-fixlogopt-keyword.patch tbielawa,2011-03-23 02:42
syslogtest-pid.py tbielawa,2011-03-23 02:48
Messages (6)
msg131844 - (view) Author: Tim Bielawa (tbielawa) Date: 2011-03-23 02:42
Issue 8451 unintentionally introduced a bug into the openlog() function in the syslog module. syslog.openlog() as documented [1] is defined as: syslog.openlog([ident[, logopt[, facility]]]). I believe this is caused by the patch for issue 8451 redefining the kwargs to expect a 'logoption' keyword instead. This patch: - Fixes syslog.openlog() so that it properly accepts the 'logopt' keyword argument again. [1] http://docs.python.org/library/syslog.html#syslog.openlog
msg131845 - (view) Author: Tim Bielawa (tbielawa) Date: 2011-03-23 02:48
Trivial though it may be, the attached script demonstrates how to reproduce the bug described.
msg131846 - (view) Author: Tim Bielawa (tbielawa) Date: 2011-03-23 03:06
Classification update.
msg131860 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2011-03-23 09:33
Now that keyword support was introduced, I'd rather fix the documentation to use the new name.
msg131862 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2011-03-23 11:12
I agree with Georg, unfortunately. And I say "unfortunately" because neither "logopt" nor "logoption" is a good name. The "log" part adds nothing. The man page for syslog calls this "option", which would be my preferred name. But changing it now would be a hassle. Also, we clearly need a test for this, since apparently none failed when it was changed to the longer name.
msg150630 - (view) Author: Sandro Tosi (sandro.tosi) * (Python committer) Date: 2012-01-04 22:14
This has already been fixed with 71f7175e2b34 & friends.
History
Date User Action Args
2022-04-11 14:57:15 admin set github: 55857
2012-01-04 22:14:00 sandro.tosi set status: open -> closedversions: - Python 3.4nosy: + sandro.tosimessages: + resolution: fixedstage: resolved
2011-03-23 11:12:55 eric.smith set nosy:georg.brandl, jafo, pitrou, eric.smith, r.david.murray, docs@python, tbielawamessages: +
2011-03-23 09:33:20 georg.brandl set nosy: + docs@python, georg.brandlmessages: + assignee: docs@pythoncomponents: + Documentation, - Library (Lib)
2011-03-23 03:06:18 tbielawa set nosy:jafo, pitrou, eric.smith, r.david.murray, tbielawamessages: + versions: + Python 3.2, Python 3.3, Python 3.4
2011-03-23 02:48:13 tbielawa set files: + syslogtest-pid.pynosy:jafo, pitrou, eric.smith, r.david.murray, tbielawamessages: +
2011-03-23 02:45:36 eric.araujo set nosy: + r.david.murray, jafo, pitrou, eric.smith
2011-03-23 02:42:36 tbielawa create