[issue30831] Inconsistent or wrong documentation around Asynchronous Context Manager

2019-03-07 Thread Yury Selivanov
Yury Selivanov added the comment: There's no inconsistency here and the docs are correct. If you have a function: async def foo(): pass Then "foo()" call returns a "coroutine", which is an awaitable. So async def __aenter__(): ... always returns an

[issue30831] Inconsistent or wrong documentation around Asynchronous Context Manager

2019-03-07 Thread Yury Selivanov
Yury Selivanov added the comment: I also recommend reading this page https://docs.python.org/3/library/asyncio-task.html to get a better grasp on coroutines and how they are evaluated. -- ___ Python tracker <https://bugs.python.org/issue30

[issue35760] test_asyncio: test_async_gen_asyncio_gc_aclose_09() race condition

2019-03-12 Thread Yury Selivanov
Yury Selivanov added the comment: Can you change "await asyncio.sleep(0.01)" to "await asyncio.sleep(1)" and check if the test still fails? (IOW see if there's a bug in Python's async gen implementation or this is

[issue35760] test_asyncio: test_async_gen_asyncio_gc_aclose_09() race condition

2019-03-12 Thread Yury Selivanov
Yury Selivanov added the comment: > I guess it fails only for less difference in time like 0.01 and 0.001. Yeah, that's what I was thinking. 0.1 seconds is still too tight, a simple GC pause can skew the timers and break the test logic. Maybe we should just increase the sleep to

[issue34745] asyncio ssl memory leak

2019-03-17 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset f683f464259715d620777d7ed568e701337a703a by Yury Selivanov (Fantix King) in branch 'master': bpo-34745: Fix asyncio sslproto memory issues (GH-12386) https://github.com/python/cpython/commit/f683f464259715d620777d7ed568e7

[issue36428] Support AutoAwait?

2019-03-25 Thread Yury Selivanov
Yury Selivanov added the comment: Absolutely. I think there's another open issue for this and I even have a dev branch somewhere with this idea half implemented. Definitely something to have in 3.8. -- ___ Python tracker &

[issue34616] implement "Async exec"

2019-05-01 Thread Yury Selivanov
Yury Selivanov added the comment: > Yeah, I think this is pretty simple: the runtime/stdlib should provide the > primitives to compile top-level async code, get coroutines, etc., and then a > REPL like ipython can take care of handing that off to asyncio or whatever > libra

[issue34616] implement "Async exec"

2019-05-01 Thread Yury Selivanov
Yury Selivanov added the comment: > No, I do not have a patch. I can provide a few test case That would be helpful! > and I am happy to spend some task to sit-down and discuss what we exactly do > so far in IPython. I'm flying back Sunday morning. Yes, let's do that aro

[issue34616] implement "Async exec"

2019-05-04 Thread Yury Selivanov
Yury Selivanov added the comment: Here's a VERY rough first implementation to play with: https://github.com/1st1/cpython/commit/ad2ed0aed922d7c36f2fced64264124613e37f09 -- ___ Python tracker <https://bugs.python.org/is

[issue36840] Add stream.abort() async method

2019-05-07 Thread Yury Selivanov
Yury Selivanov added the comment: If we're just calling socket.close(), then what's the point of waiting for connection_lost? (I remember us discussing this, but I don't quite remember the details). Usually .abort() is a synchronous method, which kind of signals that "i

[issue34616] implement "Async exec"

2019-05-15 Thread Yury Selivanov
Yury Selivanov added the comment: I'll be working on CPython on Friday. Will take a look at your PR first thing. -- ___ Python tracker <https://bugs.python.org/is

[issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s)

2018-01-18 Thread Yury Selivanov
Yury Selivanov added the comment: +1 on on the API and for adding it in 3.7 and for deprecating set_coroutine_wrapepr. This will simplify asyncio code and other event loops (like uvloop) and will lead to less overhead on asyncio debug mode. I always disliked the set_coroutine_wrapper API

[issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s)

2018-01-19 Thread Yury Selivanov
Yury Selivanov added the comment: > I think the simplest thing is probably to write the warning code in Python > and stash it in Lib/_corohelper.py or something. I'd put the helper that accepts a list of traceback-like tuples and emits a warning in warnings.py and a C function to

[issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s)

2018-01-20 Thread Yury Selivanov
Yury Selivanov added the comment: Guido, I'd like to go forward with this and merge Nathaniel's PR. Quick summary: * This issue adds new APIs: a sys.set_coroutine_origin_tracking_depth(depth) function and a 'cr_origin' property to native coroutine objects. * By using

[issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s)

2018-01-21 Thread Yury Selivanov
Yury Selivanov added the comment: Merged! Thank you, Nathaniel! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement versions: -Python 3.8 ___ Python tracker <https://bugs.python

[issue32610] asyncio.all_tasks() should return only non-finished tasks.

2018-01-21 Thread Yury Selivanov
Yury Selivanov added the comment: I agree, returning done tasks is pretty useless. This is a new function so let's fix its behavour. We need to: 1. Document this difference between new asyncio.all_tasks() and now deprecated Task.all_tasks(). 2. Make sure that Task.all_tasks() works i

[issue32314] Implement asyncio.run()

2018-01-21 Thread Yury Selivanov
Change by Yury Selivanov : -- pull_requests: +5107 ___ Python tracker <https://bugs.python.org/issue32314> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2018-01-21 Thread Yury Selivanov
Yury Selivanov added the comment: I've pushed a new version of the patch that I intend to merge tomorrow. The last version has only one minor change: it uses fast-path for "slightly" non-compact dicts too (dicts don't use *at most* 3 entries). This protects us from patho

[issue32314] Implement asyncio.run()

2018-01-21 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset a4afcdfa55ddffa4b9ae3b0cf101628c7bff4102 by Yury Selivanov in branch 'master': bpo-32314: Fix asyncio.run() to cancel runinng tasks on shutdown (#5262) https://github.com/python/cpython/commit/a4afcdfa55ddffa4b9ae3b0cf10162

[issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s)

2018-01-21 Thread Yury Selivanov
Change by Yury Selivanov : -- pull_requests: +5109 ___ Python tracker <https://bugs.python.org/issue32591> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s)

2018-01-21 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 3510334361d6d39aad89e4e0d9bccd0695668583 by Yury Selivanov in branch 'master': bpo-32591: Fix PyExc_WarnFormat call (follow-up commit) (#5263) https://github.com/python/cpython/commit/3510334361d6d39aad89e4e0d9bccd

[issue32472] Mention of __await__ missing in Coroutine Abstract Methods

2018-01-22 Thread Yury Selivanov
Yury Selivanov added the comment: +1 to what Andres said. -- nosy: +yselivanov resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue32623] Resize dict on del/pop

2018-01-22 Thread Yury Selivanov
New submission from Yury Selivanov : We should investigate whether we want dicts to compact themselves on del/pop operations. Currently we have to rely on workarounds to have compactable dict.copy (see issue 31179) etc. -- components: Interpreter Core messages: 310427 nosy

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

2018-01-22 Thread Yury Selivanov
Yury Selivanov added the comment: Victor: done; https://bugs.python.org/issue32623 -- ___ Python tracker <https://bugs.python.org/issue31179> ___ ___ Python-bug

[issue29344] sock_recv not detected a coroutine

2018-01-22 Thread Yury Selivanov
Yury Selivanov added the comment: > Andrew, shouldn't we fix 3.6 documentation? sock_* methods still documented > as coroutines. We only fixed it in 3.7 and the doc was updated. 3.6 stays as is. -- ___ Python tracker <https://b

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

2018-01-22 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset b0a7a037b8fde56b62f886d5188bced7776777b4 by Yury Selivanov in branch 'master': bpo-31179: Make dict.copy() up to 5.5 times faster. (#3067) https://github.com/python/cpython/commit/b0a7a037b8fde56b62f886d5188bce

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

2018-01-22 Thread Yury Selivanov
Change by Yury Selivanov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue29344] sock_recv not detected a coroutine

2018-01-22 Thread Yury Selivanov
Yury Selivanov added the comment: Since we made them coroutines in 3.7, I'd prefer to keep the 3.6 documentation as is (so that people don't write code that expects them to be not coroutines in 3.6). Please let's keep the cur

[issue29344] sock_recv not detected a coroutine

2018-01-22 Thread Yury Selivanov
Yury Selivanov added the comment: They have been documented as coroutines and were returning futures since Python 3.4. I believe we can keep the status quo especially if only one user complained about it during the last 5 years. -- ___ Python

[issue32436] Implement PEP 567

2018-01-22 Thread Yury Selivanov
New submission from Yury Selivanov : New changeset f23746a934177c48eff754411aba54c31d6be2f0 by Yury Selivanov in branch 'master': bpo-32436: Implement PEP 567 (#5027) https://github.com/python/cpython/commit/f23746a934177c48eff754411aba54

[issue32436] Implement PEP 567

2018-01-22 Thread Yury Selivanov
Yury Selivanov added the comment: I'll keep the issue open -- a documentation for the new APIs will be merged in a separate PR in a couple of months. -- ___ Python tracker <https://bugs.python.org/is

[issue32436] Implement PEP 567

2018-01-22 Thread Yury Selivanov
Yury Selivanov added the comment: I'll try to find some time after beta-1. Right now have a few other issues that I have to finish (and also create a PR to make decimal use PEP 567). -- ___ Python tracker <https://bugs.python.org/is

[issue32436] Implement PEP 567

2018-01-22 Thread Yury Selivanov
Yury Selivanov added the comment: This one: https://github.com/python/cpython/pull/5273? I've left a comment with some questions there. Are there any other urgent PRs? The main PEP 567 PR has been merged already, btw. -- ___ Python tracker &

[issue32436] Implement PEP 567

2018-01-22 Thread Yury Selivanov
Change by Yury Selivanov : -- pull_requests: +5120 ___ Python tracker <https://bugs.python.org/issue32436> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32296] Implement asyncio._get_running_loop() and get_event_loop() in C

2018-01-22 Thread Yury Selivanov
Change by Yury Selivanov : -- pull_requests: +5121 ___ Python tracker <https://bugs.python.org/issue32296> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-22 Thread Yury Selivanov
New submission from Yury Selivanov : PEP 567 allows decimal to be safely used in async/await code. I couldn't observe any performance impact by the proposed PR. The PR doesn't modify decimal context behaviour: instead of using a thread-local storage it now uses a contex

[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-22 Thread Yury Selivanov
Change by Yury Selivanov : -- keywords: +patch pull_requests: +5122 ___ Python tracker <https://bugs.python.org/issue32630> ___ ___ Python-bugs-list mailin

[issue32436] Implement PEP 567

2018-01-22 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 83c8675edb4fe278c5d930f7865977a5d3c7168a by Yury Selivanov in branch 'master': bpo-32436: Remove a redundant assert (#5275) https://github.com/python/cpython/commit/83c8675edb4fe278c5d930f7865977

[issue32636] test_asyncio fails with PYTHONASYNCIODEBUG=1

2018-01-23 Thread Yury Selivanov
Yury Selivanov added the comment: Nathaniel, this is is a regression of fc2f407829d9817ddacccae6944dd0879cfaca24 -- bpo-32591: Add native coroutine origin tracking. Please take a look. -- nosy: +njs ___ Python tracker <https://bugs.python.

[issue32633] Warnings from test_asyncio.test_tasks.SetMethodsTest

2018-01-23 Thread Yury Selivanov
Yury Selivanov added the comment: I don't think that 6934831e43d66222a626403dd775429d1c8963f3 can address the leak in any way. -- ___ Python tracker <https://bugs.python.org/is

[issue30491] Add a lightweight mechanism for detecting un-awaited coroutine objects

2018-01-23 Thread Yury Selivanov
Yury Selivanov added the comment: I'd like to see benchmarks of coroutine creation time and awaits with and without the proposed patch. -- ___ Python tracker <https://bugs.python.org/is

[issue32633] Warnings from test_asyncio.test_tasks.SetMethodsTest

2018-01-23 Thread Yury Selivanov
Yury Selivanov added the comment: However I ran the whole asyncio test suite in reftracking mode on my machine (latest master) and it passed. So I guess this issue is indeed closed. -- ___ Python tracker <https://bugs.python.org/issue32

[issue32296] Implement asyncio._get_running_loop() and get_event_loop() in C

2018-01-23 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 9d411c119fdd8e42209ec16be27686a843507f18 by Yury Selivanov in branch 'master': bpo-32296: Make get_running_loop() another 4-5x faster (#5277) https://github.com/python/cpython/commit/9d411c119fdd8e42209ec16be27686

[issue32410] Implement loop.sock_sendfile method

2018-01-23 Thread Yury Selivanov
Yury Selivanov added the comment: Andrew, test_cancel2 test fails 1 out of 10 times on my machine (log below). Could you please take a look? Also, can you rename sendfile tests to 'test_sock_sendfile_*'? {pydev} ~/d/p/cpython (master %) » ./python.exe -m test test_asy

[issue32436] Implement PEP 567

2018-01-23 Thread Yury Selivanov
Change by Yury Selivanov : -- pull_requests: +5132 ___ Python tracker <https://bugs.python.org/issue32436> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32436] Implement PEP 567

2018-01-23 Thread Yury Selivanov
Change by Yury Selivanov : -- stage: patch review -> commit review ___ Python tracker <https://bugs.python.org/issue32436> ___ ___ Python-bugs-list mai

[issue32436] Implement PEP 567

2018-01-23 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 0bad4d63c654d93e1f32ff35026405a3987db5ca by Yury Selivanov in branch 'master': bpo-32436: Fix potential NULL dereference (#5286) https://github.com/python/cpython/commit/0bad4d63c654d93e1f32ff35026405

[issue32639] Coverity: CID 1428443: Null pointer dereferences (NULL_RETURNS) /Python/hamt.c: 1058 in hamt_node_bitmap_without()

2018-01-23 Thread Yury Selivanov
Yury Selivanov added the comment: Victor, it's been already fixed/tracked here: https://github.com/python/cpython/pull/5286 (I also receive coverity reports :) -- resolution: -> out of date stage: -> resolved status: open -> closed type

[issue32639] Coverity: CID 1428443: Null pointer dereferences (NULL_RETURNS) /Python/hamt.c: 1058 in hamt_node_bitmap_without()

2018-01-23 Thread Yury Selivanov
Yury Selivanov added the comment: > Oh, I didn't know. The current workflow is not ideal to avoid duplicated > issues. If I fix something that's been reported there I usually update the coverity issue directly. But yeah... -- __

[issue32641] test_context and test_asyncio crash on Windows 7

2018-01-23 Thread Yury Selivanov
Yury Selivanov added the comment: It's not a regression, the newly added code doesn't work on some Windows buildbot... looking at it. -- ___ Python tracker <https://bugs.python.o

[issue32641] test_context and test_asyncio crash on Windows 7

2018-01-23 Thread Yury Selivanov
Yury Selivanov added the comment: No, these are trivial uint32_t/Py_SIZE: `for (uint32_t i = val_idx + 1; i < Py_SIZE(o); i++)`; it's something else. I suspect popcount instruction... -- ___ Python tracker <https://bugs.python.org

[issue32641] test_context and test_asyncio crash on Windows 7

2018-01-23 Thread Yury Selivanov
Yury Selivanov added the comment: I suspect this is a compiler bug. I can't reproduce it on my windows 7 virtual machine and on AppVeyor. It's not related to HAMT, btw, as there is a multitude of HAMT-specific tests that all pass. The crash is specifically in context.c, and the

[issue32636] test_asyncio fails with PYTHONASYNCIODEBUG=1

2018-01-23 Thread Yury Selivanov
Yury Selivanov added the comment: asyncio.coroutine sets the co_flags bit CO_ITERABLE_COROUTINE for generator functions' code objects. With that bit flag, Python allows to 'yield from' native coroutines. CoroWrapper.send() -> wrapped_generator.send() -> Y

[issue32636] test_asyncio fails with PYTHONASYNCIODEBUG=1

2018-01-23 Thread Yury Selivanov
Yury Selivanov added the comment: No, it's this specific commit. I can double check later, but I'm pretty sure about that. -- ___ Python tracker <https://bugs.python.o

[issue32436] Implement PEP 567

2018-01-23 Thread Yury Selivanov
Change by Yury Selivanov : -- pull_requests: +5138 stage: commit review -> patch review ___ Python tracker <https://bugs.python.org/issue32436> ___ ___ Python-

[issue32641] test_context and test_asyncio crash on Windows 7

2018-01-23 Thread Yury Selivanov
Change by Yury Selivanov : -- keywords: +patch pull_requests: +5139 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue32641> ___ ___ Py

[issue32641] test_context and test_asyncio crash on Windows 7

2018-01-23 Thread Yury Selivanov
Yury Selivanov added the comment: In an off-list conversation with David, it was confirmed that the buildbot in question runs on an old hardware without SSE4.2 support. I decided to simply stop using native popcount instructions as there's no detectable performance difference when using

[issue32436] Implement PEP 567

2018-01-23 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset b7a80d543e1e94475ab9c8214f7a9eab4e63c9ab by Yury Selivanov in branch 'master': bpo-32436: Don't use native popcount() (also fixes bpo-32641) (#5292) https://github.com/python/cpython/commit/b7a80d543e1e94475ab9c8214

[issue32641] test_context and test_asyncio crash on Windows 7

2018-01-23 Thread Yury Selivanov
Yury Selivanov added the comment: I've pushed a commit that should fix the buildbot. Please reopen if it doesn't. -- ___ Python tracker <https://bugs.python.o

[issue32641] test_context and test_asyncio crash on Windows 7

2018-01-23 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset b7a80d543e1e94475ab9c8214f7a9eab4e63c9ab by Yury Selivanov in branch 'master': bpo-32436: Don't use native popcount() (also fixes bpo-32641) (#5292) https://github.com/python/cpython/commit/b7a80d543e1e94475ab9c8214

[issue30491] Add a lightweight mechanism for detecting un-awaited coroutine objects

2018-01-23 Thread Yury Selivanov
Yury Selivanov added the comment: Guido, This is another feature for native coroutines that Nathaniel proposes for 3.7. Here's a summary (this issue has too many messages): 1. It adds a new mechanism to detect un-awaited coroutines (i.e. when a user forgets to use await). 2. To enabl

[issue30491] Add a lightweight mechanism for detecting un-awaited coroutine objects

2018-01-23 Thread Yury Selivanov
Change by Yury Selivanov : -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/issue30491> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32643] Make Task._step, Task._wakeup and Future._schedule_callback methods private

2018-01-23 Thread Yury Selivanov
New submission from Yury Selivanov : I propose to drop support for overloading Task._step, Task._wakeup, and Future._schedule_callbacks. This makes the implementation easier for us to maintain and optimize. It also makes it easier for alternative asyncio event loops and interops with other

[issue32643] Make Task._step, Task._wakeup and Future._schedule_callback methods private

2018-01-23 Thread Yury Selivanov
Change by Yury Selivanov : -- keywords: +patch pull_requests: +5140 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue32643> ___ ___ Py

[issue32645] test_asyncio: TLS tests fail on "x86 Windows7" buildbot

2018-01-24 Thread Yury Selivanov
Yury Selivanov added the comment: I now have a Win7 VM, I'll take a look at this later. -- ___ Python tracker <https://bugs.python.org/issue32645> ___ ___

[issue32636] test_asyncio fails with PYTHONASYNCIODEBUG=1

2018-01-24 Thread Yury Selivanov
Yury Selivanov added the comment: > Nathaniel: do you want to include these fixes in your PR as well? Victor, can you submit a new PR for this? Let's merge this right away. -- ___ Python tracker <https://bugs.python.org

[issue32643] Make Task._step, Task._wakeup and Future._schedule_callback methods private

2018-01-24 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 22feeb88b473b288950cdb2f6c5d28692274b5f9 by Yury Selivanov in branch 'master': bpo-32643: Drop support for a few private Task and Future APIs. (#5293) https://github.com/python/cpython/commit/22feeb88b473b288950cdb2f6c5d28

[issue32643] Make Task._step, Task._wakeup and Future._schedule_callback methods private

2018-01-24 Thread Yury Selivanov
Change by Yury Selivanov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue30491] Add a lightweight mechanism for detecting un-awaited coroutine objects

2018-01-24 Thread Yury Selivanov
Yury Selivanov added the comment: So let's retarget this to 3.8 as it's too close to 3.7 feature freeze to get seriously considered/merged. -- versions: +Python 3.8 -Python 3.7 ___ Python tracker <https://bugs.python.o

[issue32653] AttributeError: 'Task' object has no attribute '_callbacks'

2018-01-24 Thread Yury Selivanov
Yury Selivanov added the comment: Can you check if this happens on 3.6? 3.5 is in a security-fix mode only, so even if this is a bug it would take us a long time to fix it. -- ___ Python tracker <https://bugs.python.org/issue32

[issue32636] test_asyncio fails with PYTHONASYNCIODEBUG=1

2018-01-24 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset fb5a7ad421ac20c49218ee4b86fb0d85ca4cd664 by Yury Selivanov (Nathaniel J. Smith) in branch 'master': bpo-32636: Fix @asyncio.coroutine debug mode bug exposed by gh-5250 (#5291) https://github.com/python/cpyt

[issue32636] test_asyncio fails with PYTHONASYNCIODEBUG=1

2018-01-24 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 789e359f51d2b27bea01b8c6c3bf090aaedf8839 by Yury Selivanov (Victor Stinner) in branch 'master': bpo-32636: Fix two bugs in test_asyncio (#5302) https://github.com/python/cpython/commit/789e359f51d2b27bea01b8c6c3bf09

[issue32636] test_asyncio fails with PYTHONASYNCIODEBUG=1

2018-01-24 Thread Yury Selivanov
Yury Selivanov added the comment: This can probably be closed now. Thanks Victor and Nathaniel! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-24 Thread Yury Selivanov
Yury Selivanov added the comment: Stefan, it would be great to have this committed before 3.7 feature freeze. The change is pretty straightforward -- we replaced threading.local() with a contextvar, which should be a backwards compatible change

[issue32662] Implement Server.serve_forever and corresponding APIs

2018-01-24 Thread Yury Selivanov
New submission from Yury Selivanov : As discussed, we want to make Server objects more usable in async/await code and more compatible with asyncio.run. This is also needed to handle a use case when two or more servers are created and need to start listening at the same time. We propose to

[issue32662] Implement Server.serve_forever and corresponding APIs

2018-01-24 Thread Yury Selivanov
Change by Yury Selivanov : -- keywords: +patch pull_requests: +5158 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue32662> ___ ___ Py

[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-25 Thread Yury Selivanov
Yury Selivanov added the comment: > I realize that you had to fight massive mailing list distractions > during the PEP discussions, but this is very close to the beta ... Oh thanks, but I see no reason for you to be condescending here. I cannot reproduce this on Mac OS / Linux. Are yo

[issue32436] Implement PEP 567

2018-01-25 Thread Yury Selivanov
Change by Yury Selivanov : -- pull_requests: +5171 ___ Python tracker <https://bugs.python.org/issue32436> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-25 Thread Yury Selivanov
Yury Selivanov added the comment: (Just in case I rebased my patch onto the latest master) -- ___ Python tracker <https://bugs.python.org/issue32630> ___ ___

[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-25 Thread Yury Selivanov
Yury Selivanov added the comment: I think I found what cause this, but I have no idea why it has surfaced only now :) https://github.com/python/cpython/pull/5326/files (see the added PyType_IS_GC(Py_TYPE(name)) check) I'll merge that PR and rebase the decimal patch

[issue32436] Implement PEP 567

2018-01-25 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 6ab62920c87930dedc31fe633ecda3e51d3d7503 by Yury Selivanov in branch 'master': bpo-32436: Fix a refleak; var GC tracking; a GCC warning (#5326) https://github.com/python/cpython/commit/6ab62920c87930dedc31fe633ecda3

[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-25 Thread Yury Selivanov
Yury Selivanov added the comment: I pushed a fix (already in the master branch) and rebased the patch once again. I expect it to work now :) -- ___ Python tracker <https://bugs.python.org/issue32

[issue29302] add contextlib.AsyncExitStack

2018-01-25 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 1aa094f74039cd20fdc7df56c68f6848c18ce4dd by Yury Selivanov (Ilya Kulakov) in branch 'master': bpo-29302: Implement contextlib.AsyncExitStack. (#4790) https://github.com/python/cpython/commit/1aa094f74039cd20fdc7df56c68f68

[issue29302] add contextlib.AsyncExitStack

2018-01-25 Thread Yury Selivanov
Yury Selivanov added the comment: Thank you Alexander and Ilya! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue32670] Enforce PEP 479—StopIteration and generators—in Python 3.7 by default

2018-01-25 Thread Yury Selivanov
New submission from Yury Selivanov : As per PEP 479, in Python 3.7 it should be a RuntimeError when a StopIteration exception is raised manually in a generator, a coroutine, or an async generator. -- assignee: yselivanov components: Interpreter Core messages: 310712 nosy: gvanrossum

[issue32670] Enforce PEP 479—StopIteration and generators—in Python 3.7 by default

2018-01-25 Thread Yury Selivanov
Change by Yury Selivanov : -- keywords: +patch pull_requests: +5172 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue32670> ___ ___ Py

[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-25 Thread Yury Selivanov
Change by Yury Selivanov : -- nosy: +ned.deily priority: normal -> release blocker ___ Python tracker <https://bugs.python.org/issue32630> ___ ___ Python-

[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-25 Thread Yury Selivanov
Yury Selivanov added the comment: Stefan, I do think that this is a release blocker. We want to get this change as early as possible to ensure that it's well tested. AFAIK Guido also wants decimal to be updated and well supported in async/await

[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-25 Thread Yury Selivanov
Yury Selivanov added the comment: > Sure, and *I* am the one running the extended decimal test suite as we speak, > not Guido. Thank you. > You are playing power games here, and you did that from the start by choosing > the nosy list. Please. I thought it was pretty much dec

[issue32662] Implement Server.serve_forever and corresponding APIs

2018-01-25 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset c9070d03f5169ad6e171e641b7fa8feab18bf229 by Yury Selivanov in branch 'master': bpo-32662: Implement Server.start_serving() and Server.serve_forever() (#5312) https://github.com/python/cpython/commit/c9070d03f5169ad6e171e641b7fa8f

[issue32662] Implement Server.serve_forever and corresponding APIs

2018-01-25 Thread Yury Selivanov
Change by Yury Selivanov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue32574] asyncio.Queue, put() leaks memory if the queue is full

2018-01-25 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset c47dacb69054f6fe1c2465df585985430f7fe366 by Yury Selivanov (José Melero Fernández) in branch 'master': bpo-32574: Fix leaks in asyncio.Queue.put() and .get() (#5208) https://github.com/python/cpyt

[issue32574] asyncio.Queue, put() leaks memory if the queue is full

2018-01-25 Thread Yury Selivanov
Change by Yury Selivanov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s)

2018-01-25 Thread Yury Selivanov
Yury Selivanov added the comment: The following snippet crashes with SIGABRT: import asyncio async def f(): pass asyncio.gather(f()) llvm tells that the crash is in _PyGen_Finalize/_PyErr_WarnUnawaitedCoroutine -- ___ Python tracker

[issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s)

2018-01-25 Thread Yury Selivanov
Change by Yury Selivanov : -- resolution: fixed -> status: closed -> open ___ Python tracker <https://bugs.python.org/issue32591> ___ ___ Python-bugs-list

[issue32662] Implement Server.serve_forever and corresponding APIs

2018-01-25 Thread Yury Selivanov
Change by Yury Selivanov : -- pull_requests: +5185 ___ Python tracker <https://bugs.python.org/issue32662> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32662] Implement Server.serve_forever and corresponding APIs

2018-01-25 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 4112c5b97d9c1c7b034653d0e017ffa894a45c74 by Yury Selivanov in branch 'master': bpo-32662: Try making test_asyncio.test_server more reliable (#5338) https://github.com/python/cpython/commit/4112c5b97d9c1c7b034653d0e017ff

[issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s)

2018-01-26 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset dba976b8a28d6e5daa66ef31a6a7c694a9193f6a by Yury Selivanov (Nathaniel J. Smith) in branch 'master': bpo-32591: fix abort in _PyErr_WarnUnawaitedCoroutine during shutdown (#5337) https://github.com/python/cpyt

[issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s)

2018-01-26 Thread Yury Selivanov
Yury Selivanov added the comment: Nathaniel's latest PR looks good and fixes the crash. FWIW losing some warnings during interpreter shutdown isn't exactly a new problem, therefore I think there's nothing wrong with the new API here. For instance, I've seen asyncio&

[issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s)

2018-01-26 Thread Yury Selivanov
Change by Yury Selivanov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

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