[issue43979] Simplify urllib.parse_qsl

2021-04-30 Thread Christoph Zwerschke
Christoph Zwerschke added the comment: I don't mind if you reopen your PR. But thanks for asking. -- ___ Python tracker <https://bugs.python.org/issue43

[issue43979] Simplify urllib.parse_qsl

2021-04-30 Thread Christoph Zwerschke
Christoph Zwerschke added the comment: I saw you submitted a PR already which looks good to me. -- ___ Python tracker <https://bugs.python.org/issue43

[issue43979] Simplify urllib.parse_qsl

2021-04-29 Thread Christoph Zwerschke
New submission from Christoph Zwerschke : Just noticed the following code in urrlib.parse_qsl: pairs = [s1 for s1 in qs.split(separator)] for name_value in pairs: ... see https://github.com/python/cpython/blob/088a15c49d99ecb4c3bef93f8f40dd513c6cae3b/Lib/urllib/parse.py#L755

[issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition

2021-02-28 Thread Christoph Zwerschke
Christoph Zwerschke added the comment: Just created a test case for this problem after a pentest provoked this error on one of my web apps. Then I found this bug report which already has a similar test case attached. The problem is that read_binary() as the name says reads binary data

[issue1375011] http.cookies, Cookie.py: Improper handling of duplicate cookies

2021-01-21 Thread Christoph Zwerschke
Christoph Zwerschke added the comment: This patch should really be included. As carl already mentioned, the relevant spec is RFC 6265, see section 5.4.2: "The user agent SHOULD sort the cookie-list in the following order: Cookies with longer paths are listed before cookies with sh

[issue18319] gettext() cannot find translations with plural forms

2020-09-18 Thread Christoph Zwerschke
Change by Christoph Zwerschke : -- nosy: +cito ___ Python tracker <https://bugs.python.org/issue18319> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35228] Index search in CHM help crashes viewer

2020-08-30 Thread Christoph Zwerschke
Christoph Zwerschke added the comment: Had the same problem for years and wondered why nobody else complained. Still reproducable with Win 10 Pro 2004, Python 3.8, cp1252 locale. Deleting hh.dat did not solve the problem for me. -- nosy: +cito

[issue38531] argparse action "extend" not documented as new

2019-10-19 Thread Christoph Zwerschke
New submission from Christoph Zwerschke : A new action "extend" has been added to argparse in https://github.com/python/cpython/commit/aa32a7e1116f7aaaef9fec453db910e90ab7b101 The documentation should specify that this is new in Python 3.8 addition. I wondered why it didn't work

[issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition

2019-08-08 Thread Christoph Zwerschke
Christoph Zwerschke added the comment: This also happens when sending POST requests with JSON payload from a browser with XMLHttpRequest to a Python 3.7 backend using FieldStorage. It seems XMLHttpRequest adds the content length automatically

[issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition

2019-08-08 Thread Christoph Zwerschke
Change by Christoph Zwerschke : -- nosy: +cito ___ Python tracker <https://bugs.python.org/issue2> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37110] Clarify hashability of custom class instances

2019-05-31 Thread Christoph Zwerschke
Christoph Zwerschke added the comment: My point was that it's not immediately obvious what "by default" means and that hashability is not only affected by the __hash__ method but also by __eq__. But I agree, you can argue that "by default" already includes not adding

[issue37110] Clarify hashability of custom class instances

2019-05-31 Thread Christoph Zwerschke
New submission from Christoph Zwerschke : The Python documentation says about hashability in the glossary (https://docs.python.org/3/glossary.html#term-hashable): "Objects which are instances of user-defined classes are hashable by default." This is not quite true. Objects of a us

[issue34730] aclose() doesn't stop raise StopAsyncIteration / GeneratorExit to __anext__()

2018-09-20 Thread Christoph Zwerschke
Change by Christoph Zwerschke : -- nosy: +cito ___ Python tracker <https://bugs.python.org/issue34730> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31140] Insufficient error message with incorrect formated string literal

2018-01-10 Thread Christoph Zwerschke
Christoph Zwerschke <c...@online.de> added the comment: I can confirm that the problem still exists in Python 3.6.4 and 3.7.0a4. Here is another way to demonstrate it: Create the following file test.py: # test hello = f"{world)}" Note that there is a syntax error

[issue1697943] msgfmt cannot cope with BOM

2017-03-26 Thread Christoph Zwerschke
Christoph Zwerschke added the comment: > Corresponding GNU gettext issue [1] was closed as "Not a Bug". Though I think the rationale given there pointing to RFC3629 section 6 is wrong, since that section explicitly refers to Internet protocols, but PO files are not an Inte

[issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings

2014-06-05 Thread Christoph Zwerschke
Christoph Zwerschke added the comment: After this patch, some of the values in mimetypes.types_map now appear as unicode instead of str in Python 2.7.7 under Windows. For compatibility and consistency reasons, I think this should be fixed so that all values are returned as str again under

[issue17326] Windows build docs still referring to VS 2008 in 3.3

2013-03-01 Thread Christoph Zwerschke
New submission from Christoph Zwerschke: The first paragraph in PCbuild/readme.txt of Python 3.3 still talks about Visual C++ 2008 Express and Visual Studio 2008. It says that VS 2008 is required at the very least (which may be still true, I'm not sure), but then it also says the official

[issue7402] reduce() is an anti-example in Idioms and Anti-Idioms

2009-12-12 Thread Christoph Zwerschke
Christoph Zwerschke c...@online.de added the comment: My point was that the passage starts with there are also many useful built-in functions people seem not to be aware of for some reasons and then it looks like the author himself was not aware of sum() for some reason because he gives

[issue7402] reduce() is an anti-example in Idioms and Anti-Idioms

2009-11-27 Thread Christoph Zwerschke
New submission from Christoph Zwerschke c...@online.de: In the section Using the batteries of the Idioms and Anti-Idioms in Python document (http://docs.python.org/dev/howto/doanddont.html#using-the-batteries), the reduce statement is used for summing up numbers as an example. I think

[issue2504] Add gettext.pgettext() and variants support

2009-09-20 Thread Christoph Zwerschke
Changes by Christoph Zwerschke c...@online.de: -- nosy: +cito ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2504 ___ ___ Python-bugs-list mailing

[issue6777] Python 2.6 tutorial still recommends using Exception.message attribute

2009-08-24 Thread Christoph Zwerschke
New submission from Christoph Zwerschke c...@online.de: The Python 2.6.2 tutorial says at the end of secton 8.3 (http://docs.python.org/tutorial/errors.html#handling-exceptions): But use of .args is discouraged. Instead, the preferred use is to pass a single argument to an exception (which can

[issue6423] The cgi docs should advertize using in instead of has_key

2009-07-05 Thread Christoph Zwerschke
New submission from Christoph Zwerschke c...@online.de: The cgi.Fieldstorage class supports the __contains__ method since Py 2.2, but the documentation of Py 2.6 still only mentions the old fashioned has_key method. See patch. -- assignee: georg.brandl components: Documentation files

[issue4799] handling inf/nan in '%f'

2009-04-09 Thread Christoph Zwerschke
Christoph Zwerschke c...@online.de added the comment: This is a related problem on Windows: '%g' % 1e400 - '1.#INF' '%.f' % 1e400 -- '1' -- nosy: +cito ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4799

[issue4713] Installing sgmlop can crash xmlrpclib

2008-12-21 Thread Christoph Zwerschke
New submission from Christoph Zwerschke c...@online.de: If you install sgmlop (downloadable from http://effbot.org/downloads/#sgmlop) under Python 2.x, then this can break xmlrpclib. You can reproduce this problem as follows (I have tested with Py 2.4, 2.5 and 2.6): data = ?xml

[issue4713] Installing sgmlop can crash xmlrpclib

2008-12-21 Thread Christoph Zwerschke
Changes by Christoph Zwerschke c...@online.de: -- keywords: +patch Added file: http://bugs.python.org/file12418/xmlrpclib.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4713

[issue1697943] msgfmt cannot cope with BOM

2008-07-19 Thread Christoph Zwerschke
Christoph Zwerschke [EMAIL PROTECTED] added the comment: Small improvement of the patch: Instead of hardcoding the BOM as '\xef\xbb\xbf', we should use codecs.BOM_UTF8. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1697943

[issue3354] sort(reverse=None) prints misleading error message

2008-07-14 Thread Christoph Zwerschke
New submission from Christoph Zwerschke [EMAIL PROTECTED]: When you sort a list with list.sort() or sorted(list), and set the reverse parameter to None, then you get the following misleading error message: TypeError: an integer is required I would expect a more proper error message

[issue3354] sort(reverse=None) prints misleading error message

2008-07-14 Thread Christoph Zwerschke
Christoph Zwerschke [EMAIL PROTECTED] added the comment: The problem is not only that the error message TypeError: an integer is required has integer instead of boolean, but it does not mention the attribute name reverse, i.e. it does not even say *where* the integer is required. I firmly

[issue3354] Improve error reporting for the argument parsing API

2008-07-14 Thread Christoph Zwerschke
Christoph Zwerschke [EMAIL PROTECTED] added the comment: Agree. Seems to be a more general weakness of the argument parsing of builtin functions and methods, that calls for a general solution instead of a local patch. Luckily there are not so many cases where the errors are misleading, since

[issue2481] locale.strxfrm does not work with Unicode strings

2008-03-25 Thread Christoph Zwerschke
New submission from Christoph Zwerschke [EMAIL PROTECTED]: While locale.strcoll seems to work with Unicode strings, locale.strxfrm gives a UnicodeError. Example: ### try: locale.setlocale(locale.LC_ALL, 'de') except locale.Error: # Windoof locale.setlocale(locale.LC_ALL, 'german') s

[issue2217] Problem with if clause in generator expression on class level

2008-03-02 Thread Christoph Zwerschke
Christoph Zwerschke added the comment: Thanks, this now makes sense to me. You're right, it's rather an ugly wart than a bug. But I think the Python reference needs to be improved to make this clear enough. How about the following proposed addtions (in square brackets) to section 5.2.5 (http