Andrew Svetlov added the comment:
Agree with Caleb.
The more I think the more I doubt about the proposal.
Cancellation is for tasks, not for queues or locks.
When should I cancel a queue but cannot cancel a task?
--
___
Python tracker
<ht
Andrew Svetlov added the comment:
> Is it possible to implement add_reader/writer in ProactorEventLoop?
Sorry, no. There is no way IIUC.
Regarding a request for selecting event loop by a library.
1. You can call asyncio.set_event_loop_policy() already.
2. From my understanding, there is
Andrew Svetlov added the comment:
I doubt if we should split a proactor loop into two objects in two threads.
I see no strong objections but have a feeling that we'll get other problems in
this way. asyncio is just not designed for this mode.
The proposal looks like a very dirty hac
Andrew Svetlov added the comment:
I don't like to have not required parts like thread pool, time handlers, and
the exception handler executed in the auxiliary thread.
What's about an alternative proposal: embed into ProactorEventLoop not entire
SelectorEventLoop but selectors.Sele
Change by Andrew Svetlov :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Andrew Svetlov added the comment:
There is an interesting discussion:
https://stackoverflow.com/questions/14499593/can-the-infamous-error-netname-deleted-error-be-considered-an-error-at-all
"[WinError 64] The specified network name is no longer available" is raised on
pending
Change by Andrew Svetlov :
--
pull_requests: +14164
pull_request: https://github.com/python/cpython/pull/14344
___
Python tracker
<https://bugs.python.org/issue35
Andrew Svetlov added the comment:
New changeset 6793cce155f8875b10efd746cb0b34cb72263af7 by Andrew Svetlov
(Xtreak) in branch 'master':
bpo-36889: Document asyncio Stream and StreamServer (GH-14203)
https://github.com/python/cpython/commit/6793cce155f8875b10efd746cb0b34
Andrew Svetlov added the comment:
Thanks, Karthikeyan!
The only thing that needs to be documented is Stream class itself.
Would you finish this job, please?
--
___
Python tracker
<https://bugs.python.org/issue36
Andrew Svetlov added the comment:
I wonder why do you need it? What is your use case?
A code snippet can help a lot.
--
___
Python tracker
<https://bugs.python.org/issue37
Andrew Svetlov added the comment:
Yes, Stream doc should be a combination of StreamReader and StreamWriter with
small changes/additions.
StreamReader and StreamWriter should be kept in the doc.
Regarding docstrings: there is no strong requirement (we don't provide
docstrings for all as
Andrew Svetlov added the comment:
Sorry, I still have no idea what is the code for PerfTimer class.
--
___
Python tracker
<https://bugs.python.org/issue37
Andrew Svetlov added the comment:
Got you.
iscoroutinefunction() is not reliable: it detects async functions only but
fails if we have a regular function that returns awaitable object.
I think AsyncContextDecorator is needed here to explicitly point that you want
to wrap async function
Andrew Svetlov added the comment:
Adding a new state for "not running and not pending but something in between"
is useless, it can make .running() result a little more accurate but doesn't
improve the real functionality.
The easy "fix" is documentation updatin
Andrew Svetlov added the comment:
Use asyncio transports or streams.
sock_recv() is a low-level API with a very limited audience.
wrapped ssl socket provides a synchronous interface only.
Perhaps we should raise an exception if SSLSocket is passed into asyncio
functions
Andrew Svetlov added the comment:
I don't mind, sorry.
Feel free to make a pull request with the fix though.
--
___
Python tracker
<https://bugs.python.org/is
Andrew Svetlov added the comment:
Is it ok to have
File
"/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFDynamicViewFTI-6.0.1-py3.7.egg/Products/CMFDynamicViewFTI/browserdefault.py",
line 76 in __call__
so many times?
Looks very
Change by Andrew Svetlov :
--
pull_requests: +14211
pull_request: https://github.com/python/cpython/pull/14397
___
Python tracker
<https://bugs.python.org/issue36
Andrew Svetlov added the comment:
Yes, sure
--
nosy: +asvetlov
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Andrew Svetlov added the comment:
New changeset 0d671c04c39b52e44597491b893eb0b6c86b3d45 by Andrew Svetlov in
branch 'master':
bpo-35621: Support running subprocesses in asyncio when loop is executed in
non-main thread (GH-14344)
https://github.com/python/cpyt
Change by Andrew Svetlov :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.9 -Python 3.6, Python 3.7
___
Python tracker
<https://bugs.python.or
Andrew Svetlov added the comment:
New changeset c2cda638d63b98f5cf9a8ef13e15aace2b7e3f0b by Andrew Svetlov
(Zackery Spytz) in branch 'master':
bpo-37199: Fix test failures when IPv6 is unavailable or disabled (#14480)
https://github.com/python/cpyt
Andrew Svetlov added the comment:
Thanks!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8
___
Python tracker
<https://bugs.python.or
Andrew Svetlov added the comment:
Victor, backporting to 3.7 makes merge conflicts.
Do you think that I should backport manually?
--
___
Python tracker
<https://bugs.python.org/issue37
Andrew Svetlov added the comment:
Your code doesn't run the event loop, only creates it.
What do you expect?
--
___
Python tracker
<https://bugs.python.org/is
Andrew Svetlov added the comment:
It doesn't.
Loop is executed by asyncio.run() (recommended) or low-level
loop.run_until_complete() / loop.run_forever() calls.
Please note, this tracker is for working on Python itself, not for teaching
Python usage.
Please use other resources like f
Andrew Svetlov added the comment:
Thanks!
--
nosy: +asvetlov
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.or
Andrew Svetlov added the comment:
Good point.
For proactor event loop set_wakeup_fd() is used for Ctrl+C handling.
Skipping this call for non-main thread in proactor implementation makes sense.
--
assignee: -> asvetlov
___
Python tracker
<
Change by Andrew Svetlov :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.or
Andrew Svetlov added the comment:
Thanks for the report.
--
assignee: -> asvetlov
___
Python tracker
<https://bugs.python.org/issue37573>
___
___
Python-
Andrew Svetlov added the comment:
Hi. StreamReaderProtocol was leaked implementation detail, not a public
reusable class. The protocol has too many "gray zones" where its implementation
is not well defined or even wrong.
This situation prevents us from stream API improvements whi
Andrew Svetlov added the comment:
I still think that iscoroutinefunction should not be used for async/sync
decoration type autodetection.
A day ago stuck with a case when decorator used iscoroutinefunction() for
separation but returned a regular function wrapper that returns awaitable in
Andrew Svetlov added the comment:
The patch consists from two changes: replacing static vars with module state
and using slot based way for constructing classes.
The first change is obvious but I not sure if we need second transformation
Andrew Svetlov added the comment:
Yuri, it looks like a serious bug.
I expected `success_coro(5)` cancelling but see print out.
--
components: +Library (Lib)
stage: -> needs patch
versions: +Python 3.7
___
Python tracker
<https://bugs.pyth
Andrew Svetlov added the comment:
The only _DummyThread usage is `threading.current_thread()`:
> If the caller's thread of control was not created through the threading
> module, a dummy thread object with limited functionality is returned.
--
nosy
Andrew Svetlov added the comment:
Well, to satisfy everybody we need to:
1. Implement `isAlive` for dummy thread
2. Add a deprecation warning for both Thread.isAlive and _DummyThread.isAlive
3. Remove isAlive in future Python release (3.8 for the deprecation, 3.8+2 for
removal).
4
Andrew Svetlov added the comment:
The strange thing is these tests are passed on our build bots.
In logs I see only ConnectionResetError. Can it be related to your
configuration?
--
___
Python tracker
<https://bugs.python.org/issue35
Andrew Svetlov added the comment:
Maybe this is the reason.
asycio test suite uses these ssl contexts:
https://github.com/python/cpython/blob/master/Lib/test/test_asyncio/utils.py#L72-L92
Maybe bumping used protocol version will help to pass tests on your box.
Would you try it
Andrew Svetlov added the comment:
IIRC two copies exist from very early development times when asyncio was not a
part of Python stdlib.
--
___
Python tracker
<https://bugs.python.org/issue35
New submission from Andrew Svetlov :
We do it for selector based loops already, let's be consistent.
I think the feature should be backported to 3.7 too.
--
components: asyncio
messages: 330903
nosy: asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: E
Change by Andrew Svetlov :
--
assignee: -> asvetlov
___
Python tracker
<https://bugs.python.org/issue35380>
___
___
Python-bugs-list mailing list
Unsubscrib
Change by Andrew Svetlov :
--
keywords: +patch
pull_requests: +10103
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35380>
___
___
Py
New submission from Andrew Svetlov :
As discussed with Yuri on
https://github.com/python/cpython/pull/10867#discussion_r238395192
Candidate functions to move into the helper modules:
* _set_nodelay()
* _ipaddr_info()
* _set_reuseport()
--
components: asyncio
messages: 330973
nosy
Andrew Svetlov added the comment:
New changeset 3bc0ebab17bf5a2c29d2214743c82034f82e6573 by Andrew Svetlov in
branch 'master':
bpo-35380: Enable TCP_NODELAY for proactor event loop (#10867)
https://github.com/python/cpython/commit/3bc0ebab17bf5a2c29d2214743c820
Change by Andrew Svetlov :
--
pull_requests: +10111
___
Python tracker
<https://bugs.python.org/issue35380>
___
___
Python-bugs-list mailing list
Unsubscribe:
Andrew Svetlov added the comment:
New changeset fe91e9ba08a8854e2149398386702828fe3c0038 by Andrew Svetlov (Miss
Islington (bot)) in branch '3.7':
[3.7] bpo-35380: Enable TCP_NODELAY for proactor event loop (GH-10867)
(GH-10872)
https://github.com/python/cpyt
New submission from Andrew Svetlov :
Protocols have no members.
Adding empty slots doesn't harm any existing code but it allows to write proper
protocol implementation with slot-based class.
--
components: asyncio
messages: 330986
nosy: asvetlov, yselivanov
priority: normal
sev
Andrew Svetlov added the comment:
Would you create a PR with a fix?
--
nosy: +asvetlov
___
Python tracker
<https://bugs.python.org/issue35395>
___
___
Python-bug
Andrew Svetlov added the comment:
Sorry, you did already
--
___
Python tracker
<https://bugs.python.org/issue35395>
___
___
Python-bugs-list mailing list
Unsub
Andrew Svetlov added the comment:
Thanks Naglis
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.or
Change by Andrew Svetlov :
--
keywords: +patch
pull_requests: +10127
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35394>
___
___
Py
Andrew Svetlov added the comment:
New changeset bfb881849f588cd2046776fb431c3045781c8214 by Andrew Svetlov in
branch '3.6':
[3.6] bpo-35380: Enable TCP_NODELAY for proactor event loop (GH-10867).
(GH-10874)
https://github.com/python/cpython/commit/bfb881849f588cd2046776fb431c30
Change by Andrew Svetlov :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.6
___
Python tracker
<https://bugs.python.or
Andrew Svetlov added the comment:
Christian Heimes is right: it is a new feature, not a bug fix.
I regret too often when I cannot backport a brilliant patch to old Python
version but this is the price of API stability.
You can try to convince release managers (Benjamin and Ned, I've
Andrew Svetlov added the comment:
New changeset 5344501ad166c1380be452644a863a4679c4291b by Andrew Svetlov in
branch 'master':
bpo-35394: Add empty slots to abstract asyncio protocols (#10889)
https://github.com/python/cpython/commit/5344501ad166c1380be452644a863a
Andrew Svetlov added the comment:
The proposal sounds great!
Would you prepare a pull request for docs update?
--
nosy: +asvetlov
___
Python tracker
<https://bugs.python.org/issue35
Change by Andrew Svetlov :
--
components: +asyncio
nosy: +yselivanov
___
Python tracker
<https://bugs.python.org/issue35465>
___
___
Python-bugs-list mailin
Change by Andrew Svetlov :
--
versions: +Python 3.8 -Python 3.6
___
Python tracker
<https://bugs.python.org/issue31446>
___
___
Python-bugs-list mailin
Andrew Svetlov added the comment:
A task should have `await` inside to give to loop a chance to switch to another
task (or get canceled).
It is not an asyncio bug but a part of specified behavior.
Your code could be modified as
async def readdev(dev):
while True:
buf=os.read
Andrew Svetlov added the comment:
Sorry, the bug tracker is for working on Python bugs, not on bugs of your
programs written with Python.
The behavior of subprocesses running is tested intensively, scenarios like you
described works well.
I don't know sockfish protocol but highly l
Andrew Svetlov added the comment:
New changeset b912f9342e7a37d170ba659c13c959115c11545a by Andrew Svetlov
(Beomsoo Kim) in branch 'master':
bpo-35511: Trivial docs updates for profile and resource library modules.
(GH-11124)
https://github.com/python/cpyt
Change by Andrew Svetlov :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Andrew Svetlov :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Andrew Svetlov added the comment:
Hmm, I forgot kqueue usage details: it operated not only with int flags but
more complex structures.
Giampaolo, thanks for pointing on!
Please let me sleep on it.
--
___
Python tracker
<https://bugs.python.
Andrew Svetlov added the comment:
New changeset b5c8cfa1da17c6f3acac80a0afca7f7104fb9589 by Andrew Svetlov
(Vladimir Matveev) in branch 'master':
bpo-23057: add loop self socket as wakeup fd for signals (#11135)
https://github.com/python/cpyt
Change by Andrew Svetlov :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8 -Python 3.6, Python 3.7
___
Python tracker
<https://bugs.python.or
Change by Andrew Svetlov :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Andrew Svetlov added the comment:
You are correct.
Would you make a patch?
--
___
Python tracker
<https://bugs.python.org/issue35579>
___
___
Python-bugs-list m
Andrew Svetlov added the comment:
The value type is DWORD.
0x is a maximum allowed value for DWORD.
0 implies something like 8 for Intel i7.
I don't remember the reason (the value was present is very first proactor
implementation and never changed after it).
Maybe giving Wind
Andrew Svetlov added the comment:
Sure!
--
___
Python tracker
<https://bugs.python.org/issue35579>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Andrew Svetlov :
Construction enums by-value (e.g. http.HTTPStatus(200)) performs two dict
lookups:
if value in cls._value2member_map_:
return cls._value2member_map_[value]
Changing the code to just
return cls._value2member_map_[value]
with catching
Change by Andrew Svetlov :
--
keywords: +patch, patch
pull_requests: +10568, 10569
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Andrew Svetlov :
--
keywords: +patch
pull_requests: +10568
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35585>
___
___
Py
Andrew Svetlov added the comment:
Thanks for the report!
--
assignee: -> asvetlov
___
Python tracker
<https://bugs.python.org/issue35589>
___
___
Python-
Change by Andrew Svetlov :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Andrew Svetlov added the comment:
New changeset 705b5998035739b1794a862123d3dc6e339a14d0 by Andrew Svetlov (Miss
Islington (bot)) in branch '3.7':
Speed-up building enums by value, e.g. http.HTTPStatus(200) (GH-11318)
(GH-11324)
https://github.com/python/cpyt
Change by Andrew Svetlov :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Andrew Svetlov added the comment:
What Python version do you use?
--
___
Python tracker
<https://bugs.python.org/issue33350>
___
___
Python-bugs-list mailin
Andrew Svetlov added the comment:
Do you mean an environment modification?
1 test altered the execution environment:
test_asyncio
--
___
Python tracker
<https://bugs.python.org/issue35
Change by Andrew Svetlov :
--
keywords: +patch
pull_requests: +10823
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35589>
___
___
Py
Change by Andrew Svetlov :
--
keywords: +patch, patch
pull_requests: +10823, 10824
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Andrew Svetlov :
--
keywords: +patch, patch, patch
pull_requests: +10823, 10824, 10825
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Andrew Svetlov added the comment:
New changeset 67ba547cf001d6b975cf6900aaf2bd5508dc6a87 by Andrew Svetlov
(Vladimir Matveev) in branch 'master':
bpo-23057: Use 'raise' to emulate ctrl-c in proactor tests (#11274)
https://github.com/p
Andrew Svetlov added the comment:
The limitation is a consequence of how Linux works.
Unix has no cross-platform API for non-blocking waiting for child process
finish except handling SIGCHILD signal.
On the other hand signal handlers in Python should work in the main thread.
Your trick with
Change by Andrew Svetlov :
--
components: +Library (Lib)
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Andrew Svetlov added the comment:
>From my understanding the question is: replace 0x with 0 or 1?
I don't know much about IOCP, 0 sounds safer for me.
--
___
Python tracker
<https://bugs.python.org
Change by Andrew Svetlov :
--
keywords: +patch
pull_requests: +11251
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34148>
___
___
Py
Change by Andrew Svetlov :
--
keywords: +patch, patch, patch
pull_requests: +11251, 11252, 11253
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Andrew Svetlov :
--
keywords: +patch, patch
pull_requests: +11251, 11252
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
New submission from Andrew Svetlov :
Asyncio uses a pipe to wakeup event loop in cases of
1. Signal handlers (set_wakeup_fd)
2. Calling asyncio code from another thread
In both cases, it sends b'\0' to the pipe to wake up a loop.
If the pipe is full OSError is raised.
asyncio
Change by Andrew Svetlov :
--
components: +asyncio
nosy: +yselivanov
type: -> enhancement
versions: +Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.org/issu
Change by Andrew Svetlov :
--
keywords: +patch
pull_requests: +11254
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35749>
___
___
Py
Change by Andrew Svetlov :
--
keywords: +patch, patch
pull_requests: +11254, 11255
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Andrew Svetlov :
--
keywords: +patch, patch, patch
pull_requests: +11254, 11255, 11256
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Andrew Svetlov added the comment:
Victor, thanks for the message.
I forgot mentioned changes.
You are right, the issue is "theoretical", I didn't see problems with current
implementation.
The self-pipe buffer is pretty big, a chance to reach its limit is relatively
low.
But a
Change by Andrew Svetlov :
--
resolution: -> rejected
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Andrew Svetlov added the comment:
I think yes.
People will be notified about depreciation earlier, even after 3.8 release not
everybody switches to a new version fast.
For example, I still use 3.6 for my job now (but we are planning to switch to
3.7 in a month or two).
Adding
Andrew Svetlov added the comment:
Not sure. IMHO it is not a *notable* change worth to be mentioned in
https://docs.python.org/3/whatsnew/3.7.html#notable-changes-in-python-3-7-2
--
___
Python tracker
<https://bugs.python.org/issue35
Change by Andrew Svetlov :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.or
New submission from Andrew Svetlov :
We use `asyncio.run()` (well, a backported to python3.6 private copy) in our
application.
The problem is: when `asyncio.run(main_coro(args))` raises an exception it is
both raised to a caller and passed to `loop.call_exception_handler()` by
1201 - 1300 of 2519 matches
Mail list logo