[issue36607] asyncio.all_tasks() crashes if asyncio is used in multiple threads

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

[issue36607] asyncio.all_tasks() crashes if asyncio is used in multiple threads

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

[issue36607] asyncio.all_tasks() crashes if asyncio is used in multiple threads

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

[issue34467] No mechanism to abort created coroutine or suppress not-awaited warning

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

[issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range

2019-06-11 Thread Andrew Svetlov
Andrew Svetlov added the comment: That's what I afraid. asyncio/sslproto.py fails on new OpenSSL at several places :( -- ___ Python tracker <https://bugs.python.org/issue37

[issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range

2019-06-11 Thread Andrew Svetlov
Andrew Svetlov added the comment: Just to clarify: what OpenSSL version is used? -- ___ Python tracker <https://bugs.python.org/issue37226> ___ ___ Python-bug

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

2019-06-11 Thread Andrew Svetlov
Andrew Svetlov added the comment: There is no chance to change the flag for 3.7. But we can consider it for 3.8 Yuri, what do you think? -- ___ Python tracker <https://bugs.python.org/issue37

[issue37172] Odd error awaiting a Future

2019-06-10 Thread Andrew Svetlov
Andrew Svetlov added the comment: Agree, it would be fine. So the behavior is not changed but the error text should be clear, right? -- ___ Python tracker <https://bugs.python.org/issue37

[issue29717] `loop.add_reader` and `<

2019-06-10 Thread Andrew Svetlov
Andrew Svetlov added the comment: If fd is a regular file it is not supported well by all select/poll/epoll. Registration may succeed but the data is marked as "already ready for reading". Not sure if we should do anything. The situation may be changed after eventual providing a

[issue37172] Odd error awaiting a Future

2019-06-10 Thread Andrew Svetlov
Andrew Svetlov added the comment: Not sure what "idempotency fix" means in the context of Future objects. Could you describe desired behavior or, even better, provide a pull request that demonstrates your desire? -- ___ Python track

[issue37202] Future.cancelled is not set to true immediately after calling Future.cancel

2019-06-08 Thread Andrew Svetlov
Andrew Svetlov added the comment: I don't follow what reliability guarantee are you requesting. A cite from task.cancel() docstring: > Request that this task cancel itself. This arranges for a CancelledError to be thrown into the wrapped coroutine on the next cycle thro

[issue37202] Future.cancelled is not set to true immediately after calling Future.cancel

2019-06-08 Thread Andrew Svetlov
Andrew Svetlov added the comment: This is the expected behavior. asyncio.ensure_future() returns not a future but a task for your case. Task cancellation requires at least one context switch to finish the task. P.S. I suggest replacing `asyncio.ensure_future()` with `asyncio.create_task

[issue37173] inspect.getfile error names module instead of passed class

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

[issue37173] inspect.getfile error names module instead of passed class

2019-06-08 Thread Andrew Svetlov
Andrew Svetlov added the comment: I think landing the fix to 3.8 only is just fine -- nosy: +asvetlov ___ Python tracker <https://bugs.python.org/issue37

[issue37173] inspect.getfile error names module instead of passed class

2019-06-08 Thread Andrew Svetlov
Change by Andrew Svetlov : -- versions: -Python 3.7 ___ Python tracker <https://bugs.python.org/issue37173> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37150] Do not allow to pass FileType class object instead of instance in add_argument

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

[issue37172] Odd error awating a Future

2019-06-06 Thread Andrew Svetlov
Andrew Svetlov added the comment: Global future objects (and global asyncio objects in general) don't work with asyncio.run(). The lifecycle of these objects should be closer than loop but asyncio.run() creates a loop during execution. I think this is a good design, we have a plan

[issue35082] Mock.__dir__ lists deleted attributes

2019-06-06 Thread Andrew Svetlov
Change by Andrew Svetlov : -- versions: +Python 3.7 ___ Python tracker <https://bugs.python.org/issue35082> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35082] Mock.__dir__ lists deleted attributes

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

[issue28708] Low FD_SETSIZE limit on Windows

2019-06-05 Thread Andrew Svetlov
Andrew Svetlov added the comment: >From my understanding Steve is right. -- ___ Python tracker <https://bugs.python.org/issue28708> ___ ___ Python-bugs-lis

[issue28708] Low FD_SETSIZE limit on Windows

2019-06-05 Thread Andrew Svetlov
Andrew Svetlov added the comment: I believe the number still can be configurable but requires more work. The idea is: FD_* macroses should be replaced with custom fd_set manipulation functions. on select.select() call we can calculate the number of the highest used socket and use this number

[issue34767] Optimize asyncio.Lock

2019-06-05 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thanks, Zackery! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads

2019-06-05 Thread Andrew Svetlov
Andrew Svetlov added the comment: I prefer postponing to think about it until all required 3.8 tasks are done :) -- ___ Python tracker <https://bugs.python.org/issue34

[issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream

2019-06-05 Thread Andrew Svetlov
Andrew Svetlov added the comment: Please keep it until new streams will be documented. -- ___ Python tracker <https://bugs.python.org/issue36889> ___ ___ Pytho

[issue37142] test_asyncio timed out on AMD64 FreeBSD CURRENT Shared 3.x

2019-06-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: I mean https://github.com/python/cpython/pull/13804 -- ___ Python tracker <https://bugs.python.org/issue37142> ___ ___ Pytho

[issue37142] test_asyncio timed out on AMD64 FreeBSD CURRENT Shared 3.x

2019-06-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: Follow-up for https://github.com/python/cpython/pull/13790 is ready -- ___ Python tracker <https://bugs.python.org/issue37

[issue37142] test_asyncio timed out on AMD64 FreeBSD CURRENT Shared 3.x

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

[issue37142] test_asyncio timed out on AMD64 FreeBSD CURRENT Shared 3.x

2019-06-04 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: fixed -> status: closed -> open ___ Python tracker <https://bugs.python.org/issue37142> ___ ___ Python-bugs-list

[issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads

2019-06-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: I still think that this is a valuable change but we need to discuss public API. In fact, in my job we used to override default executor and wait for its shutdown with explicit waiting to make the system robust. The problem is that loop.close() can "

[issue37148] test_asyncio fails on refleaks buildbots

2019-06-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: I'm curious if collections.__getattr__ suffers from the same problem? asyncio uses basically the same technique for deprecating global names on import. -- ___ Python tracker <https://bugs.python.org/issue37

[issue37137] test_asyncio: test_cancel_gather_2() dangling thread

2019-06-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: Got you. https://github.com/python/cpython/pull/13793 -- ___ Python tracker <https://bugs.python.org/issue37137> ___ ___ Pytho

[issue35621] asyncio.create_subprocess_exec() only works with main event loop

2019-06-03 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +13678 pull_request: https://github.com/python/cpython/pull/13793 ___ Python tracker <https://bugs.python.org/issue35

[issue37137] test_asyncio: test_cancel_gather_2() dangling thread

2019-06-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: We have two options: 1. Apply https://github.com/python/cpython/pull/13792 to wait for dangling threads 2. Revert added watchers entirely What do you prefer? -- ___ Python tracker <https://bugs.python.

[issue37137] test_asyncio: test_cancel_gather_2() dangling thread

2019-06-03 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +13677 pull_request: https://github.com/python/cpython/pull/13792 ___ Python tracker <https://bugs.python.org/issue37

[issue37137] test_asyncio: test_cancel_gather_2() dangling thread

2019-06-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: Working on PR -- ___ Python tracker <https://bugs.python.org/issue37137> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

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

[issue37137] test_asyncio: test_cancel_gather_2() dangling thread

2019-06-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: I suspect that I've added this dangling thread by https://github.com/python/cpython/blob/master/Lib/asyncio/unix_events.py#L1248-L1251 :( -- nosy: +asvetlov ___ Python tracker <https://bugs.python.org/issue37

[issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream

2019-06-03 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +13674 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/13790 ___ Python tracker <https://bugs.python.org/issu

[issue37141] Allow multiple separators in StreamReader.readuntil

2019-06-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: Yes, Stream supports all StreamReader and StreamWriter methods -- ___ Python tracker <https://bugs.python.org/issue37

[issue37141] Allow multiple separators in StreamReader.readuntil

2019-06-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: Docs will be updated soon. The change has landed a week ago, I had no time for docs update before 3.8 beta. Sorry for that. The idea is: StreamReader and StreamWriter are merged into just Stream, open_connection() is replaced with connect() etc

[issue34467] No mechanism to abort created coroutine or suppress not-awaited warning

2019-06-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: Could you consider passing (async_func, args, kwargs) tuple instead async_func(*args, **kwargs) coroutine? Looks like it solves your problem and doesn't require asyncio changes -- ___ Python tracker <ht

[issue37141] Allow multiple separators in StreamReader.readuntil

2019-06-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: Would you make a PR? I guess to modify Stream.readuntil() StreamReader is deprecated, I'm not sure if we should add new functionality to this class. -- ___ Python tracker <https://bugs.python.org/issue37

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

2019-06-02 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +13642 pull_request: https://github.com/python/cpython/pull/13754 ___ Python tracker <https://bugs.python.org/issue33

[issue35621] asyncio.create_subprocess_exec() only works with main event loop

2019-06-02 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thanks for the report! The failure depends on tests order execution (maybe you use -jN flag?). Before default child watcher was SafeChildWatcher, not it is ThreaderChildWather. The watcher is a global variable (a property of global event loop policy

[issue35621] asyncio.create_subprocess_exec() only works with main event loop

2019-06-02 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +13635 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/13754 ___ Python tracker <https://bugs.python.org/issu

[issue32115] Ignored SIGCHLD causes asyncio.Process.wait to hang forever

2019-06-02 Thread Andrew Svetlov
Andrew Svetlov added the comment: #35621 fixes the problem for default ThreadedChildWatcher -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> asyncio.create_subprocess_exec() only works with mai

[issue31087] asyncio.create_subprocess_* should honor `encoding`

2019-06-02 Thread Andrew Svetlov
Andrew Svetlov added the comment: encoding was explicitly disabled by #36686 Now its usage generates ValueError. asyncio stdio/stdout/stderr streams are bytes. If you want to propose a patch that supports text streams -- please create another issue for that. -- nosy: +asvetlov

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

2019-06-02 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +13625 pull_request: https://github.com/python/cpython/pull/13630 ___ Python tracker <https://bugs.python.org/issue33

[issue32052] Provide access to buffer of asyncio.StreamReader

2019-06-02 Thread Andrew Svetlov
Andrew Svetlov added the comment: Closing. Brief: 1. Access to an internal buffer is not an option. 2. Pushing data back to stream after fetching is not an option too: it kills almost any possible optimization and makes code overcomplicated. aiohttp used to have "unread_data()"

[issue35635] asyncio.create_subprocess_exec() only works in main thread

2019-06-02 Thread Andrew Svetlov
Andrew Svetlov added the comment: Fixed by #35621 -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> asyncio.create_subprocess_exec() only works with main event loop ___ Python tracker <https://

[issue35621] asyncio.create_subprocess_exec() only works with main event loop

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

[issue35621] asyncio.create_subprocess_exec() only works with main event loop

2019-06-02 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 13ed07998ad93dbdd94991ba0451b9b559f07972 by Andrew Svetlov in branch 'master': bpo-35621: Support running subprocesses in asyncio when loop is executed in non-main thread (#13630) https://github.com/python/cpython/commit

[issue36813] QueueListener not calling task_done upon termination

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

[issue37105] Add deprecated-remove information on stream doc

2019-05-31 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset ed9f3562b637a59b9000abbceee5ae369d35444d by Andrew Svetlov (Emmanuel Arias) in branch 'master': bpo-37105: Add deprecated-remove information on stream doc (#13672) https://github.com/python/cpython/commit

[issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses

2019-05-30 Thread Andrew Svetlov
Andrew Svetlov added the comment: Guys, thank you for investigation. If there is AIX "idiosyncrasy" -- please feel free to skip failed tests on AIX. If you have access to AIX box it would be much easier for you. I can only look at Python buildbo

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

2019-05-30 Thread Andrew Svetlov
Andrew Svetlov added the comment: Sorry, I'm not comfortable with such change just before the feature freeze. The idea is maybe good but let's discuss and implement it later. -- ___ Python tracker <https://bugs.python.org/issue36

[issue36999] Expose the coroutine object in asyncio task objects

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

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

2019-05-30 Thread Andrew Svetlov
Andrew Svetlov added the comment: It's not about streams only. The stream protocol can have such flag, sure. But transport emits a warning like "unclosed transport ..." Not sure if we have to drop this warning, it enforces writing good code that controls all created resources

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

2019-05-30 Thread Andrew Svetlov
Andrew Svetlov added the comment: The difference is that socket.close() is an instant call. After socket.close() the socket is done. But transport.close() doesn't close the transport instantly. asyncio requires at least one loop iteration for calling protocol.connection_lost() and actual

[issue37015] Fix asyncio mock warnings

2019-05-30 Thread Andrew Svetlov
Andrew Svetlov added the comment: Fixed -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream

2019-05-29 Thread Andrew Svetlov
Andrew Svetlov added the comment: Wow! Thanks for the report. Internally it is pretty close to freebsd problem. The test is unstable, not asyncio code itself. The test uses future objects to synchronize client and server socket processing but looks like there are race conditions still

[issue36794] asyncio.Lock documentation in Py3.8 lacks parts presented in documentation in Py3.6

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

[issue36373] Deprecate explicit loop parameter in all public asyncio APIs

2019-05-29 Thread Andrew Svetlov
Change by Andrew Svetlov : -- title: asyncio.gather: no docs for deprecated loop parameter -> Deprecate explicit loop parameter in all public asyncio APIs ___ Python tracker <https://bugs.python.org/issu

[issue36373] Deprecate explicit loop parameter in all public asyncio APIs

2019-05-29 Thread Andrew Svetlov
Change by Andrew Svetlov : -- title: asyncio.gather: no docs for deprecated loop parameter -> Deprecate explicit loop parameter in all public asyncio APIs ___ Python tracker <https://bugs.python.org/issu

[issue36373] Deprecate explicit loop parameter in all public asyncio APIs

2019-05-29 Thread Andrew Svetlov
Change by Andrew Svetlov : -- versions: +Python 3.8 -Python 3.7 ___ Python tracker <https://bugs.python.org/issue36373> ___ ___ Python-bugs-list mailin

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

2019-05-29 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thank you. The change is pretty straightforward. There is no need to jumbo PR, you can split the work into PR-per-module if it is more comfortable to you. I'm ok with reviewing any approach. -- ___ Python

[issue33918] Hooking into pause/resume of iterators/coroutines

2019-05-29 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue33918> ___ ___

[issue33918] Hooking into pause/resume of iterators/coroutines

2019-05-29 Thread Andrew Svetlov
Andrew Svetlov added the comment: decimal was changed from threading.local to contextvar usage. The module is "safe" not only for asyncio but for threading, trio etc. unittest.mock doesn't use explicit context all for patching. It changes global interpreter-wide objects in

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

2019-05-29 Thread Andrew Svetlov
Andrew Svetlov added the comment: I would say that if requests a designed from scratch more idiomatic way could be with requests.Session() as session: session.get('https://example.com/') or session = requests.Session() session.get('https://example.com/') session.close() Like

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

2019-05-29 Thread Andrew Svetlov
Andrew Svetlov added the comment: A champion is welcome :) -- ___ Python tracker <https://bugs.python.org/issue36373> ___ ___ Python-bugs-list mailing list Unsub

[issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream

2019-05-29 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thanks for letting me know. Investigating. BrokenPipeError is not related, I had a plan to fix such messages during the beta phase. -- ___ Python tracker <https://bugs.python.org/issue36

[issue32972] unittest.TestCase coroutine support

2019-05-29 Thread Andrew Svetlov
Andrew Svetlov added the comment: Done. Let's keep the issue open until the documentation will be committed -- ___ Python tracker <https://bugs.python.org/issue32

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

2019-05-29 Thread Andrew Svetlov
Andrew Svetlov added the comment: Let's postpone to 3.9 I recall at least reports for aioredis, aiomysql and aiokafka for these deprecation warnings. Sure, fix is trivial (and will be applied to next release of libs) but I pretty sure there are many other usages. -- versions

[issue35246] asyncio.create_subprocess_exec doesn't accept pathlib.Path like subprocess does

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

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

2019-05-28 Thread Andrew Svetlov
Andrew Svetlov added the comment: *Passing* loop to gather should be deprecated. *Using* loop by *internal logic* is pretty fine, we do it in asyncio everywhere. Yuri, I think we should deprecate explicit loop everywhere in non-deprecated asyncio API by Python 3.8. We can do it even

[issue35621] asyncio.create_subprocess_exec() only works with main event loop

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

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

2019-05-28 Thread Andrew Svetlov
Andrew Svetlov added the comment: >From my understanding, the correct code should close all transports and wait >for their connection_lost() callbacks before closing the loop. -- ___ Python tracker <https://bugs.python.org/i

[issue36686] Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess

2019-05-28 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed versions: -Python 3.5, Python 3.6, Python 3.7, Python 3.9 ___ Python tracker <https://bugs.python.org/issu

[issue35246] asyncio.create_subprocess_exec doesn't accept pathlib.Path like subprocess does

2019-05-28 Thread Andrew Svetlov
Andrew Svetlov added the comment: Aha, I see. You are right. Let's drop checks for cmd/program/args types but left to subprocess do these checks. This approach avoiding complex checking/converting logic in asyncio itself and reduces code duplication

[issue29883] asyncio: Windows Proactor Event Loop UDP Support

2019-05-28 Thread Andrew Svetlov
Andrew Svetlov added the comment: You are welcome, Victor! Thank you very much, Adam! -- ___ Python tracker <https://bugs.python.org/issue29883> ___ ___ Pytho

[issue29883] asyncio: Windows Proactor Event Loop UDP Support

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

[issue35279] asyncio uses too many threads by default

2019-05-28 Thread Andrew Svetlov
Andrew Svetlov added the comment: > how about min(32, cpu_count+4)? I think it produces reasonable good numbers for any CPU count. Do you have time for preparing a pull request? -- ___ Python tracker <https://bugs.python.org/issu

[issue36933] sys.set_coroutine_wrapper documented as to be removed in 3.8 (still there)

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

[issue36996] unittest.mock.patch decorator doesn't work with async functions

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

[issue35279] asyncio uses too many threads by default

2019-05-28 Thread Andrew Svetlov
Andrew Svetlov added the comment: I'm ok with changing the default threads number limit. Not sure about numbers. If you want to limit to 16-20 that may be ok but `cpu_count + 4` doesn't work in this case. On cloud servers, I see 128 or even more cores very often. 160+4 is not that you want

[issue35246] asyncio.create_subprocess_exec doesn't accept pathlib.Path like subprocess does

2019-05-27 Thread Andrew Svetlov
Change by Andrew Svetlov : -- versions: +Python 3.8 -Python 3.7 ___ Python tracker <https://bugs.python.org/issue35246> ___ ___ Python-bugs-list mailin

[issue35246] asyncio.create_subprocess_exec doesn't accept pathlib.Path like subprocess does

2019-05-27 Thread Andrew Svetlov
Andrew Svetlov added the comment: All we need is `program = os.fspath(program)` in base_events.py subprocess_exec() method. Is anybody volunteered to make a patch (with test and docs update, sure)? -- ___ Python tracker <https://bugs.python.

[issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream

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

[issue35279] asyncio uses too many threads by default

2019-05-27 Thread Andrew Svetlov
Andrew Svetlov added the comment: asyncio uses bare concurrent.futures.ThreadPoolExecutor. Tha question is: should asyncio reduce the number of threads in the pool or concurrent.futures should change the default value? -- ___ Python tracker

[issue26270] Support for read()/write()/select() on asyncio

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

[issue35040] [functools] provide an async-compatible version of functools.lru_cache

2019-05-27 Thread Andrew Svetlov
Andrew Svetlov added the comment: Brett please elaborate. Do you want to incorporate async_lru library into CPython Core? -- ___ Python tracker <https://bugs.python.org/issue35

[issue34993] asyncio.streams.FlowControlMixin should be part of the API

2019-05-27 Thread Andrew Svetlov
Andrew Svetlov added the comment: #36889 deprecates using FlowXontrolMixin outside of asyncio -- ___ Python tracker <https://bugs.python.org/issue34993> ___ ___

[issue34993] asyncio.streams.FlowControlMixin should be part of the API

2019-05-27 Thread Andrew Svetlov
Andrew Svetlov added the comment: FlowControlMixing is a private API class. The class is not intended for the usage outside of asyncio. If you found it useful for you please feel free to copy-paste the class from asyncio sources into your project. The reason is: we want to keep freedom

[issue34655] Support sendfile in asyncio streams API

2019-05-27 Thread Andrew Svetlov
New submission from Andrew Svetlov : Done by #36889 -- resolution: -> fixed stage: -> resolved status: open -> closed superseder: -> Merge StreamWriter and StreamReader into just asyncio.Stream ___ Python tracker <https://

[issue26270] Support for read()/write()/select() on asyncio

2019-05-27 Thread Andrew Svetlov
Andrew Svetlov added the comment: The suggestion is using streams as a high-level API. I see no real proposals in this issue. select()/read()/write() is not suitable interface, sorry. Closing, feel free to create a new issue if you come up with a concrete proposal

[issue36840] Add stream.abort() async method

2019-05-27 Thread Andrew Svetlov
Andrew Svetlov added the comment: Fixed by #36889 -- resolution: -> fixed stage: -> resolved status: open -> closed superseder: -> Merge StreamWriter and StreamReader into just asyncio.Stream ___ Python tracker <https://

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

2019-05-27 Thread Andrew Svetlov
Andrew Svetlov added the comment: Fixed by #36889 -- resolution: -> fixed stage: patch review -> resolved status: open -> closed superseder: -> Merge StreamWriter and StreamReader into just asyncio.Stream ___ Python tra

[issue37035] Don't log OSError exceptions in asyncio transports

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

[issue37035] Don't log OSError exceptions in asyncio transports

2019-05-27 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset a79b6c578fcd2ea8be29440fdd8a998e5527200f by Andrew Svetlov in branch '3.7': [3.7] bpo-37035: Don't log OSError (GH-13548) (#13594) https://github.com/python/cpython/commit/a79b6c578fcd2ea8be29440fdd8a998e5527200f

[issue37035] Don't log OSError exceptions in asyncio transports

2019-05-27 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +13501 pull_request: https://github.com/python/cpython/pull/13594 ___ Python tracker <https://bugs.python.org/issue37

<    5   6   7   8   9   10   11   12   13   14   >