[issue28738] Document SIGBREAK as argument for signal() under Windows.
New submission from Wojtek Ruszczewski: SIGBREAK should be listed as acceptable for signal.signal() under Windows. Some context. Registering a handler for SIGBREAK may be useful as this is the signal that generating CTRL_BREAK_EVENT results in (and the latter combined with the CREATE_NEW_PROCESS_GROUP flag might be the closest that one can get to terminating a process group). Some pointers: * The changed documentation fragment: https://docs.python.org/3/library/signal.html#signal.signal. * MSDN doesn't say so much about SIGBREAK: https://msdn.microsoft.com/en-us/library/windows/desktop/ms682541(v=vs.85).aspx. * SIGBREAK was added to the signal module with #466877. * The signal number check looks as follows: https://github.com/python/cpython/blob/3.6/Modules/signalmodule.c#L402. -- assignee: docs@python components: Documentation, Windows files: sigbreak.patch keywords: patch messages: 281159 nosy: docs@python, paul.moore, steve.dower, tim.golden, wrwrwr, zach.ware priority: normal severity: normal status: open title: Document SIGBREAK as argument for signal() under Windows. type: enhancement versions: Python 3.7 Added file: http://bugs.python.org/file45538/sigbreak.patch ___ Python tracker <http://bugs.python.org/issue28738> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23040] Better documentation for the urlencode safe parameter
Wojtek Ruszczewski added the comment: Updated the patch, additionally changing "be" to "contain" in the first sentence. -- Added file: http://bugs.python.org/file37439/urlencode-safe-v2.diff ___ Python tracker <http://bugs.python.org/issue23040> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23040] Better documentation for the urlencode safe parameter
Wojtek Ruszczewski added the comment: Thanks, that's right and better, as it doesn't replicate the safe explanation. I've just noticed another small one, the docstring for quote() [2] says: "encoding must not be specified if string is a str" -- that should be "... is a bytes". [2] https://hg.python.org/cpython/file/default/Lib/urllib/parse.py#l690 -- ___ Python tracker <http://bugs.python.org/issue23040> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23040] Better documentation for the urlencode safe parameter
Wojtek Ruszczewski added the comment: I was looking at the sentence: "When query parameter is a str, the safe, encoding and error parameters are passed down to quote_plus() for encoding." The query argument can't be a string itself (gives a TypeError with 3.5a0 and I think it's only intended to accept dicts or sequences of 2-tuples). The "parameter" then must refer to a component of the query -- a key or a value. The safe argument is passed down and is effective no matter if a component is of str or bytes type (or a sequence with doseq), for example: >>> urlencode({b'/ n': ''}, safe='/') '/+n=' (note the "b"; without "safe" the slash would get encoded as %2F). Maybe it would also be good to change "query parameter" to "query component" in that sentence. -- ___ Python tracker <http://bugs.python.org/issue23040> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23040] Better documentation for the urlencode safe parameter
New submission from Wojtek Ruszczewski: The documentation for urlencode() [1] isn't very clear on how the safe parameter is used, it would better not list it together with encoding and error as only applying to strings. [1] https://docs.python.org/3.5/library/urllib.parse.html#urllib.parse.urlencode -- assignee: docs@python components: Documentation files: urlencode-safe.diff keywords: patch messages: 232556 nosy: docs@python, wrwrwr priority: normal severity: normal status: open title: Better documentation for the urlencode safe parameter type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file37426/urlencode-safe.diff ___ Python tracker <http://bugs.python.org/issue23040> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com