[issue9827] Clarify LogRecord documentation
Chris Leary christopher.le...@cornell.edu added the comment: Okay, neat! I put them in that order so that they would correspond to the parameters to ``LogRecord.__init__`` -- do we usually do alphabetical instead? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9827 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9827] Clarify LogRecord documentation
New submission from Chris Leary christopher.le...@cornell.edu: I tried to clear this section up a bit in light of the confusion here: http://stackoverflow.com/q/3687864/3594 Not sure if it applies to 3k trunk. First documentation patch, be sure to lmk what I'm doing wrong! :-) -- assignee: d...@python components: Documentation files: pyloggingdoc.diff keywords: patch messages: 116067 nosy: cdleary, d...@python priority: normal severity: normal status: open title: Clarify LogRecord documentation versions: Python 2.7 Added file: http://bugs.python.org/file18842/pyloggingdoc.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9827 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7593] Computed-goto patch for RE engine
Changes by Chris Leary christopher.le...@cornell.edu: -- nosy: +cdleary ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7593 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7674] select.select() corner cases: duplicate fds, out-of-range fds
New submission from Chris Leary cd...@cornell.edu: I was just reading through this ACM article that enumerates some of the issues with the select function in .NET: http://cacm.acm.org/magazines/2009/5/24646-api-design-matters/fulltext select.select() currently suffers from the same documentation problem where the behavior with duplicate and/or out-of-range file descriptors in one of the sequences (i.e. rlist) is not described. Given the current implementation of seq2set in trunk it appears that: 1. A ValueError is raised when a given file descriptor is out of range. (Typically a result of the programmer passing a non-fd value, since FD_SETSIZE is normally at least equal to the maximum number of descriptors supported by the system.) 2. Duplicate file descriptor numbers are collapsed into the fd_set, and are therefore idempotent at a system API level. However, the language-level support code generally assumes no duplication, as there is a fixed size array of (FD_SETSIZE + 1) pylist entries (one additional for a sentinel value). Although there is a TODO to dynamically size that to the largest targeted file descriptor number, that would still assume one PyObject per file descriptor in the input sequences. The set2list function used to produce a return value will, however, return duplicates: for each value in the input list, if the corresponding fd is set, that pyobject is added to the return list. Proposed Changes At a glance it would seem that the Right Thing to do is to collapse duplicates in the input, as if we created a set(AsFileDescriptor(o) for o in input_list), so that no duplicates will be returned in the result; however, you *can* have a heterogeneous input list with a fileno like 5 and a file-like object whose fileno() resolved to 5, in which case you don't want to arbitrarily choose only one of those PyObjects to return. Therefore, I'm thinking it's probably best to leave it as-is and document it. In any case, if we want to explicitly allow duplicates in the input list we should probably make the pylist arrays into dynamically sized structures in the sizes of the corresponding input lists for correctness. If this all makes sense I'll be happy to come up with a module/documentation/unit test patch. -- assignee: georg.brandl components: Documentation, Extension Modules messages: 97578 nosy: cdleary, georg.brandl severity: normal status: open title: select.select() corner cases: duplicate fds, out-of-range fds type: behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7674 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1765140] logging: delay_fh option and configuration kwargs
Chris Leary added the comment: Ah, I see what the miscommunication is now. Yes, implementing the feature as you suggested would give the user the ability to specify the delayed handle-opening /within/ the configuration file. What I had intended was a way to load/inspect a file configuration without it having any handle-opening side affects, even if it were a totally unknown configuration file. If you want to assume a good trust relationship with the contents of a file configuration that you're loading (as in, you trust that it won't clobber any files that you still want), then that works well. I just assumed it would be useful to open a file configuration in an untrusted way (via delay_fh) in order to inspect/modify it. It seems to me to put more power in the hands of the loader of the configuration, rather than leaving the loader subject to the potentially bad contents of the configuration file. If you think I'm being too paranoid or feel that this is too obscure a use case, feel free to implement it how you see fit! :) _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1765140 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1765140] logging: delay_fh option and configuration kwargs
Chris Leary added the comment: Hi Vinay, I was actually trying to address a use case where the delay_fh option in the fileConfig() would be necessary. Let's say I'm running a simulator that I run many instances of at once. The logging configuration is extensive, so I want to use a configuration file; however, I don't want any existing log files to be clobbered as soon as I run fileConfig() -- I want to run fileConfig() to load the configuration, then remove/modify the handlers /before/ they touch the file handles. If fileConfig has no delay_fh option, fileConfig() would create the FileHandlers with delay_fh as False; therefore, adding the option to the FileHandler alone isn't enough to fix this use case. Let me know if this is unclear, or if I should provide a more concrete example. _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1765140 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com