[issue39191] Coroutine is awaited despite an exception in run_until_complete()

2020-01-07 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 4112a3da2e01ecc19e9f54b8ac7b383b6f5e85c8 by Andrew Svetlov in branch '3.8': [3.8] bpo-39191: Fix RuntimeWarning in asyncio test (GH-17863) (#17894) https://github.com/python/cpython/commit/4112a3da2e01ecc19e9f54b8ac7b383b6f5e85c8

[issue39191] Coroutine is awaited despite an exception in run_until_complete()

2020-01-07 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +17305 pull_request: https://github.com/python/cpython/pull/17895 ___ Python tracker <https://bugs.python.org/issue39

[issue39191] Coroutine is awaited despite an exception in run_until_complete()

2020-01-07 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +17304 pull_request: https://github.com/python/cpython/pull/17894 ___ Python tracker <https://bugs.python.org/issue39

[issue39191] Coroutine is awaited despite an exception in run_until_complete()

2020-01-06 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +17280 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/17863 ___ Python tracker <https://bugs.python.org/issu

[issue39191] Coroutine is awaited despite an exception in run_until_complete()

2020-01-06 Thread Andrew Svetlov
Andrew Svetlov added the comment: Ooh, you are right. The warning is printed only, test runner thinks that the test is ok. I'll prepare a quick fix. -- assignee: -> asvetlov status: closed -> open ___ Python tracker <https://bugs.p

[issue39191] Coroutine is awaited despite an exception in run_until_complete()

2020-01-06 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thanks for the report! -- ___ Python tracker <https://bugs.python.org/issue39191> ___ ___ Python-bugs-list mailing list Unsub

[issue39191] Coroutine is awaited despite an exception in run_until_complete()

2020-01-04 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39191] Coroutine is awaited despite an exception in run_until_complete()

2020-01-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 9c145e19fba53369da5cd23a1e71de489836f827 by Andrew Svetlov in branch '3.7': [3.7] bpo-39191: Don't spawn a task before failing (GH-17796) (#17821) https://github.com/python/cpython/commit/9c145e19fba53369da5cd23a1e71de489836f827

[issue39191] Coroutine is awaited despite an exception in run_until_complete()

2020-01-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 867d8333ce6a7f74191ad464acc609d4a04e4acb by Andrew Svetlov in branch '3.8': [3.8] bpo-39191: Don't spawn a task before failing (GH-17796) (GH-17820) https://github.com/python/cpython/commit/867d8333ce6a7f74191ad464acc609d4a04e4acb

[issue39191] Coroutine is awaited despite an exception in run_until_complete()

2020-01-04 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +17247 pull_request: https://github.com/python/cpython/pull/17821 ___ Python tracker <https://bugs.python.org/issue39

[issue39191] Coroutine is awaited despite an exception in run_until_complete()

2020-01-04 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +17246 pull_request: https://github.com/python/cpython/pull/17820 ___ Python tracker <https://bugs.python.org/issue39

[issue39191] Coroutine is awaited despite an exception in run_until_complete()

2020-01-02 Thread Andrew Svetlov
Change by Andrew Svetlov : -- keywords: +patch pull_requests: +17231 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17796 ___ Python tracker <https://bugs.python.org/issu

[issue39191] Coroutine is awaited despite an exception in run_until_complete()

2020-01-02 Thread Andrew Svetlov
Andrew Svetlov added the comment: Agree, this is a bug. -- versions: +Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue39191> ___ ___

[issue34790] Deprecate passing coroutine objects to asyncio.wait()

2019-12-30 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 89aa7f0ede1a11c020e83f24394593c577a61509 by Andrew Svetlov (Kyle Stanley) in branch 'master': bpo-34790: Implement deprecation of passing coroutines to asyncio.wait() (GH-16977) https://github.com/python/cpython/commit

[issue39129] Incorrect import of TimeoutError while creating happy eyeballs connection

2019-12-24 Thread Andrew Svetlov
Andrew Svetlov added the comment: The main problem of mock-based tests in asyncio is that the tests become unreliably very easy after mocked asyncio internal changes. I'm +0 on adding the proposed test. The better idea is serving on explicit AF_INET '127.0.0.1:' address when the connection

[issue39115] Clarify Python MIME type

2019-12-24 Thread Andrew Svetlov
Andrew Svetlov added the comment: As you mentioned, IANA did not registry any programming language except JavaScript; I think that's fine. You can consider text/x-python and application/x-python-code as unofficial but permanent MIME types that are used in Python written programs at least

[issue39129] Incorrect import of TimeoutError while creating happy eyeballs connection

2019-12-24 Thread Andrew Svetlov
Change by Andrew Svetlov : -- keywords: +patch pull_requests: +17146 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17691 ___ Python tracker <https://bugs.python.org/issu

[issue39129] Incorrect import of TimeoutError while creating happy eyeballs connection

2019-12-24 Thread Andrew Svetlov
Andrew Svetlov added the comment: You are right. Hmm, I thought that Happy Eyeballs is better tested. -- ___ Python tracker <https://bugs.python.org/issue39

[issue39128] Document happy eyeball parameters in loop.create_connection signature docs

2019-12-24 Thread Andrew Svetlov
Andrew Svetlov added the comment: Ideally, a small chapter with a description of Happy Eyeballs algorithm would be nice to have but I don't insist. Updating the method signature is a big step anyway. -- keywords: +easy ___ Python tracker <ht

[issue38225] iscoroutinefunction broken with cython - allow tagging of functions as async?

2019-12-24 Thread Andrew Svetlov
Andrew Svetlov added the comment: I'd like to hear Yuri's opinion for the idea of adding an attribute. Another question is the name: I have proposed __awaitable__ but maybe __async__ is slightly better? -- ___ Python tracker <ht

[issue39115] Clarify Python MIME type

2019-12-23 Thread Andrew Svetlov
Andrew Svetlov added the comment: If you are not talking about IANA registration (I doubt if Python needs it) what do you propose? I've missed what do you want to update in Python or its docs to satisfy your needs. -- ___ Python tracker <ht

[issue39115] Clarify Python MIME type

2019-12-23 Thread Andrew Svetlov
Andrew Svetlov added the comment: Do you mean adding a record to https://www.iana.org/assignments/media-types/media-types.xhtml? -- nosy: +asvetlov ___ Python tracker <https://bugs.python.org/issue39

[issue39097] The description of multiprocessing.cpu_count() is not accurate in the documentation

2019-12-20 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue39097> ___ ___

[issue39097] The description of multiprocessing.cpu_count() is not accurate in the documentation

2019-12-19 Thread Andrew Svetlov
Andrew Svetlov added the comment: While your suggestion is technically correct, CPU as a shortcut for "logical processor" is very common in software engineering. For me, "number of CPU threads" is more unclear than just "number of CPUs&quo

[issue39085] Improve docs for await expression

2019-12-18 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thanks for raising the very interesting question! Sorry, my English is bad; I cannot help with docs too much. Anyway, technically an awaited coroutine *can* be suspended but the suspension is not always necessary. The most deep awaited function decides

[issue39060] asyncio.Task.print_stack doesn't print the full stack

2019-12-16 Thread Andrew Svetlov
Andrew Svetlov added the comment: Technically the output is correct: a stack for async function call doesn't contain the outer async function that is used for awaiting. Agree, it may sound confusing, but `await f()` is not the same as just `f()`. Perhaps we can provide *alternative* API

[issue39034] Documentation: Coroutines

2019-12-13 Thread Andrew Svetlov
Andrew Svetlov added the comment: I suggest thinking that gather() implicitly creates tasks for running coroutines. The documentation is technically correct, enumeration of all potentially endless list of things that calls `create_task()` for wrapping passed coroutine is not very helpful

[issue39027] run_coroutine_threadsafe uses wrong TimeoutError

2019-12-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: futures._chain_future() should convert exceptions. Seems _convert_future_exc() does this work already but maybe it fails somehow. We need to investigate more. -- nosy: +asvetlov ___ Python tracker <ht

[issue33762] temp file isn't IOBase

2019-12-10 Thread Andrew Svetlov
Andrew Svetlov added the comment: Agree, aiohttp can be fixed easily. If somebody wants to make a pull request -- you are welcome! https://github.com/aio-libs/aiohttp/issues/4432 -- ___ Python tracker <https://bugs.python.org/issue33

[issue34793] Remove support for "with (await asyncio.lock):"

2019-12-09 Thread Andrew Svetlov
Change by Andrew Svetlov : -- keywords: +patch pull_requests: +17011 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17533 ___ Python tracker <https://bugs.python.org/issu

[issue38856] wait_closed() can raise ConnectionResetError

2019-12-09 Thread Andrew Svetlov
Change by Andrew Svetlov : -- assignee: -> asvetlov ___ Python tracker <https://bugs.python.org/issue38856> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue38856] wait_closed() can raise ConnectionResetError

2019-12-09 Thread Andrew Svetlov
Andrew Svetlov added the comment: Sorry, I've missed this issue. I'll address it in a while. -- ___ Python tracker <https://bugs.python.org/issue38856> ___ ___

[issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled

2019-12-09 Thread Andrew Svetlov
Andrew Svetlov added the comment: As I wrote, I don't think that we should fix the code but the failed uvloop test is slightly weird instead. Maybe I'm wrong, I need to communicate with Yuri anyway. -- ___ Python tracker <https://bugs.python.

[issue39006] test_asyncio: sendfile tests fail on AMD64 Debian root 3.7 when _ssl is missing

2019-12-09 Thread Andrew Svetlov
Andrew Svetlov added the comment: Sorry, my fault. -- nosy: +asvetlov ___ Python tracker <https://bugs.python.org/issue39006> ___ ___ Python-bugs-list mailin

[issue38994] Implement __class_getitem__ for PathLike

2019-12-08 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38242] Revert the new asyncio Streams API

2019-12-08 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled

2019-12-08 Thread Andrew Svetlov
Andrew Svetlov added the comment: Not sure if failed uvloop tests are correct. The scenario is like the following: 1. Suppose we have an unblocking socket connected to peer. 2. Create a task for reading data: task = asyncio.create_task(loop.sock_read(sock, 1)) Note, the task is not started

[issue38979] ContextVar[str] should return ContextVar class, not None

2019-12-08 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38652] Remove/update provisional note for asyncio.BufferedProtocol

2019-12-07 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-12-07 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 930cef2770b641f49e69b67840daaa53b65cd0e0 by Andrew Svetlov in branch '3.8': [3.8] bpo-37404: Raising value error if an SSLSocket is passed to asyncio functions (GH-16457) (#17496) https://github.com/python/cpython/commit

[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-12-07 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.or

[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-12-07 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +16974 pull_request: https://github.com/python/cpython/pull/17496 ___ Python tracker <https://bugs.python.org/issue37

[issue38986] Suppport TaskWakeupMethWrapper.__self__ to conform asyncio _format_handle logic

2019-12-07 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38529] Python 3.8 improperly warns about closing properly closed streams

2019-12-07 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38986] Suppport TaskWakeupMethWrapper.__self__ to conform asyncio _format_handle logic

2019-12-07 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +16972 pull_request: https://github.com/python/cpython/pull/17494 ___ Python tracker <https://bugs.python.org/issue38

[issue38529] Python 3.8 improperly warns about closing properly closed streams

2019-12-07 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 7ddcd0caa4c2e6b43265df144f59c5aa508a94f2 by Andrew Svetlov in branch 'master': bpo-38529: Fix asyncio stream warning (GH-17474) https://github.com/python/cpython/commit/7ddcd0caa4c2e6b43265df144f59c5aa508a94f2

[issue38978] Implement __class_getitem__ for Future, Task, Queue

2019-12-07 Thread Andrew Svetlov
Andrew Svetlov added the comment: Done. I think that applying the same to PathLike makes sense as well, but it deserves another issue. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38978] Implement __class_getitem__ for Future, Task, Queue

2019-12-07 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thanks, Batuhan! -- ___ Python tracker <https://bugs.python.org/issue38978> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38978] Implement __class_getitem__ for Future, Task, Queue

2019-12-07 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38979] ContextVar[str] should return ContextVar class, not None

2019-12-07 Thread Andrew Svetlov
Andrew Svetlov added the comment: I think it should look like the corresponding function from multidict: https://github.com/aio-libs/multidict/blob/master/multidict/_multidict.c#L803-L808 Please note, the method definition also should be updated, see https://github.com/aio-libs/multidict

[issue38986] Suppport TaskWakeupMethWrapper.__self__ to conform asyncio _format_handle logic

2019-12-06 Thread Andrew Svetlov
Andrew Svetlov added the comment: For the note: TaskStepMethWrapper has the same fix already, TaskWakeupMethWrapper was accidentally missed. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38986] Suppport TaskWakeupMethWrapper.__self__ to conform asyncio _format_handle logic

2019-12-06 Thread Andrew Svetlov
Change by Andrew Svetlov : -- keywords: +patch pull_requests: +16963 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17484 ___ Python tracker <https://bugs.python.org/issu

[issue38608] Undocumented behavior that IsolatedAsyncioTestCase would enable event loop debug mode

2019-12-06 Thread Andrew Svetlov
Andrew Svetlov added the comment: The output will be fixed by #38986 Nothing to do here. -- resolution: -> works for me stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38986] Suppport TaskWakeupMethWrapper.__self__ to conform asyncio _format_handle logic

2019-12-06 Thread Andrew Svetlov
New submission from Andrew Svetlov : _format_handle() behaves differently if handle._callback.__self__ is asyncio.Task instance. To follow this logic TaskWakeupMethWrapper from _asynciomodule.c should support the corresponding member. The fix is very desired for analyzing slow callbacks

[issue38955] Non indemnpotent behavior of asyncio.get_event_loop and asyncio.run sequence.

2019-12-06 Thread Andrew Svetlov
Andrew Svetlov added the comment: Asyncio has a few own exceptions, the library tries to utilize existing ones, e.g. ValueError, TypeError, and OSError family. RuntimeError falls into this category. get_event_loop() never returns None, it was from very beginning. If we change it existing

[issue38973] Shared Memory List Returns 0 Length

2019-12-06 Thread Andrew Svetlov
Change by Andrew Svetlov : -- nosy: -asvetlov ___ Python tracker <https://bugs.python.org/issue38973> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38973] Shared Memory List Returns 0 Length

2019-12-06 Thread Andrew Svetlov
Andrew Svetlov added the comment: Antoine is marked as the multiprocessing expert -- nosy: +pitrou ___ Python tracker <https://bugs.python.org/issue38

[issue38978] Implement __class_getitem__ for Future, Task, Queue

2019-12-05 Thread Andrew Svetlov
Andrew Svetlov added the comment: I thought __class_getitem__ was invented exactly to simplify generic types support. The only thing that confuses me an example from PEP 560: class MyList: def __getitem__(self, index): return index + 1 def __class_getitem__(cls, item

[issue38529] Python 3.8 improperly warns about closing properly closed streams

2019-12-05 Thread Andrew Svetlov
Change by Andrew Svetlov : -- versions: +Python 3.9 ___ Python tracker <https://bugs.python.org/issue38529> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38529] Python 3.8 improperly warns about closing properly closed streams

2019-12-05 Thread Andrew Svetlov
Change by Andrew Svetlov : -- keywords: +patch pull_requests: +16956 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17474 ___ Python tracker <https://bugs.python.org/issu

[issue38979] ContextVar[str] should return ContextVar class, not None

2019-12-05 Thread Andrew Svetlov
Change by Andrew Svetlov : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue38979> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue38979] ContextVar[str] should return ContextVar class, not None

2019-12-05 Thread Andrew Svetlov
New submission from Andrew Svetlov : The issue is minor, I suspect nobody wants to derive from ContextVar class. The generic implementation for __class_getitem__ is returning unmodified self argument. Yuri, is there a reason to behave differently in the case of ContextVar? If no, we can

[issue38978] Implement __class_getitem__ for Future, Task, Queue

2019-12-05 Thread Andrew Svetlov
New submission from Andrew Svetlov : Typeshed declares asyncio.Future, asyncio.Task and asyncio.Queue as generic types, which is 100% correct. The problem is that these classes don't support generic instantiation in runtime, e.g. Future[str] raises TypeError. The feature should

[issue38846] async: Return context manager from open(_unix)_connection

2019-12-05 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue38846> ___ ___

[issue38951] Use threading.main_thread() check in asyncio

2019-12-05 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38973] Shared Memory List Returns 0 Length

2019-12-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: As I see, the problem is not related to asyncio at all. -- components: -asyncio ___ Python tracker <https://bugs.python.org/issue38

[issue38863] Improve is_cgi() in http.server

2019-12-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thanks, Pablo! -- ___ Python tracker <https://bugs.python.org/issue38863> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38955] Non indemnpotent behavior of asyncio.get_event_loop and asyncio.run sequence.

2019-12-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: I think now it is too late for changing the behavior. In the ideal world, get_event_loop() should never exist, maybe we can deprecate/remove it eventually. run() should be used for executing async code; get_running_loop() for getting a reference

[issue38951] Use threading.main_thread() check in asyncio

2019-12-01 Thread Andrew Svetlov
Change by Andrew Svetlov : -- versions: -Python 3.8 ___ Python tracker <https://bugs.python.org/issue38951> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38951] Use threading.main_thread() check in asyncio

2019-12-01 Thread Andrew Svetlov
New submission from Andrew Svetlov : Now we use private `isinstance(thread, threading._MainThread)` check. main_thread() function was added in Python 3.4 by me to avoid it. Sorry, I forgot to update asyncio code. The fix is trivial, I very appreciate if somebody will take care

[issue38817] Immutable types inplace operations work incorrect in async

2019-11-28 Thread Andrew Svetlov
Andrew Svetlov added the comment: Raymond correctly spotted the problem. I think we should just close the issue. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-11-23 Thread Andrew Svetlov
Andrew Svetlov added the comment: I support Antoine's proposal. Let's remove the suspicious option if we cannot handle it correctly in a secured manner. If people still want to use SO_REUSEADDR they can apply it manually, old good transp.get_extra_info("socket") is still

[issue37334] Add a cancel method to asyncio Queues

2019-11-23 Thread Andrew Svetlov
Andrew Svetlov added the comment: Lists of producers/consumers are just lists of future objects. I don't think that we need to expose futures in high-level public API. -- ___ Python tracker <https://bugs.python.org/issue37

[issue37334] Add a cancel method to asyncio Queues

2019-11-22 Thread Andrew Svetlov
Andrew Svetlov added the comment: My point is that closing (or cancellation) should be one-way ticket. Is there a case where continuing after stopping? -- ___ Python tracker <https://bugs.python.org/issue37

[issue38863] Improve is_cgi() in http.server

2019-11-22 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.or

[issue37334] Add a cancel method to asyncio Queues

2019-11-21 Thread Andrew Svetlov
Andrew Svetlov added the comment: 1. Suppose we have 2 concurrent producers, a single queue and a consumer. 2. The first producer puts several items into the queue and then calls q.close() 3. The second producer also puts several items. It doesn't matter the second producer closes the queue

[issue38857] AsyncMock issue with awaitable return_value/side_effect/wraps

2019-11-21 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset b2744c1be73f5af0d2dc4b952389efc90c8de94e by Andrew Svetlov (Lisa Roach) in branch '3.8': [3.8] bpo-38857: AsyncMock fix for awaitable values and StopIteration fix [3.8] (GH-17269) (#17304) https://github.com/python/cpython/commit

[issue38874] asyncio.Queue: putting items out of order when it is full

2019-11-21 Thread Andrew Svetlov
Andrew Svetlov added the comment: I still don't understand the problem. If the queue is full new items still are added in the order of `await q.put()` calls. If there are multiple producers the order of adding items into the queue is still the order of `q.put()`. Do you have a code example

[issue38841] [asyncio] bind() on a unix socket raises PermissionError on Android for a non-root user

2019-11-19 Thread Andrew Svetlov
Andrew Svetlov added the comment: Please feel free to make a PR for applying @skip_unless_bind_unix_socket decorator. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38841] [asyncio] bind() on a unix socket raises PermissionError on Android for a non-root user

2019-11-19 Thread Andrew Svetlov
Andrew Svetlov added the comment: Do I understand you correctly: is Android forbids UDP Unix sockets for non-root user? Maybe the socket path should point on another location to get the test passed? -- ___ Python tracker <https://bugs.python.

[issue35409] Async generator might re-throw GeneratorExit on aclose()

2019-11-19 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 -Python 3.6 ___ Python tracker <https://bugs.python.or

[issue38846] async: Return context manager from open(_unix)_connection

2019-11-19 Thread Andrew Svetlov
Andrew Svetlov added the comment: >From my understanding, Yuri doesn't want to improve the existing streaming API >but invent something blessing new. The improvement like you proposed has a very low chance to be accepted. -- ___ Python t

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-11-18 Thread Andrew Svetlov
Andrew Svetlov added the comment: I see two proposals: 1. Change the default for reuse_address flag 2. Document existing behavior as dangerous. What is the suggestion? Pick one, please :) -- ___ Python tracker <https://bugs.python.org/issue37

[issue38823] Improve stdlib module initialization error handling.

2019-11-17 Thread Andrew Svetlov
Andrew Svetlov added the comment: Is anything left to be done for the issue? -- nosy: +asvetlov versions: +Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue38

[issue38591] Deprecate Process Child Watchers

2019-11-15 Thread Andrew Svetlov
Andrew Svetlov added the comment: > So are we at least in agreement for starting with deprecating > FastChildWatcher? I think so. It will take a long before we remove it though. -- ___ Python tracker <https://bugs.python.org/i

[issue38591] Deprecate Process Child Watchers

2019-11-14 Thread Andrew Svetlov
Andrew Svetlov added the comment: To be clear: I mean that FastChildWatcher is safe only if all process's code spaws subprocesses by FastChildWatcher. If ProcessPoolExecutor or direct subprocess calls are used the watcher is unsafe. If some C extension spawns new processes on its own (e.g

[issue38692] add a pidfd child process watcher

2019-11-14 Thread Andrew Svetlov
Andrew Svetlov added the comment: Sorry for the late review. PidfdChildWatcher should be enumerated in unix_events.py:__all__ to make the class visible by asyncio import rules. Kyle, would you make a post-fix PR? -- resolution: fixed -> status: closed ->

[issue38785] Segmentation fault in asyncio

2019-11-13 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.or

[issue38785] Segmentation fault in asyncio

2019-11-13 Thread Andrew Svetlov
Change by Andrew Svetlov : -- keywords: +patch pull_requests: +16654 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17144 ___ Python tracker <https://bugs.python.org/issu

[issue38785] Segmentation fault in asyncio

2019-11-13 Thread Andrew Svetlov
Andrew Svetlov added the comment: Looks like get_future_loop() function misses ENSURE_FUTURE_ALIVE macro call. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38785] Segmentation fault in asyncio

2019-11-13 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thanks for the report! I would say that deriving from the future class without calling super().__init__() is an error. After fixing this the snippet raises expected "RuntimeError: yield was used instead of yield from in task&q

[issue38608] Undocumented behavior that IsolatedAsyncioTestCase would enable event loop debug mode

2019-11-07 Thread Andrew Svetlov
Andrew Svetlov added the comment: Slower by percents, not in the factor of times. I guess for tests it is satisfactory. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38737] StreamReaderProtocol.eof_received() should return True only for _SSLProtocolTransport

2019-11-07 Thread Andrew Svetlov
Andrew Svetlov added the comment: StreamReaderProtocol is tightly coupled with builtin asyncio transports. Even worse, it is an internal class actually. If you want a code to operate with custom transports -- perhaps you need to reimplement streams for them as well. -- resolution

[issue38608] Undocumented behavior that IsolatedAsyncioTestCase would enable event loop debug mode

2019-11-05 Thread Andrew Svetlov
Andrew Svetlov added the comment: I've assigned myself to never forget about the issue; if somebody wants to fix _CTask and TaskWakeupMethWrapper representation -- you are welcome -- assignee: -> asvetlov ___ Python tracker <

[issue38608] Undocumented behavior that IsolatedAsyncioTestCase would enable event loop debug mode

2019-11-05 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thanks for the clarification. I forgot about this thing; the output can be improved sure. As a workaround you can use the following hack:: import asyncio.task asyncio.task.Task = asyncio.task._PyTask IIRC the pure python version prints a coroutine name

[issue38285] Asyncio BaseEventLoop can support socket types other than SOCK_STREAM

2019-11-05 Thread Andrew Svetlov
Andrew Svetlov added the comment: My point is: without a deep understanding we cannot "just enable" a new protocol. The evidence that it works in some limited scenarios is not enough for opening the can of worms. It is true for seqpacket, and especially true for other even not

[issue38692] add a pidfd child process watcher

2019-11-05 Thread Andrew Svetlov
Andrew Svetlov added the comment: Nathaniel, you may be interested in the pidfd_open(), at least in adding the function to os module. -- nosy: +njs ___ Python tracker <https://bugs.python.org/issue38

[issue38692] add a pidfd child process watcher

2019-11-05 Thread Andrew Svetlov
Andrew Svetlov added the comment: Awesome! I think the patch can be splitted in os.pidfd_open() and asyncio part itself. os modification is clear. asyncio part looks correct after the brief view. My the main question is: how to detect if the new watcher can be used or asyncio should

[issue38285] Asyncio BaseEventLoop can support socket types other than SOCK_STREAM

2019-11-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: Can recv() get two messages at once? What is the behavior if the buffer size passed into recv() is smaller than the message length? -- ___ Python tracker <https://bugs.python.org/issue38

[issue38608] Undocumented behavior that IsolatedAsyncioTestCase would enable event loop debug mode

2019-11-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: At first, would be nice to figure out what "invalid line reported" does mean. What text is reported and what is expected? -- ___ Python tracker <https://bugs.python.o

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