[issue44703] deepcopy(frozenset()) returns a new object

2021-07-21 Thread Svyatoslav
Change by Svyatoslav : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue44703> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue44704] frozenset.__hash__ vs. Set._hash

2021-07-21 Thread Svyatoslav
New submission from Svyatoslav : In docstring of Set._hash in _collections_abc.py is written: "We match the algorithm used by the built-in frozenset type." But >>> s = frozenset({i for i in range(10)}) >>> hash(s) 3895031357313128696 >>> Set._hash(s) 3914

[issue44703] deepcopy(frozenset()) returns a new object

2021-07-21 Thread Svyatoslav
New submission from Svyatoslav : from copy import copy, deepcopy t = 1, 2 t1 = t, 3 t2 = t1, 4 t3 = t2, 5 assert copy(t3) is t3 assert deepcopy(t3) is t3 s = frozenset({1, 2}) assert s.copy() is s # method .copy() always returns self, what its purpose? assert copy(s) is s assert deepcopy(s

[issue44702] Fix weakref doc

2021-07-21 Thread Svyatoslav
New submission from Svyatoslav : >From https://docs.python.org/3/library/weakref.html: "" Not all objects can be weakly referenced; those objects which can include class instances, functions written in Python (but not in C), instance methods, sets, frozensets, some file object

[issue43261] Python 3.9 repair on Windows do not recover pip module

2021-02-23 Thread Svyatoslav
Svyatoslav added the comment: Attached logs created right before I created this post. -- Added file: https://bugs.python.org/file49829/Temp.zip ___ Python tracker <https://bugs.python.org/issue43

[issue43261] Python 3.9 repair on Windows do not recover pip module

2021-02-18 Thread Svyatoslav
New submission from Svyatoslav : I by mistake run command `pip install -U pip setuptools wheel` on Windows which deleted pip and did not install a new version. I decided to repair Python using 3.9.1 installer option. But after repair pip still was not installed. -- components

[issue42829] get_type_hints throws for nested class with __future__ annotations

2021-01-05 Thread Svyatoslav
Svyatoslav added the comment: > This is because get_type_hints looks only at mro of the class. Its namespace must be included too as locals < I'll correct myself. get_type_hints() looks at all entites of mro of a class. If globals are not defined, globals of an entity module ar

[issue42829] get_type_hints throws for nested class with __future__ annotations

2021-01-05 Thread Svyatoslav
New submission from Svyatoslav : If a class X has nested class Y and class X has annotation Y AFTER the definition of Y, get_type_hints(X) throws NameError if import from future annotations is present. This is because get_type_hints looks only at mro of the class. Its namespace must be

[issue42786] Different repr for collections.abc.Callable and typing.Callable

2020-12-30 Thread Svyatoslav
Svyatoslav added the comment: Thanks a lot! I am closing this issue. -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42786] Different repr for collections.abc.Callable and typing.Callable

2020-12-30 Thread Svyatoslav
Svyatoslav added the comment: Ok, thanks for the answer. Did I understand correctly that the issue will be fixed in 3.9.2 as well? -- ___ Python tracker <https://bugs.python.org/issue42

[issue42786] Different repr for collections.abc.Callable and typing.Callable

2020-12-30 Thread Svyatoslav
New submission from Svyatoslav : Was making some typing conversions to string and noticed a different behavior of collections.abc.Callable and typing.Callable here in 3.9.1. Issues issue42195 and issue40494 can be related. >>> import collections, typing >>> repr(collections

[issue33771] Module: timeit. According to documentation default_repeat should have the value 3. Has 5.

2018-06-05 Thread Svyatoslav
Change by Svyatoslav : -- assignee: -> docs@python components: +Documentation nosy: +docs@python ___ Python tracker <https://bugs.python.org/issue33771> ___ _

[issue33771] Module: timeit. According to documentation default_repeat should have the value 3. Has 5.

2018-06-05 Thread Svyatoslav
Change by Svyatoslav : -- components: Library (Lib) nosy: svyatoslav priority: normal severity: normal status: open title: Module: timeit. According to documentation default_repeat should have the value 3. Has 5. type: behavior versions: Python 3.7, Python 3.8