Paul Martin added the comment:
The difference between the two is the difference between your local time and
utc.
datetime.now(timezone.utc)
This returns the current time in utc and is timezone aware. So the timestamp
can figure out the seconds since epoch taking into account the timezone
New submission from Paul Martin :
According to the docs:
"
There are several ways to enable asyncio debug mode.
Setting the PYTHONASYNCIODEBUG environment variable to 1.
Using the -X dev Python command line option.
Passing debug=True to asyncio.run().
Calling loop.set_debug().
Paul Martin added the comment:
Good points. I made a mistake in run
Should be:
async def run(self, func, *args, **kwargs):
call = functools.partial(func, *args, **kwargs)
return await self._loop.run_in_executor(self._executor, call)
Also in this case run awaits and
Paul Martin added the comment:
Run method should be:
async def run(self, func, *args, **kwargs):
call = functools.partial(func, *args, **kwargs)
return await self._loop.run_in_executor(None, call)
--
___
Python tracker
<ht
Paul Martin added the comment:
I don't think changing the default executor is a good approach. What happens,
if two or more thread pools are running at the same time? In that case they
will use the same default executor anyway, so creating a new executor each time
seems like a
Change by Paul Martin :
--
pull_requests: +16408
pull_request: https://github.com/python/cpython/pull/16863
___
Python tracker
<https://bugs.python.org/issue38
Change by Paul Martin :
--
keywords: +patch
pull_requests: +16341
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/16779
___
Python tracker
<https://bugs.python.org/issu
Change by Paul Martin :
--
versions: +Python 3.9
___
Python tracker
<https://bugs.python.org/issue38471>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Paul Martin :
Expected behaviour for DatagramTransport (from_SelectorDatagramTransport):
transport.close() called.
If there is data in the write buffer, don't call connection_lost.
When all data is written and the buffer is empty, check if connection has been
lost a
Paul Martin added the comment:
Should singledispatchmethod and cached_property be added?
--
nosy: +primal
___
Python tracker
<https://bugs.python.org/issue37
Paul Martin added the comment:
run_in_executor doesn't necessarily create a new thread each time so
create_thread would be misleading. run_in_thread might be better.
--
nosy: +primal
___
Python tracker
<https://bugs.python.org/is
New submission from Paul Martin :
I found these two methods in the windows_events code for asyncio. Is there a
reason why they don't seem to be documented, and are not included in
AbstractServer? They provide a good Windows alternative to create_unix_server &
create_unix_connection
12 matches
Mail list logo