Andrew Svetlov added the comment:
The difference is that socket.close() is an instant call.
After socket.close() the socket is done.
But transport.close() doesn't close the transport instantly.
asyncio requires at least one loop iteration for calling
protocol.connection_lost() and a
Andrew Svetlov added the comment:
It's not about streams only.
The stream protocol can have such flag, sure.
But transport emits a warning like "unclosed transport ..."
Not sure if we have to drop this warning, it enforces writing good code that
controls all created reso
Change by Andrew Svetlov :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Andrew Svetlov added the comment:
Sorry, I'm not comfortable with such change just before the feature freeze.
The idea is maybe good but let's discuss and implement it later.
--
___
Python tracker
<https://bugs.python.o
Andrew Svetlov added the comment:
Guys, thank you for investigation.
If there is AIX "idiosyncrasy" -- please feel free to skip failed tests on AIX.
If you have access to AIX box it would be much easier for you. I can only look
at Python buildbo
Andrew Svetlov added the comment:
New changeset ed9f3562b637a59b9000abbceee5ae369d35444d by Andrew Svetlov
(Emmanuel Arias) in branch 'master':
bpo-37105: Add deprecated-remove information on stream doc (#13672)
https://github.com/python/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:
New changeset 13ed07998ad93dbdd94991ba0451b9b559f07972 by Andrew Svetlov in
branch 'master':
bpo-35621: Support running subprocesses in asyncio when loop is executed in
non-main thread (#13630)
https://github.com/python/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:
Fixed by #35621
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> asyncio.create_subprocess_exec() only works with main event loop
___
Python tracker
<https://
Andrew Svetlov added the comment:
Closing.
Brief:
1. Access to an internal buffer is not an option.
2. Pushing data back to stream after fetching is not an option too: it kills
almost any possible optimization and makes code overcomplicated. aiohttp used
to have "unread_data()"
Change by Andrew Svetlov :
--
pull_requests: +13625
pull_request: https://github.com/python/cpython/pull/13630
___
Python tracker
<https://bugs.python.org/issue33
Andrew Svetlov added the comment:
encoding was explicitly disabled by #36686
Now its usage generates ValueError.
asyncio stdio/stdout/stderr streams are bytes.
If you want to propose a patch that supports text streams -- please create
another issue for that.
--
nosy: +asvetlov
Andrew Svetlov added the comment:
#35621 fixes the problem for default ThreadedChildWatcher
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> asyncio.create_subprocess_exec() only works with mai
Change by Andrew Svetlov :
--
pull_requests: +13635
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/13754
___
Python tracker
<https://bugs.python.org/issu
Andrew Svetlov added the comment:
Thanks for the report!
The failure depends on tests order execution (maybe you use -jN flag?).
Before default child watcher was SafeChildWatcher, not it is
ThreaderChildWather.
The watcher is a global variable (a property of global event loop policy).
The
Change by Andrew Svetlov :
--
pull_requests: +13642
pull_request: https://github.com/python/cpython/pull/13754
___
Python tracker
<https://bugs.python.org/issue33
Andrew Svetlov added the comment:
Would you make a PR?
I guess to modify Stream.readuntil()
StreamReader is deprecated, I'm not sure if we should add new functionality to
this class.
--
___
Python tracker
<https://bugs.python.org/is
Andrew Svetlov added the comment:
Could you consider passing (async_func, args, kwargs) tuple instead
async_func(*args, **kwargs) coroutine?
Looks like it solves your problem and doesn't require asyncio changes
--
___
Python tracker
&
Andrew Svetlov added the comment:
Docs will be updated soon.
The change has landed a week ago, I had no time for docs update before 3.8
beta. Sorry for that.
The idea is: StreamReader and StreamWriter are merged into just Stream,
open_connection() is replaced with connect() etc
Andrew Svetlov added the comment:
Yes, Stream supports all StreamReader and StreamWriter methods
--
___
Python tracker
<https://bugs.python.org/issue37
Change by Andrew Svetlov :
--
pull_requests: +13674
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/13790
___
Python tracker
<https://bugs.python.org/issu
Andrew Svetlov added the comment:
I suspect that I've added this dangling thread by
https://github.com/python/cpython/blob/master/Lib/asyncio/unix_events.py#L1248-L1251
:(
--
nosy: +asvetlov
___
Python tracker
<https://bugs.python.org/is
Change by Andrew Svetlov :
--
nosy: -asvetlov
___
Python tracker
<https://bugs.python.org/issue33694>
___
___
Python-bugs-list mailing list
Unsubscribe:
Andrew Svetlov added the comment:
Working on PR
--
___
Python tracker
<https://bugs.python.org/issue37137>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Andrew Svetlov :
--
pull_requests: +13677
pull_request: https://github.com/python/cpython/pull/13792
___
Python tracker
<https://bugs.python.org/issue37
Andrew Svetlov added the comment:
We have two options:
1. Apply https://github.com/python/cpython/pull/13792 to wait for dangling
threads
2. Revert added watchers entirely
What do you prefer?
--
___
Python tracker
<https://bugs.python.
Change by Andrew Svetlov :
--
pull_requests: +13678
pull_request: https://github.com/python/cpython/pull/13793
___
Python tracker
<https://bugs.python.org/issue35
Andrew Svetlov added the comment:
Got you. https://github.com/python/cpython/pull/13793
--
___
Python tracker
<https://bugs.python.org/issue37137>
___
___
Pytho
Andrew Svetlov added the comment:
I'm curious if collections.__getattr__ suffers from the same problem?
asyncio uses basically the same technique for deprecating global names on
import.
--
___
Python tracker
<https://bugs.python.org/is
Andrew Svetlov added the comment:
I still think that this is a valuable change but we need to discuss public API.
In fact, in my job we used to override default executor and wait for its
shutdown with explicit waiting to make the system robust.
The problem is that loop.close() can "
Change by Andrew Svetlov :
--
resolution: fixed ->
status: closed -> open
___
Python tracker
<https://bugs.python.org/issue37142>
___
___
Python-bugs-list
Change by Andrew Svetlov :
--
keywords: +patch
pull_requests: +13689
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/13804
___
Python tracker
<https://bugs.python.org/issu
Andrew Svetlov added the comment:
Follow-up for https://github.com/python/cpython/pull/13790 is ready
--
___
Python tracker
<https://bugs.python.org/issue37
Andrew Svetlov added the comment:
I mean https://github.com/python/cpython/pull/13804
--
___
Python tracker
<https://bugs.python.org/issue37142>
___
___
Pytho
Andrew Svetlov added the comment:
Please keep it until new streams will be documented.
--
___
Python tracker
<https://bugs.python.org/issue36889>
___
___
Pytho
Andrew Svetlov added the comment:
I prefer postponing to think about it until all required 3.8 tasks are done :)
--
___
Python tracker
<https://bugs.python.org/issue34
Andrew Svetlov added the comment:
Thanks, Zackery!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Andrew Svetlov added the comment:
I believe the number still can be configurable but requires more work.
The idea is:
FD_* macroses should be replaced with custom fd_set manipulation functions.
on select.select() call we can calculate the number of the highest used socket
and use this number
Andrew Svetlov added the comment:
>From my understanding Steve is right.
--
___
Python tracker
<https://bugs.python.org/issue28708>
___
___
Python-bugs-lis
Change by Andrew Svetlov :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Andrew Svetlov :
--
versions: +Python 3.7
___
Python tracker
<https://bugs.python.org/issue35082>
___
___
Python-bugs-list mailing list
Unsubscribe:
Andrew Svetlov added the comment:
Global future objects (and global asyncio objects in general) don't work with
asyncio.run(). The lifecycle of these objects should be closer than loop but
asyncio.run() creates a loop during execution.
I think this is a good design, we have a pl
Change by Andrew Svetlov :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: -Python 2.7, Python 3.7
___
Python tracker
<https://bugs.python.or
Change by Andrew Svetlov :
--
versions: -Python 3.7
___
Python tracker
<https://bugs.python.org/issue37173>
___
___
Python-bugs-list mailing list
Unsubscribe:
Andrew Svetlov added the comment:
I think landing the fix to 3.8 only is just fine
--
nosy: +asvetlov
___
Python tracker
<https://bugs.python.org/issue37
Change by Andrew Svetlov :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Andrew Svetlov added the comment:
This is the expected behavior.
asyncio.ensure_future() returns not a future but a task for your case.
Task cancellation requires at least one context switch to finish the task.
P.S.
I suggest replacing `asyncio.ensure_future()` with `asyncio.create_task
Andrew Svetlov added the comment:
I don't follow what reliability guarantee are you requesting.
A cite from task.cancel() docstring:
> Request that this task cancel itself.
This arranges for a CancelledError to be thrown into the
wrapped coroutine on the next cycle
Andrew Svetlov added the comment:
Not sure what "idempotency fix" means in the context of Future objects.
Could you describe desired behavior or, even better, provide a pull request
that demonstrates your desire?
--
___
Python track
Andrew Svetlov added the comment:
If fd is a regular file it is not supported well by all select/poll/epoll.
Registration may succeed but the data is marked as "already ready for reading".
Not sure if we should do anything.
The situation may be changed after eventual providing async
Andrew Svetlov added the comment:
Agree, it would be fine.
So the behavior is not changed but the error text should be clear, right?
--
___
Python tracker
<https://bugs.python.org/issue37
Andrew Svetlov added the comment:
There is no chance to change the flag for 3.7.
But we can consider it for 3.8
Yuri, what do you think?
--
___
Python tracker
<https://bugs.python.org/issue37
Andrew Svetlov added the comment:
Just to clarify: what OpenSSL version is used?
--
___
Python tracker
<https://bugs.python.org/issue37226>
___
___
Python-bug
Andrew Svetlov added the comment:
That's what I afraid.
asyncio/sslproto.py fails on new OpenSSL at several places :(
--
___
Python tracker
<https://bugs.python.org/is
Change by Andrew Svetlov :
--
resolution: -> wont fix
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue34467>
___
___
Change by Andrew Svetlov :
--
keywords: +patch
pull_requests: +13838
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/13971
___
Python tracker
<https://bugs.python.org/issu
Change by Andrew Svetlov :
--
versions: +Python 3.9
___
Python tracker
<https://bugs.python.org/issue36607>
___
___
Python-bugs-list mailing list
Unsubscribe:
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: resolved ->
status: closed -> open
___
Python tracker
<https://bugs.python.org/issue36607>
___
___
Andrew Svetlov added the comment:
Thank you!
Yuri, you might be interested too
--
___
Python tracker
<https://bugs.python.org/issue37226>
___
___
Python-bug
Andrew Svetlov added the comment:
Lukasz, please don't rush.
Applied PR makes asyncio more stable, not worse.
I see the only way to make it perfect: get rid of weak refs entirely.
Otherwise there is always a chance to catch GC run and set element deletion on
iteration over the set.
New submission from Andrew Svetlov :
Subprocess starting can be a long blocking operation, see
https://github.com/python-trio/trio/issues/1109 for discussion
--
messages: 345472
nosy: asvetlov
priority: normal
severity: normal
status: open
title: spawn asyncio subprocesses in a thread
Change by Andrew Svetlov :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.9
___
Python tracker
<https://bugs.python.or
New submission from Andrew Svetlov :
My fault introduced in 3.7 in initial async sendfile implementation
--
components: asyncio
messages: 345571
nosy: asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: asyncio sendfile sends extra data in the last chunk in
Change by Andrew Svetlov :
--
keywords: +patch
pull_requests: +13933
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/14075
___
Python tracker
<https://bugs.python.org/issu
New submission from Andrew Svetlov :
We use thread pool executor for loop.sock_sendfile(), there is no reason to
call blocking code for loop.sendfile()
--
components: asyncio
messages: 345574
nosy: asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: Use
Change by Andrew Svetlov :
--
keywords: +patch
pull_requests: +13934
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/14076
___
Python tracker
<https://bugs.python.org/issu
Andrew Svetlov added the comment:
1. Task._fut_waiter is a private API, please avoid it
2. Task class is derived from Future, thus it HAS add_done_callback() method.
The other question is that from my experience if the application-level code
uses add_done_callback() the design is not perfect
Andrew Svetlov added the comment:
Maybe. Agree with your decision to close bpo-34520 as duplicate.
--
___
Python tracker
<https://bugs.python.org/issue37
Andrew Svetlov added the comment:
See bpo-32363
--
___
Python tracker
<https://bugs.python.org/issue37281>
___
___
Python-bugs-list mailing list
Unsubscribe:
Andrew Svetlov added the comment:
Welcome!
Thanks for the fix!
--
___
Python tracker
<https://bugs.python.org/issue37278>
___
___
Python-bugs-list mailin
Change by Andrew Svetlov :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue37202>
___
___
Python-bugs-list
Andrew Svetlov added the comment:
Duplicate of #35998
--
resolution: -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder: -> test_asyncio: test_start_tls_server_1() TimeoutError on Fedora
29
___
Python tra
Change by Andrew Svetlov :
--
keywords: +patch
pull_requests: +13939
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/14080
___
Python tracker
<https://bugs.python.org/issu
Andrew Svetlov added the comment:
Finally fixed
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Andrew Svetlov added the comment:
Thanks for the review, Victor!
I have had to fix it much earlier :(
--
___
Python tracker
<https://bugs.python.org/issue35
Change by Andrew Svetlov :
--
resolution: -> third party
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Andrew Svetlov added the comment:
New changeset ef2152354f03a165c5e3adb53e2276934fabd50a by Andrew Svetlov in
branch 'master':
bpo-37279: Fix asyncio sendfile support when extra data are sent in fallback
mode. (GH-14075)
https://github.com/python/cpyt
Change by Andrew Svetlov :
--
pull_requests: +13956
pull_request: https://github.com/python/cpython/pull/14102
___
Python tracker
<https://bugs.python.org/issue37
Change by Andrew Svetlov :
--
pull_requests: +13957
pull_request: https://github.com/python/cpython/pull/14103
___
Python tracker
<https://bugs.python.org/issue37
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:
New changeset e5d67f1e31381d28b24f6e1c0f8388d9bf0bfc5f by Andrew Svetlov in
branch '3.7':
[3.7] bpo-37279: Fix asyncio sendfile support when extra data are sent in
fallback mode. (GH-14075). (GH-14103)
https://github.com/python/cpyt
Andrew Svetlov added the comment:
Ooops. Looks like a real problem, not test-only :(
--
___
Python tracker
<https://bugs.python.org/issue35998>
___
___
Pytho
Andrew Svetlov added the comment:
The use case is weird.
I don't think we need to do something with the issue.
--
nosy: +gvanrossum
___
Python tracker
<https://bugs.python.org/is
Change by Andrew Svetlov :
--
nosy: -gvanrossum
___
Python tracker
<https://bugs.python.org/issue37294>
___
___
Python-bugs-list mailing list
Unsubscribe:
Andrew Svetlov added the comment:
>From my understanding yield inside __aiter__ is a forbidden construction. Even
>if parser allows it the statement doesn't make any sense.
I'm very interested to hear Yuri opinion.
--
___
Python
Andrew Svetlov added the comment:
The solution is called static analyzers and "type hints".
Mypy detects the absence of "await" pretty well.
In turn, CPython does the best in runtime mode for detecting not-awaited
awaitables when possible.
I think we should close the issu
Andrew Svetlov added the comment:
No idea what to do.
SSL support is obviously broken.
Current code is too complex to maintain.
Yuri has a full reimplementation of ssl_proto.py in uvloop.
It *seem* to work and can be backported.
I'm sick now, can be ready to work back in a day o
Andrew Svetlov added the comment:
I believe the issue is a duplicate for #37035 at least regarding traceback
logging.
It can be closed, OSError exceptions are not logged anymore.
--
___
Python tracker
<https://bugs.python.org/issue34
Change by Andrew Svetlov :
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> Don't log OSError exceptions in asyncio transports
___
Python tracker
<https://bugs.p
Andrew Svetlov added the comment:
> If a RuntimeWarning is warranted when a temporary variable is used, it's
> warranted when the value is used directly, without a temporary variable.
No, it's not. If "1/0" is present in never executed code block Python don
Andrew Svetlov added the comment:
Sounds like `.close()` is better name for described behavior.
--
___
Python tracker
<https://bugs.python.org/issue37
Andrew Svetlov added the comment:
Adding new constants like socket.IPPROTO_UDPLITE is fine.
The question is: why we need a new function?
There is no set_send_checksum_coverage() on C level IIRC
--
nosy: +asvetlov
___
Python tracker
<ht
Andrew Svetlov added the comment:
We have no setsockopt() shortcut helpers.
socket.setblocking() uses fcntl() internally.
--
___
Python tracker
<https://bugs.python.org/issue37
Andrew Svetlov added the comment:
Sorry.
Please drop helper methods but keep IPPROTO_UDPLITE, UDPLITE_SEND_CSCOV,
UDPLITE_RECV_CSCOV constants.
--
___
Python tracker
<https://bugs.python.org/issue37
Change by Andrew Svetlov :
--
versions: -Python 3.8
___
Python tracker
<https://bugs.python.org/issue37345>
___
___
Python-bugs-list mailing list
Unsubscribe:
Andrew Svetlov added the comment:
3.8 is in beta stage, public API is frozen
--
___
Python tracker
<https://bugs.python.org/issue37345>
___
___
Python-bug
Change by Andrew Svetlov :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
1101 - 1200 of 2519 matches
Mail list logo