[issue42770] Typo in email.headerregistry docs
New submission from bazwal : The section for class email.headerregistry.ContentDispositionHeader has a typo in an attribute name: "content-disposition" should be corrected to "content_disposition". -- assignee: docs@python components: Documentation messages: 383910 nosy: bazwal, docs@python priority: normal severity: normal status: open title: Typo in email.headerregistry docs type: enhancement versions: Python 3.10, Python 3.9 ___ Python tracker <https://bugs.python.org/issue42770> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31537] Bug in readline module documentation example
New submission from bazwal: The second example in the readline module docs uses readline.get_history_length() (lines 8 & 14) where it should use readline.get_current_history_length(). -- assignee: docs@python components: Documentation messages: 302655 nosy: bazwal, docs@python priority: normal severity: normal status: open title: Bug in readline module documentation example type: behavior versions: Python 3.5, Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue31537> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25953] re fails to identify invalid numeric group references in replacement strings
New submission from bazwal: This code example: re.sub(r'(?P[123])', r'\g', '') will correctly raise a KeyError due to the invalid group reference. However, this very similar code example: re.sub(r'(?P[123])', r'\g<3>', '') fails to raise an error. It seems that the only way to check whether a numeric group reference is compatible with a given pattern is to test it against a string which happens to match. But this is obviously infeasible when checking unknown expressions (e.g. those taken from user input). And in any case: errors should be raised at the point where they occur (i.e. during compilation), not at some indeterminate point in the future. Regular expression objects have a "groups" attribute which holds the number of capturing groups in the pattern. So there seems no good reason why the replacement string parser can't identify invalid numeric group references in exactly the same way that it does for symbolic ones. -- components: Regular Expressions messages: 257008 nosy: bazwal, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: re fails to identify invalid numeric group references in replacement strings type: behavior versions: Python 3.5 ___ Python tracker <http://bugs.python.org/issue25953> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23262] webbrowser module broken with Firefox 36+
bazwal added the comment: I arrived at an almost identical solution to the one given by Oleg. It works for me with FF 28, 35 & 36 - but presumably there are earlier versions where it does not, otherise why have the -remote option at all? The gist of the Mozilla bug report is that the option has existed for a very long time, but there are now other command-line options that do exactly the same thing. So the only question seems to be whether Python should still support those older versions of FF that actually require it (if any exist). On the xdg-open issue: the $BROWSER env var has priority over the default list of browsers to try, so that might explain why xdg-open is not being used on some systems (that is how I originally became aware of this problem). -- nosy: +bazwal ___ Python tracker <http://bugs.python.org/issue23262> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23262] webbrowser module broken with Firefox 36+
bazwal added the comment: > this will break the support of IceApe on Debian Etch Is Python committed to supporting obsolete Debian releases? The latest oldstable Debian release (6.0 Squeeze) has iceape-2.0.11 [1], which does seem to support the -new-window and -new-tab options (I haven't actually tested this, though - I just looked at the source code [2]). The iceweasel/iceape products are just rebranded versions of Firefox and Seamonkey. The webbrowser module currently supports them via the generic Mozilla class - so Python should only be concerned about which versions of the common Mozilla codebase it needs to continue support for. [1] https://packages.debian.org/search?suite=squeeze&searchon=names&keywords=iceape [2] http://anonscm.debian.org/cgit/pkg-mozilla/iceape.git/tree/mozilla/browser/components/nsBrowserContentHandler.js?h=squeeze#n419 -- ___ Python tracker <http://bugs.python.org/issue23262> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com