[issue42538] AsyncIO strange behaviour

2020-12-02 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

I understand the issue as the following:

1. You don't save the result of `asyncio.create_task()` somewhere.
The task object is dereferenced and thus you see a warning.

2. With PYTHONASYNCIODEBUG on the task is referenced also by internal debug 
structure, that's why you don't see the warning.

Perhaps we should store a weak reference to task in _source_traceback

Minor thing but nice to have it fixed.

--

___
Python tracker 
<https://bugs.python.org/issue42538>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42526] Exceptions in asyncio.Server callbacks are not retrievable

2020-12-01 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

You can use try/except in handler() and dispatch the exception whatever you 
want.
It doesn't require a new asyncio version, debug-only flag, etc.

--

___
Python tracker 
<https://bugs.python.org/issue42526>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40800] asyncio.sleep(0) should "yield" back to the event loop, but it doesn't behave as expected

2020-12-01 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Agree, not a bug.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue40800>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42526] Exceptions in asyncio.Server callbacks are not retrievable

2020-12-01 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

This is a deliberate decision.
An exception in handling one client connection should not break another 
connected client.

--

___
Python tracker 
<https://bugs.python.org/issue42526>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42392] remove the deprecated 'loop' parameter asyncio API

2020-11-30 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Thanks for your help!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue42392>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42392] remove the deprecated 'loop' parameter asyncio API

2020-11-29 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 86150d39c888579b65841f4391d054b7b3eff9f2 by Yurii Karabas in 
branch 'master':
bpo-42392: Remove deprecated loop parameter from docs (GH-23552)
https://github.com/python/cpython/commit/86150d39c888579b65841f4391d054b7b3eff9f2


--

___
Python tracker 
<https://bugs.python.org/issue42392>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41879] Outdated description of async iterables in documentation of async for statement

2020-11-28 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

You are right.

--

___
Python tracker 
<https://bugs.python.org/issue41879>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41818] Lib/pty.py major revision

2020-11-28 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 74311aeb45b52cc145d27d9fca99f01874d6882d by Soumendra Ganguly in 
branch 'master':
bpo-41818: Fix test_master_read() so that it succeeds on all platforms that 
either raise OSError or return b"" upon reading from master (GH-23536)
https://github.com/python/cpython/commit/74311aeb45b52cc145d27d9fca99f01874d6882d


--

___
Python tracker 
<https://bugs.python.org/issue41818>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41879] Outdated description of async iterables in documentation of async for statement

2020-11-28 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Both mentioned links have the correct code.
They use sync __aiter__ and async __anext__

--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue41879>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42489] Wrong method signature in python Documentation

2020-11-28 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
assignee:  -> docs@python
components: +Documentation -macOS
nosy: +docs@python
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.8

___
Python tracker 
<https://bugs.python.org/issue42489>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41562] StreamReaderProtocol inheritance

2020-11-28 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Fixing a non-broken thing is not a world-class idea, I think.

--

___
Python tracker 
<https://bugs.python.org/issue41562>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34215] streams.py:IncompleteReadError message is unclear when expected is None

2020-11-28 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue34215>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34215] streams.py:IncompleteReadError message is unclear when expected is None

2020-11-28 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset df6c8bcffef3380869c8f76317610ce452880b25 by Miss Islington (bot) 
in branch '3.9':
bpo-34215: Clarify IncompleteReadError message when "expected" is None 
(GH-21925) (GH-23539)
https://github.com/python/cpython/commit/df6c8bcffef3380869c8f76317610ce452880b25


--

___
Python tracker 
<https://bugs.python.org/issue34215>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42489] Wrong method signature in python Documentation

2020-11-28 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset d41ec65ab7411e877ca33d05e8c900feca530635 by Zackery Spytz in 
branch 'master':
bpo-42489: Fix the signature for list.sort() in the tutorial (GH-23538)
https://github.com/python/cpython/commit/d41ec65ab7411e877ca33d05e8c900feca530635


--
nosy: +asvetlov

___
Python tracker 
<https://bugs.python.org/issue42489>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34215] streams.py:IncompleteReadError message is unclear when expected is None

2020-11-28 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 4498e98a6bdf017d3b65fa679baf4c797909beb6 by Miss Islington (bot) 
in branch '3.8':
bpo-34215: Clarify IncompleteReadError message when "expected" is None 
(GH-21925) (#23540)
https://github.com/python/cpython/commit/4498e98a6bdf017d3b65fa679baf4c797909beb6


--

___
Python tracker 
<https://bugs.python.org/issue34215>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-11-28 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Can we close the issue?

--
nosy: +asvetlov

___
Python tracker 
<https://bugs.python.org/issue41756>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34215] streams.py:IncompleteReadError message is unclear when expected is None

2020-11-28 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
versions: +Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue34215>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34215] streams.py:IncompleteReadError message is unclear when expected is None

2020-11-28 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 8085f742f4adfbc85f13fc734dfab036aa23acfb by Zackery Spytz in 
branch 'master':
bpo-34215: Clarify IncompleteReadError message when "expected" is None 
(GH-21925)
https://github.com/python/cpython/commit/8085f742f4adfbc85f13fc734dfab036aa23acfb


--

___
Python tracker 
<https://bugs.python.org/issue34215>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41241] Unnecessary Type casting in 'if condition'

2020-11-28 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue41241>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-11-28 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Fixed by #42392

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
superseder:  -> remove the deprecated 'loop' parameter asyncio API
versions: +Python 3.10 -Python 3.9

___
Python tracker 
<https://bugs.python.org/issue38599>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42392] remove the deprecated 'loop' parameter asyncio API

2020-11-28 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
title: remove the 'loop' parameter from __init__ in all classes in 
asyncio.locks -> remove the deprecated 'loop' parameter asyncio API

___
Python tracker 
<https://bugs.python.org/issue42392>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42347] loop.call_exception_handler documentation is lacking

2020-11-28 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Partially addressed by https://github.com/python/cpython/pull/21735

--

___
Python tracker 
<https://bugs.python.org/issue42347>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42466] asyncio loop.getaddrinfo raises RuntimeError

2020-11-28 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue42466>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42392] remove the 'loop' parameter from __init__ in all classes in asyncio.locks

2020-11-28 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset e4fe303b8cca525e97d44e80c7e53bdab9dd9187 by Yurii Karabas in 
branch 'master':
bpo-42392: Remove loop parameter from asyncio.tasks and asyncio.subprocess 
(GH-23521)
https://github.com/python/cpython/commit/e4fe303b8cca525e97d44e80c7e53bdab9dd9187


--

___
Python tracker 
<https://bugs.python.org/issue42392>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41818] Lib/pty.py major revision

2020-11-27 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset f5a19ead4ba8c81cc27d5a530f830f4709ce240e by Soumendra Ganguly in 
branch 'master':
bpo-41818: Make test_openpty() avoid unexpected success due to number of rows 
and/or number of columns being == 0. (GH-23526)
https://github.com/python/cpython/commit/f5a19ead4ba8c81cc27d5a530f830f4709ce240e


--

___
Python tracker 
<https://bugs.python.org/issue41818>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42466] asyncio loop.getaddrinfo raises RuntimeError

2020-11-26 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Because it did work in a gray area.
The finalization logic has slightly changed, some tricks that were working 
before now fails.
Sure, other undocumented tricks start working :)

The rule of thumb: please stop and close the asyncio loop before exiting the 
program. This rule allows for avoiding situations like this.

--

___
Python tracker 
<https://bugs.python.org/issue42466>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42466] asyncio loop.getaddrinfo raises RuntimeError

2020-11-26 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Because you have `test.start()` and immediately finish the script.

The interpreted goes to *shutdown* state and implicitly waits for `test.join()` 
because the test thread is not a daemon.

--

___
Python tracker 
<https://bugs.python.org/issue42466>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41332] connect_accepted_socket() missing from AbstractEventLoop

2020-11-26 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10 -Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

___
Python tracker 
<https://bugs.python.org/issue41332>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41332] connect_accepted_socket() missing from AbstractEventLoop

2020-11-26 Thread Andrew Svetlov

Andrew Svetlov  added the comment:


New changeset e3ef4d7f653976ac0ccacc4e3fde06bf0e0f139b by Alex Grönholm in 
branch 'master':
bpo-41332: Added missing connect_accepted_socket() to AbstractEventLoop 
(GH-21533)
https://github.com/python/cpython/commit/e3ef4d7f653976ac0ccacc4e3fde06bf0e0f139b


--

___
Python tracker 
<https://bugs.python.org/issue41332>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41562] StreamReaderProtocol inheritance

2020-11-26 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

You are right, but the existing inheritance is also correct (while a little 
redundant).

Sorry, I don't think we should do anything: don't fix if not broken.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue41562>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42347] loop.call_exception_handler documentation is lacking

2020-11-26 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Pull Request is welcome!

--

___
Python tracker 
<https://bugs.python.org/issue42347>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42413] Replace custom exceptions for timeouts with TimeoutError

2020-11-26 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Pull Request https://github.com/python/cpython/pull/23520/ applies the 
discussed change to both asyncio and concurrent.futures.

I did the minimally invasive change, libraries still use `asyncio.TimeoutError` 
and `concurrent.futures.TimeoutError` internally but both names are aliases now.

--

___
Python tracker 
<https://bugs.python.org/issue42413>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42413] Replace custom exceptions for timeouts with TimeoutError

2020-11-26 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
pull_requests: +22404
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23520

___
Python tracker 
<https://bugs.python.org/issue42413>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42413] Replace custom exceptions for timeouts with TimeoutError

2020-11-26 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
components: +Library (Lib), asyncio

___
Python tracker 
<https://bugs.python.org/issue42413>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42413] Replace custom exceptions for timeouts with TimeoutError

2020-11-26 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
title: Replace custom exception socket.timeout with TimeoutError -> Replace 
custom exceptions for timeouts with TimeoutError

___
Python tracker 
<https://bugs.python.org/issue42413>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42466] asyncio loop.getaddrinfo raises RuntimeError

2020-11-26 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Your snippet exits just after starting.
`getaddrinfo()` is called at the interpreter shutdown state.

I'm not sure that do you expect to get here.  We can put some effort and raise 
an error with another message but cannot make the example working.

I suggest just closing the issue; nothing to do here.

--

___
Python tracker 
<https://bugs.python.org/issue42466>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42392] remove the 'loop' parameter from __init__ in all classes in asyncio.locks

2020-11-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

A few functions in `tasks.py` a left and documentation should be updated.

--

___
Python tracker 
<https://bugs.python.org/issue42392>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42392] remove the 'loop' parameter from __init__ in all classes in asyncio.locks

2020-11-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset f533cb80cbbb7acdf9ce1978cfba095ce5eeedaa by Yurii Karabas in 
branch 'master':
bpo-42392: Remove loop parameter from asyncio.streams (GH-23517)
https://github.com/python/cpython/commit/f533cb80cbbb7acdf9ce1978cfba095ce5eeedaa


--

___
Python tracker 
<https://bugs.python.org/issue42392>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39529] Deprecate get_event_loop()

2020-11-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

I think the deprecation of `set_event_loop()` is a good idea.
The function is not required by `asyncio.run()` implementation.

--

___
Python tracker 
<https://bugs.python.org/issue39529>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28468] Add platform.freedesktop_os_release()

2020-11-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Don't get me wrong.
I don't want to put my vote in this hot discussion but mention my use case. 
test.support can solve my need.
On another hand, very many Python batteries exist to solve third-party needs 
and are not required by CPython itself.

So I'm +0 for adding this function -- but can live without it.

--

___
Python tracker 
<https://bugs.python.org/issue28468>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41818] Lib/pty.py major revision

2020-11-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 87f7ab5359bc12eeb858272b7bd58e132cb9c176 by Andrew Svetlov in 
branch 'master':
bpo-41818: test_openpty succeed on Gentoo, don't expect to fail on this 
platform (GH-23514)
https://github.com/python/cpython/commit/87f7ab5359bc12eeb858272b7bd58e132cb9c176


--

___
Python tracker 
<https://bugs.python.org/issue41818>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28468] Add platform.freedesktop_os_release()

2020-11-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

I just needed such functionality for PTY tests: 
https://github.com/python/cpython/pull/23514

--
nosy: +asvetlov

___
Python tracker 
<https://bugs.python.org/issue28468>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41818] Lib/pty.py major revision

2020-11-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

https://github.com/python/cpython/pull/23514 has the fix, waiting for all 
buildbots finish before pressing "Merge" button.
Gentoo bots are green.

--

___
Python tracker 
<https://bugs.python.org/issue41818>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41818] Lib/pty.py major revision

2020-11-25 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
pull_requests: +22401
pull_request: https://github.com/python/cpython/pull/23514

___
Python tracker 
<https://bugs.python.org/issue41818>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41818] Lib/pty.py major revision

2020-11-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset c13d89955d9a2942c6355d6839d7096323244136 by Soumendra Ganguly in 
branch 'master':
bpo-41818: Updated tests for the standard pty library (GH-22962)
https://github.com/python/cpython/commit/c13d89955d9a2942c6355d6839d7096323244136


--
nosy: +asvetlov

___
Python tracker 
<https://bugs.python.org/issue41818>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42392] remove the 'loop' parameter from __init__ in all classes in asyncio.locks

2020-11-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

> Should I create a separate issue for every PR or they all can be done in the 
> scope of this PR (we can update issue title to match what was done)?

Up to you, I don't think it really matters.

--

___
Python tracker 
<https://bugs.python.org/issue42392>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42392] remove the 'loop' parameter from __init__ in all classes in asyncio.locks

2020-11-24 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> enhancement

___
Python tracker 
<https://bugs.python.org/issue42392>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42392] remove the 'loop' parameter from __init__ in all classes in asyncio.locks

2020-11-24 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 0ec34cab9dd4a7bcddafaeeb445fae0f26afcdd1 by Yurii Karabas in 
branch 'master':
bpo-42392: Remove loop parameter form asyncio locks and Queue (#23420)
https://github.com/python/cpython/commit/0ec34cab9dd4a7bcddafaeeb445fae0f26afcdd1


--

___
Python tracker 
<https://bugs.python.org/issue42392>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42445] Assertion in run_coroutine_threadsafe

2020-11-24 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

"got Future  attached to a different loop" means exactly what 
it says: you create a future object in one loop but awaits it in the different 
one. This is a programming error.

Most likely the error in your script, not in mqtt and definitely not in asyncio.

Sorry, the mqtt is not a part of CPython and I don't know how to work with it 
properly. Please contact the library maintainers.

Nothing to do on the asyncio side.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue42445>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42445] Assertion in run_coroutine_threadsafe

2020-11-23 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Transferring the loop instance between threads is not safe. You should create a 
loop and after that call run_forever() in the same thread.
Or, even better, call asynxio.run() in a thread.

--

___
Python tracker 
<https://bugs.python.org/issue42445>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15450] Allow dircmp.subdirs to behave well under subclassing

2020-11-23 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10 -Python 3.4

___
Python tracker 
<https://bugs.python.org/issue15450>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15450] Allow dircmp.subdirs to behave well under subclassing

2020-11-23 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 2f2f9d0b5c96e68ed91cddd6673860ee752eb49c by Nick Crews in branch 
'master':
bpo-15450: Allow subclassing of dircmp (GH-23424) (#23424)
https://github.com/python/cpython/commit/2f2f9d0b5c96e68ed91cddd6673860ee752eb49c


--
nosy: +asvetlov

___
Python tracker 
<https://bugs.python.org/issue15450>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42413] Replace custom exception socket.timeout with TimeoutError

2020-11-21 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Thus using bare TimeoutError in asyncio is safe, isn't it?
This is good news!

--

___
Python tracker 
<https://bugs.python.org/issue42413>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42413] Replace custom exception socket.timeout with TimeoutError

2020-11-21 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

I know that I just create OSError() with errno set to None.

My question is: has the standard library such code examples already?
In other words, how many third-party code will be broken by catching OSError 
with errno=None?

--

___
Python tracker 
<https://bugs.python.org/issue42413>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42413] Replace custom exception socket.timeout with TimeoutError

2020-11-21 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Perhaps it is a good compromise.
OSError-derived class without errno looks getter to me that different 
incompatible TimeoutError classes.

How many exceptions inherited from OSError have no errno set? Do we have a 
precedent in stdlib at all already?

--

___
Python tracker 
<https://bugs.python.org/issue42413>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42413] Replace custom exception socket.timeout with TimeoutError

2020-11-21 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

In futures and asyncio TimeoutError has no errno.

I'm not sure should we care but I consider it as a show stopper.

On another hand, two distinct timeout classes confuse people. I had many 
conversions about this during the aiohttp support.  asyncio can raise both 
TimeoutError and asyncio.TimeoutError which is... unexpected at least.

--

___
Python tracker 
<https://bugs.python.org/issue42413>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42395] aclosing was not added to __all__ in contextlib

2020-11-20 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue42395>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42411] respect cgroups limits when trying to allocate memory

2020-11-20 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Could you explain the proposal?

How "+X:UseContainerSupport" behaves for Java? Sorry, I did not use Java for 
ages and don't follow the modern Java best practices.

>From my understanding, without the Docker the allocation of `bytearray(80 * 
>1024 * 1024 * 1000)` leads to `raise MemoryError` if there is no such memory 
>available and malloc()/callloc returns NULL.

The exception is typically not handled at all but unwinded to "kill the 
process" behavior.

The reason for this situation is: in Python when you are trying to handle 
out-of-memory behavior the handler has a very which chance to allocate a Python 
object under the hood and raise MemoryError at any line of the Python exception 
handler.

--
nosy: +asvetlov

___
Python tracker 
<https://bugs.python.org/issue42411>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42392] remove the 'loop' parameter from __init__ in all classes in asyncio.locks

2020-11-19 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Perfect!

We have a consensus now and waiting for a champion who propose a Pull Request.

--

___
Python tracker 
<https://bugs.python.org/issue42392>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42392] remove the 'loop' parameter from __init__ in all classes in asyncio.locks

2020-11-18 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Perhaps Kyle is right, I had a misunderstanding with `get_running_loop()` vs 
`_get_running_loop()`.

The last version seems good except for the rare chance of race condition.

The safe code can look like:

global_lock = threading.Lock()  like GIL

   def _get_loop(self):
   loop = asyncio.get_running_loop()
   if self._loop is None:
# the lock is required because
# the thread switch can happen
# between `self._loop is None` check
# and `self._loop = loop` assignment
with global_lock:
if self._loop is not None:
self._loop = loop
   if loop is not self._loop: raise

The alternative is using the fast C atomic `compare_and_swap` function
which is executed under the hold GIL.
We need the pure-Python fallback anyway.

Multithreading is hard...

--

___
Python tracker 
<https://bugs.python.org/issue42392>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42085] Add dedicated slot for sending values

2020-11-18 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Is anything left to do?

--

___
Python tracker 
<https://bugs.python.org/issue42085>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42392] remove the 'loop' parameter from __init__ in all classes in asyncio.locks

2020-11-18 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Despite the fact that asyncio.get_running_loop() never returns None but raises 
RuntimeError (and maybe other tiny cleanups), 
I can live with the proposal.

It doesn't make a system worse at least and backward compatible.
We can return to the idea of raising a warning from the constructor later, on 
collecting more feedback.

P.S.
There is a subtle non-deterministic behavior in the proposal: if the lock is 
accessed from a concurrent thread, the exception about wrong usage will be 
raised later at an arbitrary code point.
This is a well-known problem of the lazy initialization pattern and maybe we 
should do nothing with it. The programming is a compromise always.

--

___
Python tracker 
<https://bugs.python.org/issue42392>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42392] remove the 'loop' parameter from __init__ in all classes in asyncio.locks

2020-11-18 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

My initial thought was protecting the Lock (and other primitives) creation when 
a loop is not running.

Yuri insists that Lock can be created without a loop. Technically it is 
possible, sure.
But the lock is tightly coupled with a loop instance. In other words, the loop 
belongs to the loop.
The lock cannot be used after the loop dies (stopped and closed).

Thus, the global scoped lock object still looks suspicious in my eyes.
The lock's lifecycle should be closer than the lifecycle of the loop, isn't it? 
I know, asyncio.Lock() can safely live after the loop closing but should we 
encourage this style? There are many other asyncio objects like HTTP clients 
and DB drivers that should be closed before the loop finishing for graceful 
closing TCP transports etc.

Another thing to consider is: whether to cache a loop inside a lock;  whether 
to add a check when the lock is used by two loops?

I think for the last question the answer is "yes". I recall many questions and 
bug reports on StackOverflow and aiohttp bug tracker when people use the 
multithreaded model for some reason and tries to get access to a shared object 
from different threads that executes each own loop.

The check becomes extremely important for synchronization primitives like 
asyncio.Lock class; threading.Lock is supposed to be shared between threads and 
users can apply the same pattern for asyncio.Lock by oversight.
Also, supporting global asyncio.Lock instances increase the chance that the 
lock is used by different loops.

--

___
Python tracker 
<https://bugs.python.org/issue42392>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42396] Add a whatsnew entry about async contextlib.nullcontext

2020-11-17 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10

___
Python tracker 
<https://bugs.python.org/issue42396>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42395] aclosing was not added to __all__ in contextlib

2020-11-17 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
versions: +Python 3.10

___
Python tracker 
<https://bugs.python.org/issue42395>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42392] remove the 'loop' parameter from __init__ in all classes in asyncio.locks

2020-11-17 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

This was on my to-do list but I very much appreciate if somebody champions this 
issue.
I should finish sslproto PR first.

--

___
Python tracker 
<https://bugs.python.org/issue42392>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42237] test_socket.SendfileUsingSendfileTest fails on illumos

2020-11-12 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8

___
Python tracker 
<https://bugs.python.org/issue42237>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42237] test_socket.SendfileUsingSendfileTest fails on illumos

2020-11-12 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset f37628eb7117f222de24a6931aa7639e668cb7b0 by Jakub Stasiak in 
branch '3.8':
[3.8] bpo-42237: Fix os.sendfile() on illumos (GH-23154). (GH-23246)
https://github.com/python/cpython/commit/f37628eb7117f222de24a6931aa7639e668cb7b0


--

___
Python tracker 
<https://bugs.python.org/issue42237>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42237] test_socket.SendfileUsingSendfileTest fails on illumos

2020-11-12 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset fd4ed57674c675e05bd5d577dd5047a333c76c78 by Jakub Stasiak in 
branch 'master':
bpo-42237: Fix os.sendfile() on illumos (GH-23154)
https://github.com/python/cpython/commit/fd4ed57674c675e05bd5d577dd5047a333c76c78


--
nosy: +asvetlov

___
Python tracker 
<https://bugs.python.org/issue42237>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6225] Fixing several minor bugs in Tkinter.Canvas and one in Misc._configure

2020-11-11 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

I believe, yes

--
status: pending -> open

___
Python tracker 
<https://bugs.python.org/issue6225>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42085] Add dedicated slot for sending values

2020-11-11 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Thank you Victor for the report!

--

___
Python tracker 
<https://bugs.python.org/issue42085>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42085] Add dedicated slot for sending values

2020-11-11 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

PR for the fix is created: https://github.com/python/cpython/pull/23237

--

___
Python tracker 
<https://bugs.python.org/issue42085>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42085] Add dedicated slot for sending values

2020-11-11 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
pull_requests: +22135
pull_request: https://github.com/python/cpython/pull/23237

___
Python tracker 
<https://bugs.python.org/issue42085>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42085] Add dedicated slot for sending values

2020-11-11 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Investigating. The test leaks a future instance.

--

___
Python tracker 
<https://bugs.python.org/issue42085>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42140] asyncio.wait function creates futures set two times

2020-11-11 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10

___
Python tracker 
<https://bugs.python.org/issue42140>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42183] Stack overflow error with asyncio.all_tasks and wait_for

2020-11-10 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 3.7

___
Python tracker 
<https://bugs.python.org/issue42183>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42183] Stack overflow error with asyncio.all_tasks and wait_for

2020-11-10 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 42d873c63aa9d160c132be4a34599531574db12c by Andrew Svetlov in 
branch 'master':
bpo-42183: Fix a stack overflow error for asyncio Task or Future repr() 
(GH-23020)
https://github.com/python/cpython/commit/42d873c63aa9d160c132be4a34599531574db12c


--

___
Python tracker 
<https://bugs.python.org/issue42183>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41543] contextlib.nullcontext doesn't work with async context managers

2020-11-09 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10

___
Python tracker 
<https://bugs.python.org/issue41543>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41543] contextlib.nullcontext doesn't work with async context managers

2020-11-09 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset a117167d8dc8fa673a4646f509551c7950f824e5 by Tom Gringauz in 
branch 'master':
bpo-41543: contextlib.nullcontext can fill in for an async context manager 
(GH-21870)
https://github.com/python/cpython/commit/a117167d8dc8fa673a4646f509551c7950f824e5


--

___
Python tracker 
<https://bugs.python.org/issue41543>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40816] Add missed AsyncContextDecorator to contextlib

2020-11-05 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.org/issue40816>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40816] Add missed AsyncContextDecorator to contextlib

2020-11-05 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 178695b7aee7a7aacd49a3086060e06347d1e556 by Kazantcev Andrey in 
branch 'master':
bpo-40816 Add AsyncContextDecorator class (GH-20516)
https://github.com/python/cpython/commit/178695b7aee7a7aacd49a3086060e06347d1e556


--
nosy: +asvetlov

___
Python tracker 
<https://bugs.python.org/issue40816>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42230] Document that asyncio's wait() and as_completed() accept arbitrary iterables

2020-11-02 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset ad37c66adcd474e3d42a51c63ecb6a54ca2d23f2 by Jakub Stasiak in 
branch '3.8':
[3.8] bpo-42230: Improve asyncio documentation regarding accepting sets vs 
iterables (GH-23073) (GH-23105)
https://github.com/python/cpython/commit/ad37c66adcd474e3d42a51c63ecb6a54ca2d23f2


--

___
Python tracker 
<https://bugs.python.org/issue42230>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42230] Document that asyncio's wait() and as_completed() accept arbitrary iterables

2020-11-02 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 3.6, Python 3.7

___
Python tracker 
<https://bugs.python.org/issue42230>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42230] Document that asyncio's wait() and as_completed() accept arbitrary iterables

2020-11-02 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 3d86d090dcbbdfdd3e5a5951cab30612d6131222 by Jakub Stasiak in 
branch 'master':
bpo-42230: Improve asyncio documentation regarding accepting sets vs iterables 
(GH-23073)
https://github.com/python/cpython/commit/3d86d090dcbbdfdd3e5a5951cab30612d6131222


--

___
Python tracker 
<https://bugs.python.org/issue42230>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42183] Stack overflow error with asyncio.all_tasks and wait_for

2020-10-29 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

The fix is ready

--

___
Python tracker 
<https://bugs.python.org/issue42183>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42183] Stack overflow error with asyncio.all_tasks and wait_for

2020-10-29 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
keywords: +patch
pull_requests: +21934
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23020

___
Python tracker 
<https://bugs.python.org/issue42183>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42183] Stack overflow error with asyncio.all_tasks and wait_for

2020-10-29 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
type:  -> crash
versions: +Python 3.10, Python 3.7

___
Python tracker 
<https://bugs.python.org/issue42183>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42183] Stack overflow error with asyncio.all_tasks and wait_for

2020-10-29 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Update: the bug is present in all supported Python versions bug sometimes may 
be hidden by race conditions.

--

___
Python tracker 
<https://bugs.python.org/issue42183>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42183] Stack overflow error with asyncio.all_tasks and wait_for

2020-10-29 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

I cannot reproduce on 3.9 but 3.8.6 crashes on `repr`:

  File 
"/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/asyncio/base_futures.py", 
line 31 in format_cb
  File 
"/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/asyncio/base_futures.py", 
line 34 in _format_callbacks
  File 
"/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/asyncio/base_futures.py", 
line 57 in _future_repr_info
  File 
"/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/asyncio/base_tasks.py", line 
9 in _task_repr_info
  File "/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/reprlib.py", line 139 
in repr_instance
  File "/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/reprlib.py", line 62 
in repr1
  File "/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/reprlib.py", line 71 
in 
  File "/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/reprlib.py", line 71 
in _repr_iterable
  File "/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/reprlib.py", line 93 
in repr_set
  File "/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/reprlib.py", line 60 
in repr1
  File "/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/reprlib.py", line 52 
in repr
  File 
"/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/asyncio/base_futures.py", 
line 54 in _future_repr_info
  File 
"/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/asyncio/base_tasks.py", line 
9 in _task_repr_info
  File "/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/reprlib.py", line 139 
in repr_instance
... the stack tail recursively repeats

--

___
Python tracker 
<https://bugs.python.org/issue42183>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41959] Doc/library/asyncio-policy.rst grammar error

2020-10-21 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue41959>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41959] Doc/library/asyncio-policy.rst grammar error

2020-10-21 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset c3442fd8a7f6e34ba888efea085c3701b75c0b71 by Miss Skeleton (bot) 
in branch '3.9':
bpo-41959: Fix grammar around class asyncio.MultiLoopChildWatcher text 
(GH-22580) (#22865)
https://github.com/python/cpython/commit/c3442fd8a7f6e34ba888efea085c3701b75c0b71


--
nosy: +asvetlov

___
Python tracker 
<https://bugs.python.org/issue41959>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41927] Why is there no documentation in Russian?

2020-10-04 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Python is a volunteer-driven project.
The documentation translation is provided by champions who does this hard work 
for free. 
You can join the team and maintain the Python Russian Translation :)

Sorry, to keep the discussion productive I should remind our community rules:
* Please keep calm and provide a polite attitude in conversations on this bug 
tracker.
* Otherwise, you must understand that the rude mood can be considered as the 
reason for the ban.

--
nosy: +asvetlov

___
Python tracker 
<https://bugs.python.org/issue41927>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33786] @asynccontextmanager doesn't work well with async generators

2020-08-14 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Thank you very much, Ned!

--

___
Python tracker 
<https://bugs.python.org/issue33786>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37703] Inconsistent gather with child exception

2020-07-20 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue37703>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41275] Clarify whether Futures can be awaited multiple times

2020-07-14 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

The allowance to wait for the future object multiple times is settled in stone. 
This cannot be changed without breaking very many codes.

So yes, asyncio guarantees that the feature is settled in stone. If set_value() 
/ set_exception() was called, the value/exception is returned (raised) on every 
following `await fut`.


Pull request for documentation with clarification of the status quo is welcome!

--

___
Python tracker 
<https://bugs.python.org/issue41275>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41242] When concating strings, I think it is better to use += than join the list

2020-07-08 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Remi is correct.
Closing the issue.

--

___
Python tracker 
<https://bugs.python.org/issue41242>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41242] When concating strings, I think it is better to use += than join the list

2020-07-08 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue41242>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41202] Allow to provide custom exception handler to asyncio.run()

2020-07-07 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

I agree with Yuri.

Usually, you don't need overriding of the default exception handler.
Indeed, if you really need this low-level API I see nothing wrong with 
`asyncio.get_running_loop()` call.

--

___
Python tracker 
<https://bugs.python.org/issue41202>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39148] DatagramProtocol + IPv6 does not work with ProactorEventLoop

2020-03-23 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Would somebody be a champion for the issue?

--

___
Python tracker 
<https://bugs.python.org/issue39148>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39764] PyAsyncGenObject causes task.get_stack() raising AttributeError

2020-03-02 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue39764>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   3   4   5   6   7   8   9   10   >