[issue22191] warnings.__all__ incomplete
Jon Poler added the comment: Thanks, Brett! -- ___ Python tracker <http://bugs.python.org/issue22191> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22242] Doc fix in the Import section in language reference.
New submission from Jon Poler: It looks like there might be a contradiction in the documentation of import in the language reference. In the loading subsection https://docs.python.org/dev/reference/import.html#loading, first bulleted list of the section, it specifies that if a loader fails, it must remove only the failing module from sys.modules, while other side-effect imports by loader will stay in sys.modules. In the next subsection https://docs.python.org/dev/reference/import.html#loaders, second bulleted list (last bullet), the phrasing is confusing, and possibly contradictory. I believe that it meant to reiterate what was said above (see my previous paragraph). Attached is a potential patch, but if anyone finds that I am interpreting this wrong, I'll make adjustments accordingly. -- assignee: docs@python components: Documentation files: import_doc_fix.patch keywords: patch messages: 225610 nosy: docs@python, jon.poler priority: normal severity: normal status: open title: Doc fix in the Import section in language reference. type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file36427/import_doc_fix.patch ___ Python tracker <http://bugs.python.org/issue22242> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22014] Improve display of OS exception <-> errno mapping
Jon Poler added the comment: Here's one way to accomplish this. Please see attached os_exceptions_table_V2.patch. I wasn't having much luck trying to use ReST, so I took advantage of the fact that the Doc/conf.py file is executed every time sphinx-build is run. conf.py imports and calls the main function from Doc/tools/build_table.py. This script dynamically builds a table by scraping errno values corresponding to an OS exception and inserting them in the appropriate place. Doc/library/exceptions.rst just uses a literalinclude of the new table that gets built to Lib/test/os_exception_hierarchy.txt (the same directory that holds the original exceptions hierarchy). Error catching is used so that, in the event of an error, a warning will be raised but the sphinx-build command will still succeed. -- Added file: http://bugs.python.org/file36392/os_exceptions_table_V2.patch ___ Python tracker <http://bugs.python.org/issue22014> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22191] warnings.__all__ incomplete
Jon Poler added the comment: Here is a patch that changes __all__ in Lib/warnings.py to include the functions mentioned in the library reference https://docs.python.org/dev/library/warnings.html#available-functions. A unittest is included. This is my first patch, so comments/feedback are welcome (from now on, I should probably add). -- keywords: +patch Added file: http://bugs.python.org/file36383/warnings.__all__.patch ___ Python tracker <http://bugs.python.org/issue22191> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22191] warnings.__all__ incomplete
Jon Poler added the comment: Serhiy, should I submit these fixes as separate patches? E.g. one patch for the warnings module, and another for the socket module? More generally, should the items included in __all__ be derived from the items described in the documentation? For instance, only the functions listed in 18.1.2 https://docs.python.org/dev/library/socket.html#module-contents ? And finally, should a unittest be added for both of these modules to ensure that __all__ includes all of the desired publicly exposed elements? -- ___ Python tracker <http://bugs.python.org/issue22191> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22191] warnings.__all__ incomplete
Jon Poler added the comment: Antoine: I'll look in to this unless you want do so yourself. Thanks. -- nosy: +jon.poler ___ Python tracker <http://bugs.python.org/issue22191> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22014] Improve display of OS exception <-> errno mapping
Jon Poler added the comment: I'm not entirely sure that I'm interpreting what you are looking for correctly, but here is what the table looks like with literalinclude. -- keywords: +patch Added file: http://bugs.python.org/file36365/OS_exceptions_table.patch ___ Python tracker <http://bugs.python.org/issue22014> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22014] Add summary table for OS exception <-> errno mapping
Jon Poler added the comment: I will give this a shot if it is just hard-coding a table with errno names. Dynamically scraping the errno names and inserting them with the exception hierarchy might be beyond me since I've never used Sphinx before. -- nosy: +jon.poler ___ Python tracker <http://bugs.python.org/issue22014> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com