[issue38591] Deprecate Process Child Watchers

2019-10-25 Thread Andrew Svetlov
Andrew Svetlov added the comment: ThreadedChildWatcher starts a thread per process but has O(1) complexity. MultiLoopChildWatcher doesn't spawn threads, it can be used safely with asyncio loops spawn in multiple threads. The complexity is O(N) plus no other code should contest for SIG

[issue38591] Deprecate Process Child Watchers

2019-10-26 Thread Andrew Svetlov
Andrew Svetlov added the comment: My non-LTS Ubuntu also has 5.3 kernel but I'm talking about the oldest supported RHEL/CentOS. That's why pidfd_open() cannot be a single implementation. It's so new; my local man-pages system has not a record about the API yet (but the web ha

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

2019-10-27 Thread Andrew Svetlov
Andrew Svetlov added the comment: I think we can add `DeprecationWarning` for 3.9. Since it is a) just a warning b) already marked as deprecated in docs -- the harm is minimal. Honestly, we just missed the issue when were prepared for 3.8

[issue38599] Deprecate creation of asyncio object when the loop is not running

2019-10-27 Thread Andrew Svetlov
New submission from Andrew Svetlov : Consider the following code: import asyncio q = asyncio.Queue() async def main(): await asyncio.gather(q.put(1), q.get(1)) asyncio.run(main()) This code just hangs since run() creates a loop but queue is bound with another (default) event loop

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

2019-10-27 Thread Andrew Svetlov
Andrew Svetlov added the comment: > If we add the deprecation warning just for 3.9, would the removal release > also be pushed forward? Yes, deprecating in 3.9 with removal in 3.11 is fine. Regarding 3.8 release notes update -- not sure if it is needed flr docs-only change.

[issue38314] Implement unix read_pipe.is_reading() method

2019-10-27 Thread Andrew Svetlov
Andrew Svetlov added the comment: Please do. -- ___ Python tracker <https://bugs.python.org/issue38314> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2019-10-27 Thread Andrew Svetlov
Andrew Svetlov added the comment: lgtm -- ___ Python tracker <https://bugs.python.org/issue34790> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38599] Deprecate creation of asyncio object when the loop is not running

2019-10-27 Thread Andrew Svetlov
Andrew Svetlov added the comment: At least it is my learned lesson from aiohttp development. -- ___ Python tracker <https://bugs.python.org/issue38599> ___ ___

[issue38599] Deprecate creation of asyncio object when the loop is not running

2019-10-27 Thread Andrew Svetlov
Andrew Svetlov added the comment: I have a different feeling: we should start raising deprecation for asyncio.Queue() if it is created without running event loop. It required `get_event_loop()` and `loop.is_running()` checks. Later the pair can be replaced with `get_running_loop()`. I

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

2019-10-28 Thread Andrew Svetlov
Andrew Svetlov added the comment: This print comes from asyncio debug mode when async function is blocked by time longer than 0.1 sec (see loop.slow_callback_duration at loop.slow_callback_duration). Usually, it is a sign of a problem in user code, e.g. something should be pushed into

[issue34975] start_tls() difficult when using asyncio.start_server()

2019-10-28 Thread Andrew Svetlov
Andrew Svetlov added the comment: I think it should be closed; Yuri thinks that current streams API is frozen for the sake of shiny brand new streams (don't exist yet). -- resolution: -> wont fix status: open -> closed ___ Python trac

[issue38599] Deprecate creation of asyncio object when the loop is not running

2019-10-28 Thread Andrew Svetlov
Andrew Svetlov added the comment: I'm pretty happy with asyncio.run() functionalit. I used run() for the bug demonstration, but the example can be rewritten easily without this function. The problem is not in run() but in an object lifecycle. Implicit loop creation plus module-

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

2019-10-29 Thread Andrew Svetlov
Change by Andrew Svetlov : -- components: +asyncio nosy: +yselivanov ___ Python tracker <https://bugs.python.org/issue38608> ___ ___ Python-bugs-list mailin

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

2019-10-29 Thread Andrew Svetlov
Andrew Svetlov added the comment: Well, if the reported line is invalid it should be fixed -- ___ Python tracker <https://bugs.python.org/issue38608> ___ ___

[issue32309] Implement asyncio.run_in_executor shortcut

2019-11-01 Thread Andrew Svetlov
Andrew Svetlov added the comment: `run` should be awaitable method, see #38430 -- ___ Python tracker <https://bugs.python.org/issue32309> ___ ___ Python-bug

[issue32309] Implement asyncio.run_in_executor shortcut

2019-11-01 Thread Andrew Svetlov
Andrew Svetlov added the comment: Paul's version looks better. Two notes: 1. get_running_loop() should be used instead of get_event_loop() 2. There is no `await executer.shutdown()` API, the method is synchronous. -- ___ Python tracker &

[issue38664] await execution order leads to throw or bad syntax

2019-11-01 Thread Andrew Svetlov
Andrew Svetlov added the comment: What patch are you talking about? For me, patch means something special; e.g. working fork of CPython where the proposed idea is implemented. I read await coro()[key] as 1. Function named coro() returns a dict-like object 2. An element under key is selected

[issue38430] Memory leak in ThreadPoolExecutor + run_in_executor

2019-11-01 Thread Andrew Svetlov
Andrew Svetlov added the comment: I thought about returning a special subclass. Future has too rich API: get_loop(), done(), result() etc. What's about returning the proxy object with future instance embedded; the object raises DeprecationWarning for everythin except __repr__, __del_

[issue38430] Memory leak in ThreadPoolExecutor + run_in_executor

2019-11-02 Thread Andrew Svetlov
Andrew Svetlov added the comment: The API exists, people use it and get the memory leak. We should either remove the API (not realistic dream at least for many years) or fix it. There is no choice actually. -- ___ Python tracker <ht

[issue37373] Configuration of windows event loop for libraries

2019-11-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: IOCTL_AFD_POLL looks interesting. I wonder if it is 100% reliable; we can miss some edge case easily. -- ___ Python tracker <https://bugs.python.org/issue37

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

2019-11-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: For each type, we need at least a test that creates a socket pair and successfully transfers data through the wire. I don't know what additional things are required. For example, on reading about SOCK_SEQ_PACKET I've found that recvmsg()

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

2019-11-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: How to get the message boundary without recvmsg()? Sorry, I'm not familiar with seqpacket. -- ___ Python tracker <https://bugs.python.org/is

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

2019-11-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: Another question: does SSL/TLS make sense for seqpacket? -- ___ Python tracker <https://bugs.python.org/issue38285> ___ ___

[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

[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

[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

[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

[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

[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 at

[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

[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-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

[issue43736] asyncio create_task() odd behavior

2021-04-06 Thread Andrew Svetlov
Andrew Svetlov added the comment: 1. Please consider `await` as a 'yield point': the point where the current task may be suspended to get other tasks a chance to be executed. It can be any `await`, not necessarily waiting for a task. Just a point where asyncio event loop gives a

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

2021-04-13 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thanks for the reminder. You are correct, the mentioned PR should set _SSLProtocolTransport._start_tls_compatible to True -- ___ Python tracker <https://bugs.python.org/issue37

[issue44011] Borrow asyncio ssl implementation from uvloop

2021-05-02 Thread Andrew Svetlov
New submission from Andrew Svetlov : There is a PR created a long time ago. Finally, I've ported tests for it also. The documentation doesn't mention new ssh_shutdown_timeout parameter yet. The latest changes from https://github.com/MagicStack/uvloop/pull/385 can be applied

[issue44011] Borrow asyncio ssl implementation from uvloop

2021-05-02 Thread Andrew Svetlov
Change by Andrew Svetlov : -- keywords: +patch pull_requests: +24507 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17975 ___ Python tracker <https://bugs.python.org/issu

[issue44011] Borrow asyncio ssl implementation from uvloop

2021-05-02 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 5fb06edbbb769561e245d0fe13002bab50e2ae60 by Andrew Svetlov in branch 'master': bpo-44011: New asyncio ssl implementation (#17975) https://github.com/python/cpython/commit/5fb06edbbb769561e245d0fe13002b

[issue44011] Borrow asyncio ssl implementation from uvloop

2021-05-03 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +24526 pull_request: https://github.com/python/cpython/pull/25842 ___ Python tracker <https://bugs.python.org/issue44

[issue44011] Borrow asyncio ssl implementation from uvloop

2021-05-03 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +24529 pull_request: https://github.com/python/cpython/pull/25846 ___ Python tracker <https://bugs.python.org/issue44

[issue41756] Do not always use exceptions to return result from coroutine

2021-05-05 Thread Andrew Svetlov
Change by Andrew Svetlov : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue41756> ___ ___ Pyth

[issue43832] asyncio + multiprocessing = core dump in sem_trywait

2021-07-02 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue44604] [Enhancement] Asyncio task decorator to provide interface to define async DAGs (similar to dask's delayed interface)

2021-07-13 Thread Andrew Svetlov
Andrew Svetlov added the comment: I'm not convinced why @task decorator should be a part of asyncio. You can provide the implementation as a part of some third-party library on pypy.org. Looks like it doesn't require any change of asyn

[issue45194] asyncio scheduler jitter

2021-09-14 Thread Andrew Svetlov
Andrew Svetlov added the comment: asyncio provides the preemptive concurrency, not the real-time one. It means that the exact time of task switches depends on other tasks' execution and can vary by design. Sorry, the jitter is unavoidable. -- resolution: -> wont f

[issue45262] crash if asyncio is used before and after re-initialization if using python embedded in an application

2021-09-22 Thread Andrew Svetlov
Andrew Svetlov added the comment: I guess the fix requires switching C Extension types from static to heap for _asyncio module. It is possible for sure but requires a non-trivial amount of work. We need a champion for the issue. -- ___ Python

[issue45416] "loop argument must agree with lock" instantiating asyncio.Condition

2021-10-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thanks, guys! -- ___ Python tracker <https://bugs.python.org/issue45416> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45416] "loop argument must agree with lock" instantiating asyncio.Condition

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

[issue45671] str(CancelledError()) is empty

2021-10-29 Thread Andrew Svetlov
Andrew Svetlov added the comment: I don't think that we need to change something with the current behavior. It exists for years; very many Python exceptions return an empty string on `str(exc)` but return something useful on `repr(exc)`. If you arguing to change the behavior -- all

[issue45625] Add support for top-level await

2021-11-02 Thread Andrew Svetlov
Andrew Svetlov added the comment: As people write above, Python supports multiple async frameworks, asyncio is not the single choice. You should select and maybe configure the async framework before executing your first `await` statement. That's why the proposal doesn't work

[issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6

2021-11-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: Tornado solution sounds weak; it can fail the server start if free ports are available. I concur with Eric, I'm not aware of an OS API call that binds both IPv4 and IPv6 to the same random port. -- ___ P

[issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6

2021-11-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: PR for documentation fix is appreciated. Random fails to bind the same port if free ports are available is kind of regression. Is tornado the only example or you are aware of other libraries with such behavior

[issue28533] Remove asyncore, asynchat and smtpd modules

2021-11-11 Thread Andrew Svetlov
Andrew Svetlov added the comment: > One concern I have is when users follow internet examples and look out for these modules or examples. There is an option: keep removed modules but replace each module content with 'raise ImportError("Please use instead")' stub. Th

[issue45792] contextvars.Token has wrong module name in Sphinx's objects.inv

2021-11-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset e501d70b347c5093018d12482c30a7a98aab86d0 by Hynek Schlawack in branch 'main': bpo-45792: Fix contextvar.Token's intersphinx FQN (GH-29533) https://github.com/python/cpython/commit/e501d70b347c5093018d12482c30a7a98aab86d0

[issue45792] contextvars.Token has wrong module name in Sphinx's objects.inv

2021-11-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 628667ac9a634c7a7fa7f681dd2f98ff5841c843 by Miss Islington (bot) in branch '3.10': bpo-45792: Fix contextvar.Token's intersphinx FQN (GH-29533) (GH-29535) https://github.com/python/cpython/commit/628667ac9a634c7a7fa7f681d

[issue45792] contextvars.Token has wrong module name in Sphinx's objects.inv

2021-11-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 8b6a474071bcc88ec3453e16f079181e551513c3 by Miss Islington (bot) in branch '3.9': bpo-45792: Fix contextvar.Token's intersphinx FQN (GH-29533) (GH-29536) https://github.com/python/cpython/commit/8b6a474071bcc88ec3453e16f

[issue45772] socket.socket should be a class instead of a function

2021-11-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 4c792f39e688b11c7c19e411ed4f76a7baa44638 by Hong Xu in branch 'main': bpo-45772: socket.socket should be a class instead of a function (GH-23960) https://github.com/python/cpython/commit/4c792f39e688b11c7c19e411ed4f76

[issue45752] copy module doc wrongly says it doesn't copy arrays

2021-11-14 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset b7360ae395e9e633d384d16064c5dc04a9841e19 by M. Mostafa Farzan in branch 'main': bpo-45752: Fix no-support examples in 'copy' docs (GH-29548) https://github.com/python/cpython/commit/b7360ae395e9e633d384d16064c5dc04a9841e

[issue45752] copy module doc wrongly says it doesn't copy arrays

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

[issue45792] contextvars.Token has wrong module name in Sphinx's objects.inv

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

[issue28806] Improve the netrc library

2021-11-17 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 15409c720be0503131713e3d3abc1acd0da07378 by Emmanuel Arias in branch 'main': bpo-28806: Continue work: improve the netrc library (GH-26330) https://github.com/python/cpython/commit/15409c720be0503131713e3d3abc1acd0da07378 -

[issue28806] Improve the netrc library

2021-11-17 Thread Andrew Svetlov
Change by Andrew Svetlov : -- versions: +Python 3.11 -Python 3.7 ___ Python tracker <https://bugs.python.org/issue28806> ___ ___ Python-bugs-list mailin

[issue45896] Conflicting statements in docs about default support for asyncio subprocesses on Windows

2021-11-24 Thread Andrew Svetlov
Andrew Svetlov added the comment: You are correct, the first statement is outdated. Please feel free to make a pull request. -- ___ Python tracker <https://bugs.python.org/issue45

[issue45568] @asynccontextmanager is missing in decorator usage example

2021-11-25 Thread Andrew Svetlov
Change by Andrew Svetlov : -- nosy: +asvetlov nosy_count: 3.0 -> 4.0 pull_requests: +28016 pull_request: https://github.com/python/cpython/pull/29779 ___ Python tracker <https://bugs.python.org/issu

[issue45900] Type annotations needed for convenience functions in ipaddress module

2021-11-25 Thread Andrew Svetlov
Andrew Svetlov added the comment: Typing for stdlib is provided by https://github.com/python/typeshed CPython policy discourages embedded typing declarations. -- nosy: +asvetlov resolution: -> rejected stage: patch review -> resolved status: open -&g

[issue45568] @asynccontextmanager is missing in decorator usage example

2021-11-25 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 52d10f6485a168141e7a50d68f9a9566fdd8379d by Andrew Svetlov in branch '3.10': [3.10] bpo-45568: Actually use @asynccontextmanager in usage example (GH-29151) (GH-29779) https://github.com/python/cpyt

[issue45568] @asynccontextmanager is missing in decorator usage example

2021-11-25 Thread Andrew Svetlov
Change by Andrew Svetlov : -- versions: +Python 3.11 ___ Python tracker <https://bugs.python.org/issue45568> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45568] @asynccontextmanager is missing in decorator usage example

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

[issue19460] Add test for MIMENonMultipart

2021-11-28 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 46c8d915715aa2bd4d697482aa051fe974d440e1 by 180909 in branch 'main': bpo-19460: Add test for MIMENonMultipart (GH-29817) https://github.com/python/cpython/commit/46c8d915715aa2bd4d697482aa051fe974d440e1 -- nosy:

[issue19460] Add test for MIMENonMultipart

2021-11-28 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 2c398a5acf85d1bbc5796f3385972d0759b90e54 by Miss Islington (bot) in branch '3.10': [3.10] bpo-19460: Add test for MIMENonMultipart (GH-29817) (GH-29818) https://github.com/python/cpython/commit/2c398a5acf85d1bbc5796f3385972d

[issue19460] Add test for MIMENonMultipart

2021-11-28 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 209cec8a2a2e845df5af764a9171af05a2a4c8e3 by Miss Islington (bot) in branch '3.9': [3.9] bpo-19460: Add test for MIMENonMultipart (GH-29817) (#29819) https://github.com/python/cpython/commit/209cec8a2a2e845df5af764a9171af

[issue37658] In some cases asyncio.wait_for can lead to socket leak.

2021-11-29 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 934a82623793e9d52b85f74d5395d65927a52205 by Sam Bull in branch 'main': bpo-37658: Actually return result in race condition (GH-29202) https://github.com/python/cpython/commit/934a82623793e9d52b85f74d5395d6

[issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread

2021-11-29 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thanks for the report. Atomic copy (`list(self.processes.values()`) should fix the bug, sure. I doubt if writing a reliable test for this situation is possible; multithreading is hard. I think we can accept a patch without a test but with an inline comment

[issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread

2021-11-29 Thread Andrew Svetlov
Change by Andrew Svetlov : -- assignee: -> asvetlov ___ Python tracker <https://bugs.python.org/issue43498> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread

2021-11-29 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 7431448b817d3bf87f71661cf8f3d537807ab2e2 by Jakub KulĂ­k in branch 'main': bpo-43498: Fix dictionary iteration error in _ExecutorManagerThread (GH-24868) https://github.com/python/cpython/commit/7431448b817d3bf87f71661cf8f3d5

[issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11

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

[issue19460] Add test for MIMENonMultipart

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

[issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread

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

[issue37658] In some cases asyncio.wait_for can lead to socket leak.

2021-11-30 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 99a9b343316172f049a52b39a406f0c0c42c106f by Miss Islington (bot) in branch '3.9': bpo-37658: Actually return result in race condition (GH-29202) (GH-29832) https://github.com/python/cpython/commit/99a9b343316172f049a52b39a406f0

[issue39529] Deprecate get_event_loop()

2021-12-01 Thread Andrew Svetlov
Andrew Svetlov added the comment: IMHO, asyncio.set_event_loop() and policy.get_event_loop()/policy.set_event_loop() are not deprecated by oversight. In IPython, I think you could use new_event_loop() for getting a new loop instance. Then, save the loop reference somewhere as a direct

[issue39529] Deprecate get_event_loop()

2021-12-01 Thread Andrew Svetlov
Andrew Svetlov added the comment: Ages ago, get_event_loop() did not return the current running loop if called from async function context; it returned a loop instance registered with previous set_event_loop(...) call instead. Later we fixed get_event_loop() behavior in 3.5.4 IIRC and added

[issue45896] Conflicting statements in docs about default support for asyncio subprocesses on Windows

2021-12-01 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset f27bef30438d2f07f19de91e021f34b77ccc4b20 by Rob in branch 'main': bpo-45896: Fix docs default asyncio event loop on Windows (GH-29857) https://github.com/python/cpython/commit/f27bef30438d2f07f19de91e021f34

[issue45896] Conflicting statements in docs about default support for asyncio subprocesses on Windows

2021-12-01 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 4203a5d1918ca874e305806b787e3c8c6fc35e3e by Miss Islington (bot) in branch '3.9': bpo-45896: Fix docs default asyncio event loop on Windows (GH-29857) (GH-29878) https://github.com/python/cpython/commit/4203a5d1918ca874e305806b787e3c

[issue45896] Conflicting statements in docs about default support for asyncio subprocesses on Windows

2021-12-01 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset e99c5e039b380199843db4e06974883d9f3ddad0 by Miss Islington (bot) in branch '3.10': bpo-45896: Fix docs default asyncio event loop on Windows (GH-29857) (GH-29877) https://github.com/python/cpython/commit/e99c5e039b380199843db4e0697488

[issue45896] Conflicting statements in docs about default support for asyncio subprocesses on Windows

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

[issue45823] python stopped working

2021-12-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: The reproducer is absent, closing -- nosy: +asvetlov resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue45997] asyncio.Semaphore waiters deqeueu doesn't work

2021-12-06 Thread Andrew Svetlov
Andrew Svetlov added the comment: Good point. Currently, asyncio lock objects don't provide a strong FIFO guarantee. In a tight loop, a task can re-acquire the lock just after releasing even if there are pending waiters that were scheduled earlier. It's true also for Lock, C

[issue45997] asyncio.Semaphore waiters deque doesn't work

2021-12-06 Thread Andrew Svetlov
Andrew Svetlov added the comment: Or, maybe, there is a way to do everything without changing public API. The idea is: _wake_up_next can create a future which is set by *waked up task* on its acquiring. acquire method should wait for this future first before entering in `while self._value

[issue23819] test_asyncio fails when run under -O

2021-12-06 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 265918bb1d782ab85c7dbc835eb62d6cfc2145b7 by Kumar Aditya in branch 'main': bpo-23819: asyncio: Replace AssertionError with TypeError where it makes sense (GH-29894) https://github.com/python/cpyt

[issue28953] Use `raise from` when raising new IncompleteRead

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

[issue41174] asyncio.coroutine decorator returns a non-generator function when using PYTHONASYNCIODEBUG

2021-12-07 Thread Andrew Svetlov
Andrew Svetlov added the comment: Agree, thanks! -- status: pending -> open ___ Python tracker <https://bugs.python.org/issue41174> ___ ___ Python-bugs-lis

[issue45855] PyCapsule_Import still using PyImport_ImportModuleNoBlock

2021-12-08 Thread Andrew Svetlov
Andrew Svetlov added the comment: The main branch has a dozen PyImport_ImportModuleNoBlock() usages. Would you replace them also? -- nosy: +asvetlov versions: +Python 3.11 -Python 3.10 ___ Python tracker <https://bugs.python.org/issue45

[issue46012] unittest AsyncConnection not described

2021-12-08 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11

2021-12-08 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +28213 pull_request: https://github.com/python/cpython/pull/29990 ___ Python tracker <https://bugs.python.org/issue45

[issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11

2021-12-08 Thread Andrew Svetlov
Andrew Svetlov added the comment: Pablo, I think https://github.com/python/cpython/pull/29990 should be merged as well before the issue closing. It covers another execution branch. -- resolution: fixed -> status: closed -> open ___

[issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11

2021-12-08 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed status: open -> closed ___ Python tracker <https://bugs.python.org/issue45813> ___ ___ Python-bugs-list

[issue45359] TopologicalSorter is not Generic at runtime (but is in typeshed)

2021-12-08 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 3cb9731b7e59b0df9a7a9ab6b7746a669958b693 by Jacob Hayes in branch 'main': bpo-45359: Support TopologicalSorter type subscript (GH-28714) https://github.com/python/cpython/commit/3cb9731b7e59b0df9a7a9ab6b7746a669958b693 -

[issue45359] TopologicalSorter is not Generic at runtime (but is in typeshed)

2021-12-09 Thread Andrew Svetlov
Andrew Svetlov added the comment: The new feature is applied to Python 3.11 only -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.10, Python 3.9 ___ Python tracker <https://bug

[issue45359] TopologicalSorter is not Generic at runtime (but is in typeshed)

2021-12-09 Thread Andrew Svetlov
Andrew Svetlov added the comment: `if TYPE_CHECKING:` is a good choice, it works fine just now. `from __future__ import annotations` is another alternative. I don't see a reason for REMOVING already existing and correct annotations from typ

[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

[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
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

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