[issue43513] venv: recreate symlinks on --upgrade
New submission from ThiefMaster : When using `python -m venv --upgrade someenv`, it rewrites `pyvenv.cfg` with the current python version but leaves the python symlinks untouched (https://github.com/python/cpython/blob/a8ef4572a6b28bcfc0b10b34fa4204954b9dd761/Lib/venv/__init__.py#L248) This is of course fine when the original location of the Python interpreter is something like `/usr/bin/python3.9`, but when using pyenv it's a path containing the full version such as `/home/USER/.pyenv/versions/3.9.2/bin/python`, which makes in-place updates of minor Python versions harder than needed (manual update of the symlink needed). IfF you agree that this change makes sense, I wouldn't mind sending a PR for this... -- components: Library (Lib) messages: 388840 nosy: ThiefMaster priority: normal severity: normal status: open title: venv: recreate symlinks on --upgrade type: enhancement ___ Python tracker <https://bugs.python.org/issue43513> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45899] NameError on if clause of class-level list comprehension
Change by ThiefMaster : -- nosy: +ThiefMaster ___ Python tracker <https://bugs.python.org/issue45899> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42388] subprocess.check_output(['echo', 'test'], text=True, input=None) fails
New submission from ThiefMaster : `subprocess.check_output(['echo', 'test'], text=True, input=None)` fails with `AttributeError: 'bytes' object has no attribute 'encode'` due to the function only checking for `universal_newlines` but not `text`: https://github.com/python/cpython/blob/2ffba2a1027909e1dd697bf8ec2a03fba7618020/Lib/subprocess.py#L423 This is inconsistent with the docs, which state that "text was added as a more readable alias for universal_newlines.". -- components: Library (Lib) messages: 381234 nosy: ThiefMaster priority: normal severity: normal status: open title: subprocess.check_output(['echo', 'test'], text=True, input=None) fails type: behavior versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue42388> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30838] re \w does not match some valid Unicode characters
Changes by ThiefMaster : -- nosy: +ThiefMaster ___ Python tracker <http://bugs.python.org/issue30838> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15825] Typo in OrderedDict docs
New submission from ThiefMaster: "It is also straight-forward to create an ordered dictionary variant that the remembers the order the keys were last inserted." The first "the" doesn't belong there. -- assignee: docs@python components: Documentation messages: 169493 nosy: ThiefMaster, docs@python priority: normal severity: normal status: open title: Typo in OrderedDict docs versions: Python 2.7, Python 3.2 ___ Python tracker <http://bugs.python.org/issue15825> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19505] OrderedDict views don't implement __reversed__
New submission from ThiefMaster: The view objects for `collections.OrderedDict` do not implement `__reversed__` so something like this fails: >>> from collections import OrderedDict >>> od = OrderedDict() >>> reversed(od.viewvalues()) Traceback (most recent call last): File "", line 1, in TypeError: argument to reversed() must be a sequence -- components: Library (Lib) messages: 202221 nosy: ThiefMaster priority: normal severity: normal status: open title: OrderedDict views don't implement __reversed__ versions: Python 2.7, Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/issue19505> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27269] ipaddress: Wrong behavior with ::ffff:1.2.3.4 style IPs
New submission from ThiefMaster: I'd expect the IPv4 address to be considered part of that network (or actually parsed as an IPv4Address and not IPv6Address) even if it's written in IPv6 notation. It's an IPv4 after all. Python 3.5.1 (default, Jun 7 2016, 09:20:44) [GCC 4.9.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import ipaddress >>> ipaddress.ip_address(':::127.0.0.1') IPv6Address(':::7f00:1') >>> ipaddress.ip_address(':::127.0.0.1') in >>> ipaddress.ip_network('127.0.0.0/8') False >>> ipaddress.ip_address('127.0.0.1') in ipaddress.ip_network('127.0.0.0/8') True -- components: Library (Lib) messages: 267861 nosy: ThiefMaster priority: normal severity: normal status: open title: ipaddress: Wrong behavior with :::1.2.3.4 style IPs type: behavior versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker <http://bugs.python.org/issue27269> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23339] dict_values should be comparable with a set
New submission from ThiefMaster: >>> d = {'1': '2'} >>> {'1'} < d.keys() False >>> {'1'} < set(d.values()) False >>> {'1'} < d.values() Traceback (most recent call last): File "", line 1, in TypeError: unorderable types: set() < dict_values() Same for e.g. the `-` operator. Since dict_keys acts like a real set I think dict_values should do so, too. At least if all the values are hashable. -- components: Library (Lib) messages: 234888 nosy: ThiefMaster priority: normal severity: normal status: open title: dict_values should be comparable with a set versions: Python 2.7, Python 3.4 ___ Python tracker <http://bugs.python.org/issue23339> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26068] re.compile() repr end quote truncated
New submission from ThiefMaster: ``` Python 3.4.3 (default, Jan 5 2016, 23:13:10) [GCC 4.7.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import re >>> for n in range(198, 201): ... print(re.compile('x' * n)) ... re.compile('xx') re.compile('xxx) re.compile('xxx) ``` The closing quote in the repr goes away once the regex exceeds a certain length. This smells like an off-by-one somewhere that results in the last character to be lost. In any case, it's pretty ugly since the repr clearly pretends to be executable Python code, which is not the case anymore with this quote missing. -- components: Regular Expressions messages: 257860 nosy: ThiefMaster, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: re.compile() repr end quote truncated versions: Python 3.4 ___ Python tracker <http://bugs.python.org/issue26068> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26068] re.compile() repr end quote truncated
ThiefMaster added the comment: I think it's pretty ugly to have a repr that is valid python code in most cases and suddenly stops being so. The repr of a string is not truncated, so why truncate it in a pattern object? With the truncation, why not use a repr style that's clearly not executable to recreate the original object, e.g. `` -- ___ Python tracker <http://bugs.python.org/issue26068> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26068] re.compile() repr end quote truncated
ThiefMaster added the comment: Not eval'ing it, just wondered why the repr looks so weird when printing an object containing a compiled regex ;) -- ___ Python tracker <http://bugs.python.org/issue26068> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26068] re.compile() repr end quote truncated
ThiefMaster added the comment: Would it be possible to preserve the quotes even in case of truncation? -- ___ Python tracker <http://bugs.python.org/issue26068> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com