[issue29896] ElementTree.fromstring raises undocumented UnicodeError

2017-03-24 Thread Vasiliy Faronov
New submission from Vasiliy Faronov: >>> from xml.etree import ElementTree as ET >>> ET.fromstring(b'<\xC4/>') Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.6/xml/etree/ElementTree.py", line 1314, in XML parser.

[issue29651] Inconsistent/undocumented urlsplit/urlparse behavior on invalid inputs

2017-02-25 Thread Vasiliy Faronov
New submission from Vasiliy Faronov: There is a problem with the standard library's urlsplit and urlparse functions, in Python 2.7 (module urlparse) and 3.2+ (module urllib.parse). The documentation for these functions [1] does not explain how they behave when given an invalid URL. One could

Depending on enum34 from a library

2016-07-24 Thread Vasiliy Faronov
Hi all, I'm building a Python library where I want to use Python 3.4-style enums. Because I need to support Python 2.7, I'm considering using enum34 [1]. But I'm not sure how to do this: If I simply depend on enum34, it will install a module named `enum` even in Python 3.4+ environments, and

[issue27605] Inconsistent calls to __eq__ from built-in __contains__

2016-07-24 Thread Vasiliy Faronov
New submission from Vasiliy Faronov: Consider the attached example program. I expect it to run successfully, because the Python 3 language reference says [1]: > For container types such as list, tuple, set, frozenset, dict, or > collections.deque, the expression `x in y` is equivalent t