[issue45605] Return False from __contains__ method if object not hashable for set and dict

2021-10-25 Thread Андрей Казанцев
Андрей Казанцев added the comment: Can you please specify in what cases we need to get an exception instead of False? It just seems very strange to me to rely on this behaviour. -- ___ Python tracker <https://bugs.python.org/issue45

[issue45605] Return False from __contains__ method if object not hashable for set and dict

2021-10-25 Thread Андрей Казанцев
New submission from Андрей Казанцев : Now if do something like `[] in set()` python raise an exception, but if an object isn't hashable then we know for sure that it isn't in the set. Propose return False for these cases. P.S. I would like to make a patch -- components: Library (Lib

[issue40816] Add missed AsyncContextDecorator to contextlib

2020-06-18 Thread Андрей Казанцев
Андрей Казанцев added the comment: Yury Selivanov, did you see the pull request? -- ___ Python tracker <https://bugs.python.org/issue40816> ___ ___ Python-bug

[issue40888] Add close method to queue

2020-06-09 Thread Андрей Казанцев
Андрей Казанцев added the comment: Thank you so much -- ___ Python tracker <https://bugs.python.org/issue40888> ___ ___ Python-bugs-list mailing list Unsub

[issue40888] Add close method to queue

2020-06-09 Thread Андрей Казанцев
Андрей Казанцев added the comment: How to do this? -- type: enhancement -> ___ Python tracker <https://bugs.python.org/issue40888> ___ ___ Python-bugs-lis

[issue40888] Add close method to queue

2020-06-06 Thread Андрей Казанцев
New submission from Андрей Казанцев : I have a problem with notifying all current subscribers and new subscribers about the closure of the queue and the reason. For example, I have a producer that reads messages from websocket or something else and send this to a queue, and several consumers

[issue40816] Add missed AsyncContextDecorator to contextlib

2020-06-06 Thread Андрей Казанцев
Андрей Казанцев added the comment: No, please look at the pull request. -- ___ Python tracker <https://bugs.python.org/issue40816> ___ ___ Python-bugs-list mailin

[issue40816] Add missed AsyncContextDecorator to contextlib

2020-05-29 Thread Андрей Казанцев
Change by Андрей Казанцев : -- keywords: +patch pull_requests: +19760 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20516 ___ Python tracker <https://bugs.python.org/issu

[issue40816] Add missed AsyncContextDecorator to contextlib

2020-05-29 Thread Андрей Казанцев
New submission from Андрей Казанцев : I can use context manager as decorator but can't use async context manager. Seems it because didn't implemented AsyncContextDecorator class -- components: Library (Lib) messages: 370317 nosy: heckad priority: normal severity: normal status: open

[issue39483] Proposial add loop parametr to run in asyncio

2020-01-31 Thread Андрей Казанцев
Андрей Казанцев added the comment: Where can I find issue which you are discussing for this thread? -- resolution: rejected -> status: closed -> open ___ Python tracker <https://bugs.python.org/i

[issue39483] Proposial add loop parametr to run in asyncio

2020-01-30 Thread Андрей Казанцев
Андрей Казанцев added the comment: @asvetlov, I provided an example where else this useful feature would be. What do you think? -- ___ Python tracker <https://bugs.python.org/issue39

[issue39483] Proposial add loop parametr to run in asyncio

2020-01-29 Thread Андрей Казанцев
Андрей Казанцев added the comment: How to make singleton class? I wrote this ``` import asyncio class Singleton: _CREATE_LOCK = asyncio.Lock() @classmethod async def create(cls): if not hasattr(cls, '_Singleton__instance'): async with cls._CREATE_LOCK

[issue39483] Proposial add loop parametr to run in asyncio

2020-01-29 Thread Андрей Казанцев
Андрей Казанцев added the comment: I create the client object in `bot` file. If I import it then it creates loop when will import and then when I run it I will get errors attaching to a different loop. Another way to use `import` statement in main. This is blocking code. What to choose

[issue39483] Proposial add loop parametr to run in asyncio

2020-01-29 Thread Андрей Казанцев
Change by Андрей Казанцев : -- keywords: +patch pull_requests: +17627 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18248 ___ Python tracker <https://bugs.python.org/issu

[issue39483] Proposial add loop parametr to run in asyncio

2020-01-29 Thread Андрей Казанцев
New submission from Андрей Казанцев : Sometimes need get loop from another place and run corutine in it. For example when use teleton lib. Example from this lib https://docs.telethon.dev/en/latest/basic/signing-in.html#id2 suggests using ```client.loop.run_until_complete``` but it's

[issue37333] Fail build on windows 10(visual studio 2019)

2019-06-18 Thread Андрей Казанцев
New submission from Андрей Казанцев : Error MSB4113 Specified condition "$(IncludeTkinter)" evaluates to "" instead of a boolean. python cpython\PCbuild\python.vcxproj 156 It is the master branch (id: 0a28f8d379544eee897979da0ce99f0b449b49dd) -- compon

[issue36670] test suite broken due to cpu usage feature on win 10/ german

2019-06-02 Thread Андрей Казанцев
Андрей Казанцев added the comment: I have the same problem in Russian locale. Adding "oem" encoding in the decode method solve problem with decoding but got: File "C:\Users\User\Documents\Projects\cpython\lib\test\libregrtest\win_utils.py", line 98, in getloadavg

[issue37133] Erro "ffi.h: No such file" when build python 3.8 (branch master) on windows 10

2019-06-02 Thread Андрей Казанцев
Андрей Казанцев added the comment: No, I used https://devguide.python.org/setup/ guide. I have downloaded the latest version of Visual Studio 2019 and evaluated in PowerShell "PCBuild\build.bat". After this, I opened "PCBuild\pcbuild.sln" and trying to build "

[issue37133] Erro "ffi.h: No such file" when build python 3.8 (branch master) on windows 10

2019-06-02 Thread Андрей Казанцев
New submission from Андрей Казанцев : Where to get "ffi.h" file? -- components: Build messages: 344287 nosy: heckad priority: normal severity: normal status: open title: Erro "ffi.h: No such file" when build python 3.8 (branch master) on windows 10

[issue36319] Erro 0xC0000374 on windows 10

2019-03-16 Thread Андрей Казанцев
New submission from Андрей Казанцев : On windows 10 python falls after evaluate this code ``` import time import locale locale.setlocale(locale.LC_ALL, 'Russian_Russia.utf8') time.localtime(1552753806.2363703) ``` What tools would you recommend for getting more information