[issue36373] asyncio.gather: no docs for deprecated loop parameter

2019-05-28 Thread Yury Selivanov
Yury Selivanov added the comment: > Yuri, I think we should deprecate explicit loop everywhere in non-deprecated > asyncio API by Python 3.8. +1 -- ___ Python tracker <https://bugs.python.org/i

[issue37088] Add a way to schedule a function to be called from the main thread

2019-05-29 Thread Yury Selivanov
New submission from Yury Selivanov : When asyncio event loop is created in a non-main thread, it needs to initialize a so called ChildWatcher for it (a helper object to intercept subprocesses exits). Doing that requires to run code in the main thread. I propose to add a 'sys.addpendin

[issue37088] Add a way to schedule a function to be called from the main thread

2019-05-29 Thread Yury Selivanov
Change by Yury Selivanov : -- keywords: +patch pull_requests: +13550 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13656 ___ Python tracker <https://bugs.python.org/issu

[issue37088] Add a way to schedule a function to be called from the main thread

2019-05-29 Thread Yury Selivanov
Yury Selivanov added the comment: > As to exposing Py_AddPendingCall() as sys.addpendingcall, that might be > opening a can of worms. Injecting code into the eval loop at some arbitrary > ("soon") future time requires care and the code isn't well exercised &

[issue37088] Add a way to schedule a function to be called from the main thread

2019-05-29 Thread Yury Selivanov
Yury Selivanov added the comment: Eric, regarding signals no longer using pending calls -- interesting, I'll take a look. Thanks for pointing this out. Sent from my iPhone -- ___ Python tracker <https://bugs.python.org/is

[issue36709] Asyncio SSL keep-alive connections raise errors after loop close.

2019-05-30 Thread Yury Selivanov
Yury Selivanov added the comment: > Sorry, that's how asyncio is designed. Andrew, couldn't we provide a "stream.terminate()" method (not a coroutine) that would do the following: * close the transport * set a flag in the protocol that the stream has been terminated.

[issue36709] Asyncio SSL keep-alive connections raise errors after loop close.

2019-05-30 Thread Yury Selivanov
Yury Selivanov added the comment: > Not sure if we have to drop this warning, it enforces writing good code that > controls all created resources lifecycle. Right, maybe we add "transport.terminate()" as well? Synchronously & immediately closing a transport is a val

[issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x

2019-06-03 Thread Yury Selivanov
Change by Yury Selivanov : -- nosy: -yselivanov ___ Python tracker <https://bugs.python.org/issue33694> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37179] asyncio loop.start_tls() provide support for TLS in TLS

2019-06-06 Thread Yury Selivanov
Yury Selivanov added the comment: Yeah, we have the SSL reimplementation ready to be backported from uvloop to cpython. Fantix, the original author, should be able to do that soon. -- ___ Python tracker <https://bugs.python.org/issue37

[issue37213] Peeephole optimizer does not optimize functions with multiline expressions

2019-06-11 Thread Yury Selivanov
Change by Yury Selivanov : -- nosy: -yselivanov ___ Python tracker <https://bugs.python.org/issue37213> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37373] Configuration of windows event loop for libraries

2019-06-22 Thread Yury Selivanov
Yury Selivanov added the comment: Victor, Andrew, I'm not an expert in IOCP, but is it possible to implement add_reader/writer in ProactorEventLoop? If there's no native API for that, I guess we can spawn a thread with a 'select()' call to emulate this API? Lukasz,

[issue37373] Configuration of windows event loop for libraries

2019-06-22 Thread Yury Selivanov
Yury Selivanov added the comment: Andrew, > Sorry, no. There is no way IIUC. Well, in this case we should do that via a thread+select approach as I and Ben suggested. I can write some PoC code; will you have some time to polish it and commit it? (I'm OOO and don't have a wi

[issue37373] Configuration of windows event loop for libraries

2019-06-23 Thread Yury Selivanov
Yury Selivanov added the comment: +1 to what Ben said. Andrew, > The proposal looks like a very dirty hack and smells as it is. I wonder why are you feeling like that about this idea. I don't think this is a hack at all. There's no native API, so we're forced to us

[issue37398] contextlib.ContextDecorator decorating async functions

2019-08-09 Thread Yury Selivanov
Yury Selivanov added the comment: > I hear you on the semantic confusion, but is a single check at definition > time really that expensive? Do you know how to make that single check 100% reliable? -- ___ Python tracker <https://bugs.p

[issue37398] contextlib.ContextDecorator decorating async functions

2019-08-12 Thread Yury Selivanov
Yury Selivanov added the comment: > I think a simple iscoroutinefunction check will be pretty close to 100% > matching what users expect. Yes, "pretty close", but not reliable. :) E.g. I can easily design a decorator that when applied first would break the proposed isc

[issue30679] __aexit__ not called when `run_until_complete` is interrupted by SIGINT

2017-06-15 Thread Yury Selivanov
Yury Selivanov added the comment: Yes, this is a known limitation of asyncio -- keyboardinterrupt exceptions kills the loop rather abruptly. One way to handle this is to use 'signal.signal' for sigint to raise custom exception instead of keyboar

[issue30604] co_extra_freefuncs is stored thread locally and can lead to crashes

2017-06-21 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset f3cffd2b7879d209f982de899b782fb89cfc410a by Yury Selivanov (Dino Viehland) in branch 'master': bpo-30604: clean up co_extra support (#2144) https://github.com/python/cpython/commit/f3cffd2b7879d209f982de899b782f

[issue30604] co_extra_freefuncs is stored thread locally and can lead to crashes

2017-06-21 Thread Yury Selivanov
Yury Selivanov added the comment: It doesn't need to be, it's only for 3.6 -- ___ Python tracker <http://bugs.python.org/issue30604> ___ ___ Python-b

[issue30604] co_extra_freefuncs is stored thread locally and can lead to crashes

2017-06-21 Thread Yury Selivanov
Yury Selivanov added the comment: Closing the issue. Thank you Dino for working on this! -- resolution: -> fixed stage: backport needed -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue22087] asyncio: support multiprocessing (support fork)

2017-06-28 Thread Yury Selivanov
Yury Selivanov added the comment: > The approach in Dan's patches looks sane to me and I agree the issue needs > fixing. Dan, would you like to submit a PR for this? We're using Github for > patch submissions now. Mind that the patch is very outdated and we already h

[issue21998] asyncio: support fork

2017-06-28 Thread Yury Selivanov
Yury Selivanov added the comment: > Possible answer: have a global WeakSet of event loops. In the child fork > handler, iterate over all event loops and "break" those that have already > been started. We can do this but

[issue22087] asyncio: support multiprocessing (support fork)

2017-06-28 Thread Yury Selivanov
Yury Selivanov added the comment: > It seems there's a check in the top-level get_event_loop() function but not > in the DefaultEventLoopPolicy.get_event_loop() method. Yes, as users aren't supposed to work with policies directly. > (also: wow, that stuff is complicated)

[issue21998] asyncio: support fork

2017-06-28 Thread Yury Selivanov
Yury Selivanov added the comment: > A compromise for the short term would be to detect fork in debug mode and raise an exception, and explain how to fix such bug. What do you think? I'd prefer to fix it properly in 3.7. -- ___ Python tracke

[issue21998] asyncio: support fork

2017-06-28 Thread Yury Selivanov
Yury Selivanov added the comment: > I'm not sure why it would be debug-only. You usually don't fork() often, and > you don't have many event loops around, so the feature sounds cheap. I think you're right. If it's low or zero overhead we can

[issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers

2017-07-04 Thread Yury Selivanov
Yury Selivanov added the comment: > Yury, based on the most recent comments, can this issue be closed now? Not sure, I'm reviewing the patch for #30698, let's see if it fixes the problem. -- ___ Python tracker <http://bugs.pytho

[issue30828] Out of bounds write in _asyncio_Future_remove_done_callback

2017-07-04 Thread Yury Selivanov
Changes by Yury Selivanov : -- pull_requests: +2640 ___ Python tracker <http://bugs.python.org/issue30828> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30828] Out of bounds write in _asyncio_Future_remove_done_callback

2017-07-05 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 833a3b0d3707200daeaccdd218e8f18a190284aa by Yury Selivanov in branch 'master': bpo-30828: Fix out of bounds write in `asyncio.CFuture.remove_done_callback() (#2569) https://github.com/python/cpyt

[issue30828] Out of bounds write in _asyncio_Future_remove_done_callback

2017-07-05 Thread Yury Selivanov
Changes by Yury Selivanov : -- pull_requests: +2660 ___ Python tracker <http://bugs.python.org/issue30828> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30828] Out of bounds write in _asyncio_Future_remove_done_callback

2017-07-05 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset aaa4f991518611d101fba1ef3ecb18d7b385ad5b by Yury Selivanov in branch '3.6': [3.6] bpo-30828: Fix out of bounds write in `asyncio.CFuture.remove_done_callback() (GH-2569) (#2590) https://github.com/python/cpyt

[issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption

2017-07-05 Thread Yury Selivanov
Yury Selivanov added the comment: > But IMHO the example it's just that an example, if the connection at some point was not broken/closed/... and some data came into the buffer, this data should be put available for the user. In my experience, you never want to recover any data fro

[issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption

2017-07-07 Thread Yury Selivanov
Yury Selivanov added the comment: I looked at the PR and it looks good. The intent is also clear. But the idea of delaying exceptions in StreamReader read methods still feels finicky. To go forward with this we need more examples than just nodejs. And it doesn't really matter what tri

[issue30945] loop.create_server does not detect if the interface is IPv6 enabled

2017-07-19 Thread Yury Selivanov
Yury Selivanov added the comment: > Better than trying to detect IPv6 compatibility beforehand would probably to > recognize the error and simply ignore it. +1 -- ___ Python tracker <http://bugs.python.org/i

[issue31033] Add argument to .cancel() of Task and Future

2017-07-25 Thread Yury Selivanov
Yury Selivanov added the comment: Well, don't use "print(e)" when you are printing errors in in Python. This is pretty standard behaviour for all Python code, not just asyncio. A lot of code in stdlib raises exceptions, almost none allows to

[issue31033] Add argument to .cancel() of Task and Future

2017-07-25 Thread Yury Selivanov
Yury Selivanov added the comment: > Yes, I agree with you about my weird way of debugging. But anyway, changing > API with adding ability to pass actual cause would be welcome. I'm not opposed to the idea, btw. If we do decide to add an argument to 'cancel', we probably s

[issue31033] Add argument to .cancel() of Task and Future

2017-07-25 Thread Yury Selivanov
Yury Selivanov added the comment: > Will it cancel whole chain of depending futures in a RIGHT way ? I was thinking about this: def Future.set_exception(exc): if isinstance(exc, asyncio.CancelledError): return self._cancel(exc) # here goes old code def Future.can

[issue31061] asyncio segfault when using threadpool and "_asyncio" native module

2017-07-27 Thread Yury Selivanov
Yury Selivanov added the comment: Interesting. A code to reproduce this crash would help tremendously. So far this is the first time I hear about this crash. -- nosy: +inada.naoki ___ Python tracker <http://bugs.python.org/issue31

[issue31061] asyncio segfault when using threadpool and "_asyncio" native module

2017-07-28 Thread Yury Selivanov
Yury Selivanov added the comment: > so looks like disabling the _asyncio module just caused the crash to happen > less often, closing and will continue investigating after a get a core file Interesting. So it crashes even with pure Python Future/Task implementations? Another idea to

[issue31061] asyncio segfault when using threadpool and "_asyncio" native module

2017-07-28 Thread Yury Selivanov
Yury Selivanov added the comment: Thank you for trying to get to the bottom of this! -- ___ Python tracker <http://bugs.python.org/issue31061> ___ ___ Python-bug

[issue31061] asyncio segfault when using threadpool and "_asyncio" native module

2017-07-30 Thread Yury Selivanov
Yury Selivanov added the comment: >ok got a full debug core file, let me know what other information I can >provide. Thank you. Does the crash happen with python versions of Tasks and Future? -- ___ Python tracker <http://bugs.p

[issue31061] asyncio segfault when using threadpool and "_asyncio" native module

2017-07-31 Thread Yury Selivanov
Yury Selivanov added the comment: Alexander, I think this is it, you found it! Can you open a PR against master with a fix? I'll review & merge it. -- ___ Python tracker <http://bugs.python.or

[issue31061] asyncio segfault when using threadpool and "_asyncio" native module

2017-08-02 Thread Yury Selivanov
Yury Selivanov added the comment: Thank you, Alexander. Bugs like this are notoriously hard to fix, you saved us from hours, if not days, of debugging. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python track

[issue31113] Stack overflow with large program

2017-08-08 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: -yselivanov ___ Python tracker <http://bugs.python.org/issue31113> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31179] Speed-up dict.copy() up to 5.5 times.

2017-08-10 Thread Yury Selivanov
Changes by Yury Selivanov : -- pull_requests: +3104 ___ Python tracker <http://bugs.python.org/issue31179> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31179] Speed-up dict.copy() up to 5.5 times.

2017-08-10 Thread Yury Selivanov
New submission from Yury Selivanov: It's possible to significantly improve performance of shallow dict copy. Currently, PyDict_Copy creates a new empty dict object and then inserts key/values into it one by one. My idea is to simply memcpy the whole keys/items region and do the nece

[issue31179] Speed-up dict.copy() up to 5.5 times.

2017-08-10 Thread Yury Selivanov
Yury Selivanov added the comment: >> PyDict_Copy creates a new empty dict object and then inserts key/values into >> it one by one. > Why not creating a "preallocated" dict in that case? _PyDict_NewPresized() I don't think it's related to the proposed pa

[issue31179] Speed-up dict.copy() up to 5.5 times.

2017-08-11 Thread Yury Selivanov
Yury Selivanov added the comment: > Why "del" doesn't compact the dict? This is a good question, btw. -- ___ Python tracker <http://bugs.

[issue31179] Speed-up dict.copy() up to 5.5 times.

2017-08-11 Thread Yury Selivanov
Yury Selivanov added the comment: > I like idea. > One worrying point is how to deal with dirty dict. > How about do it only when ma_used == keys->dk_nentries? I've added this check. See the updated PR. > The PR changes the behavior. Currently the effect of copying is co

[issue31185] Miscellaneous errors in asyncio speedup module

2017-08-11 Thread Yury Selivanov
Yury Selivanov added the comment: Adding INADA, he is a co-author/reviewer of that code. -- nosy: +inada.naoki ___ Python tracker <http://bugs.python.org/issue31

[issue31185] Miscellaneous errors in asyncio speedup module

2017-08-11 Thread Yury Selivanov
Yury Selivanov added the comment: Huge thanks, Serhiy, btw. -- ___ Python tracker <http://bugs.python.org/issue31185> ___ ___ Python-bugs-list mailing list Unsub

[issue31185] Miscellaneous errors in asyncio speedup module

2017-08-11 Thread Yury Selivanov
Yury Selivanov added the comment: > "reference leaks" oh? our Refleaks buildbots didn't catch them. The test suite for Tasks and Futures is pretty extensive, but it obviously doesn't cover some obscure use cases. +1 to make sure that any refleak that was disco

[issue31195] Make any() and all() work with async generators

2017-08-13 Thread Yury Selivanov
Yury Selivanov added the comment: > Or am I missing something subtle here? We'll need to make any() and all() coroutines. Not simple coroutines though, but weird "hybrid" functions that preserve the old semantics + implement async stuff. I don't think this is a ve

[issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks

2017-08-17 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +yselivanov ___ Python tracker <http://bugs.python.org/issue14976> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks

2017-08-17 Thread Yury Selivanov
Yury Selivanov added the comment: An idea from the blog post: if we rewrite queue in C it will use the GIL as a lock which will fix this particular bug. I can make a patch. -- status: closed -> open ___ Python tracker <http://bugs.pyth

[issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks

2017-08-18 Thread Yury Selivanov
Yury Selivanov added the comment: > Here is a pure Python PoC patch that allows unbounded Queue and LifoQueue to > have reentrant put(). Is it guaranteed that the GC will happen in the same thread that is holding the lock? IOW will RLock help with all GC/__del__ deadlocking sce

[issue29302] add contextlib.AsyncExitStack

2017-08-19 Thread Yury Selivanov
Yury Selivanov added the comment: > I'm not sure about type() to get a class object and calling __aenter__, > __aexit__ through it: that makes it hard to mock these classes as Mock's > spec= relies on __class__ and type() seem to ignore it (learned it a hard way. Looking up

[issue31230] Define a general "asynchronous operation introspection" protocol

2017-08-19 Thread Yury Selivanov
Yury Selivanov added the comment: > I started a local PR at https://github.com/ncoghlan/cpython/pull/1/files to > explore what this might look like in practice. Looks good to me. > I'm less sure about __delegated_to__/__returns_to__, since we don't have > *any* code i

[issue29302] add contextlib.AsyncExitStack

2017-08-19 Thread Yury Selivanov
Yury Selivanov added the comment: >> but at the same time rejected by the 'async with' statement. > Perhaps unittest.mock (or type) needs to be adjusted to allow mocking via > spec= without subclassing? Maybe. You should try to find discussions around this topic on pyt

[issue31350] asyncio: Optimize get_event_loop and _get_running_loop

2017-09-05 Thread Yury Selivanov
Yury Selivanov added the comment: > I'm not convinced that the PR is worth it. 3% is not interesting on a micro > benchmark. I found a small issue in the PR (left a comment in the PR). I think using a tuple is still a good idea (even if the speedup is tiny) because logically, both

[issue31350] asyncio: Optimize get_event_loop and _get_running_loop

2017-09-05 Thread Yury Selivanov
Yury Selivanov added the comment: > Or is there an issue in my benchmark? Yes. The correct benchmark would be to measure `get_event_loop` performance from *within* a running event loop. -- ___ Python tracker <http://bugs.python.org/issu

[issue31350] asyncio: Optimize get_event_loop and _get_running_loop

2017-09-05 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 80bbe6a7b67f33d0d0976bb8e3e5ba26b6b0e626 by Yury Selivanov (jimmylai) in branch 'master': bpo-31350: Optimize get_event_loop and _get_running_loop (#3347) https://github.com/python/cpython/commit/80bbe6a7b67f33d0d0976bb8e3e5ba

[issue31452] asyncio.gather does not cancel tasks if one fails

2017-09-14 Thread Yury Selivanov
Yury Selivanov added the comment: Andrew, looks like it. You can take a look if you want (I don't have time to work on this right now). -- ___ Python tracker <https://bugs.python.org/is

[issue31452] asyncio.gather does not cancel tasks if one fails

2017-09-21 Thread Yury Selivanov
Yury Selivanov added the comment: I looked at the PR, and I'm not so sure about this change. In short, it can be viewed as a backwards incompatible change to asyncio.gather. Guido, what do you think? -- nosy: +gvanrossum ___ Python tracker &

[issue31539] asyncio.sleep may sleep less time then it should

2017-09-21 Thread Yury Selivanov
Yury Selivanov added the comment: > it's expected that the sleep time may be *more* than asked for, but not less > than. Exactly, and asyncio tries to ensure that. It looks like "time.get_clock_info('monotonic').resolution" lies about monotonic clock resolut

[issue31539] asyncio.sleep may sleep less time then it should

2017-09-21 Thread Yury Selivanov
Yury Selivanov added the comment: So here's the relevant piece of code: end_time = self.time() + self._clock_resolution while self._scheduled: handle = self._scheduled[0] if handle._when >= end_time: break

[issue31539] asyncio.sleep may sleep less time then it should

2017-09-21 Thread Yury Selivanov
Yury Selivanov added the comment: > The performance issue was that the asyncio core loop was running in a loop but did nothing because of time rounding. When the next event was in a few nanoseconds, the e event burnt the CPU during seconds. It can be 15 ms on Windows or 1 ms when using p

[issue31452] asyncio.gather does not cancel tasks if one fails

2017-09-21 Thread Yury Selivanov
Yury Selivanov added the comment: > I'm afraid I no longer have all the details of this design in my head, and I > have no idea what the fix does (and no time to read up on everything). Let's say we have three tasks: t1, t2, t3. Then we use gather on them: await gather(t1

[issue31556] asyncio.wait_for can cancel futures faster with timeout==0

2017-09-22 Thread Yury Selivanov
Yury Selivanov added the comment: Do you have a use case where this optimization is important? -- ___ Python tracker <https://bugs.python.org/issue31556> ___ ___

[issue31556] asyncio.wait_for can cancel futures faster with timeout==0

2017-09-22 Thread Yury Selivanov
Yury Selivanov added the comment: I think this is a backwards incompatible change and thus will be rejected. Currently there's a guarantee that "wait_for" can throw a TimeoutError *only* when when you await it. fut = wait_for(something, 0) # some important code tr

[issue31556] asyncio.wait_for can cancel futures faster with timeout==0

2017-09-22 Thread Yury Selivanov
Yury Selivanov added the comment: You're right! Let's work on the PR then, I've left a review comment. -- ___ Python tracker <https://bugs.pyt

[issue21314] Document '/' in signatures

2018-11-21 Thread Yury Selivanov
Change by Yury Selivanov : -- nosy: -yselivanov ___ Python tracker <https://bugs.python.org/issue21314> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35456] asyncio.Task.set_result() and set_exception() missing docstrings (and Liskov sub. principle)

2018-12-11 Thread Yury Selivanov
Yury Selivanov added the comment: -1 on this; there is no clear win in doing this refactoring, only a hard to estimate chance of making a regression. Yahya, feel free to tackle other asyncio bugs or improvements, this one is just something that we aren't comfortable doing righ

[issue32810] Expose ags_gen and agt_gen in asynchronous generators

2018-12-15 Thread Yury Selivanov
Yury Selivanov added the comment: Please don't merge the PR. I'll need some time to think about this before giving it a green light. -- ___ Python tracker <https://bugs.python.o

[issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers

2018-12-18 Thread Yury Selivanov
Yury Selivanov added the comment: Dima, we'll likely address this in 3.8, when we land new SSL implementation. Meanwhile you can use uvloop where all these bugs should be fixed. -- ___ Python tracker <https://bugs.python.org/is

[issue35465] [asyncio] Document loop.add_signal_handler

2018-12-18 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset e3666fc8effb05b555121f4ab7388df59e21f8b4 by Yury Selivanov (Hrvoje Nikšić) in branch 'master': bpo-35465: Document _UnixSelectorEventLoop.add_signal_handler. (GH-11145) https://github.com/python/cpyt

[issue35465] [asyncio] Document loop.add_signal_handler

2018-12-18 Thread Yury Selivanov
Change by Yury Selivanov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement ___ Python tracker <https://bugs.python

[issue35465] [asyncio] Document loop.add_signal_handler

2018-12-18 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 12f3979b3807b448ca070b44bbc1597cf800f8a4 by Yury Selivanov (Miss Islington (bot)) in branch '3.7': bpo-35465: Document _UnixSelectorEventLoop.add_signal_handler. (GH-11145) (GH-11221) https://github.com/python/cpyt

[issue35527] Make fields selectively immutable in dataclasses

2018-12-18 Thread Yury Selivanov
Yury Selivanov added the comment: +1. I've tried to use `field(frozen=True)` today and was surprised it's not supported. -- nosy: +yselivanov ___ Python tracker <https://bugs.python.o

[issue35751] traceback.clear_frames manages to deadlock a background task

2019-01-16 Thread Yury Selivanov
Yury Selivanov added the comment: Very interesting. Thanks for reporting this issue. I'll definitely take a look at this before 3.8 is released. For 3.7 you'll likely have to find a workaround. -- ___ Python tracker <https://bu

[issue35749] Rewrite asyncio signal handler

2019-01-16 Thread Yury Selivanov
Yury Selivanov added the comment: > You are right, the issue is "theoretical", I didn't see problems with current > implementation. > The self-pipe buffer is pretty big, a chance to reach its limit is relatively > low. Actually, I disagree. The problem manif

[issue35749] Rewrite asyncio signal handler

2019-01-16 Thread Yury Selivanov
Change by Yury Selivanov : -- stage: resolved -> needs patch ___ Python tracker <https://bugs.python.org/issue35749> ___ ___ Python-bugs-list mailing list Un

[issue35826] Typo in example for async with statement with condition

2019-01-25 Thread Yury Selivanov
Yury Selivanov added the comment: Please submit a PR! -- components: +asyncio -Documentation keywords: +easy nosy: +asvetlov, yselivanov ___ Python tracker <https://bugs.python.org/issue35

[issue34971] add support for tls/ssl sessions in asyncio

2019-02-14 Thread Yury Selivanov
Yury Selivanov added the comment: Christian, do you think the sessions support shouldn't be added to asyncio in 3.8? -- ___ Python tracker <https://bugs.python.org/is

[issue34433] cancel all other pending child futures

2019-02-14 Thread Yury Selivanov
Yury Selivanov added the comment: This is a backwards incompatible change, unfortunately. Wait for the new TaskGroups API that will resolve this issue. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed _

[issue32363] Deprecate task.set_result() and task.set_exception()

2019-02-19 Thread Yury Selivanov
Yury Selivanov added the comment: > One reason why Task.cancel() is an incomplete replacement for > Task.set_exception() is that you don't have an easy way to communicate why > the task was ended. The result of the Task is bound to the result of the coroutine it wraps. If

[issue32363] Deprecate task.set_result() and task.set_exception()

2019-02-19 Thread Yury Selivanov
Yury Selivanov added the comment: >> There's no clear reason to complicate the Task<->coroutine relationship by >> allowing to inject arbitrary exceptions into running coroutines. > My comment was more about CancelledError rather than arbitrary exceptions. > Yo

[issue29703] Fix asyncio to support instantiation of new event loops in subprocesses

2017-03-03 Thread Yury Selivanov
Yury Selivanov added the comment: Yes, closing the issue. Thanks, Ned! -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue29471] AST: add an attribute to FunctionDef to distinguish functions from generators and coroutines

2017-03-03 Thread Yury Selivanov
Yury Selivanov added the comment: I'm not sure we need this feature TBH. -- ___ Python tracker <http://bugs.python.org/issue29471> ___ ___ Python-bugs-list m

[issue29271] Task.current_task(None) returns unexpected result

2017-03-03 Thread Yury Selivanov
Changes by Yury Selivanov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue28893] Make sure exceptions raised in __aiter__ are properly chained in ceval

2017-03-03 Thread Yury Selivanov
Changes by Yury Selivanov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue24329] __qualname__ and __slots__

2017-03-03 Thread Yury Selivanov
Yury Selivanov added the comment: Xiang, can you make a PR? -- ___ Python tracker <http://bugs.python.org/issue24329> ___ ___ Python-bugs-list mailing list Unsub

[issue24329] __qualname__ and __slots__

2017-03-03 Thread Yury Selivanov
Changes by Yury Selivanov : -- versions: -Python 3.5, Python 3.6 ___ Python tracker <http://bugs.python.org/issue24329> ___ ___ Python-bugs-list mailin

[issue29704] Can't read data from Transport after asyncio.SubprocessStreamProtocol closes

2017-03-03 Thread Yury Selivanov
Changes by Yury Selivanov : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.org/issue29704> ___ ___

[issue28963] Use-after-free in _asyncio_Future_remove_done_callback() of _asynciomodule.c

2017-03-03 Thread Yury Selivanov
Changes by Yury Selivanov : -- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.7 ___ Python tracker <http://bugs.python.or

[issue29742] asyncio get_extra_info() throws exception

2017-03-06 Thread Yury Selivanov
Yury Selivanov added the comment: > Thanks for the report and PR, but your fix is not obviously correct. Not for this particular asyncio method though, see asyncio PEP [1]. But there's an actual bug in the PR, instead of returning `None` we should return `default`. [

[issue29757] The loop in utility `socket.create_connection()` swallows previous errors

2017-03-09 Thread Yury Selivanov
Yury Selivanov added the comment: > Case (c) sidesteps the above questions. I like the (c) option. I don't think we should use logging/warnings here, as they can produce unwanted noise that few know how to silence. When the list of errors is passed as a second argument to the except

[issue29757] The loop in utility `socket.create_connection()` swallows previous errors

2017-03-09 Thread Yury Selivanov
Yury Selivanov added the comment: This is a new feature, so we can only push it to 3.7. -- nosy: +brett.cannon, haypo versions: -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker <http://bugs.python.org/issue29

[issue29600] Returning an exception object from a coroutine triggers implicit exception chaining?!?

2017-03-12 Thread Yury Selivanov
Changes by Yury Selivanov : -- pull_requests: +533 ___ Python tracker <http://bugs.python.org/issue29600> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29600] Returning an exception object from a coroutine triggers implicit exception chaining?!?

2017-03-12 Thread Yury Selivanov
Yury Selivanov added the comment: What a bizarre bug. Created a PR with a fix. Nathaniel, please put me in a nosy list when you submit issues about generators/coroutines. -- nosy: +yselivanov ___ Python tracker <http://bugs.python.

[issue29742] asyncio get_extra_info() throws exception

2017-03-12 Thread Yury Selivanov
Changes by Yury Selivanov : -- pull_requests: +534 ___ Python tracker <http://bugs.python.org/issue29742> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29742] asyncio get_extra_info() throws exception

2017-03-12 Thread Yury Selivanov
Changes by Yury Selivanov : -- pull_requests: +535 ___ Python tracker <http://bugs.python.org/issue29742> ___ ___ Python-bugs-list mailing list Unsubscribe:

<    1   2   3   4   5   6   7   8   9   10   >