[issue37817] create_pipe_connection and start_serving_pipe not documented

2019-08-10 Thread Paul Martin
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 for i

[issue38306] High level API for loop.run_in_executor(None, ...)?

2019-09-28 Thread Paul Martin
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/issue38

[issue32309] Implement asyncio.run_in_executor shortcut

2019-11-01 Thread Paul Martin
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 waste

[issue32309] Implement asyncio.run_in_executor shortcut

2019-11-01 Thread Paul Martin
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

[issue32309] Implement asyncio.run_in_executor shortcut

2019-11-01 Thread Paul Martin
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

[issue38471] _ProactorDatagramTransport: If close() is called when write buffer is not empty, the remaining data is not sent and connection_lost is not called

2019-10-20 Thread Paul Martin
Change by Paul Martin : -- pull_requests: +16408 pull_request: https://github.com/python/cpython/pull/16863 ___ Python tracker <https://bugs.python.org/issue38

[issue38471] _ProactorDatagramTransport: If close() is called when write buffer is not empty, the remaining data is not sent and connection_lost is not called

2019-10-14 Thread Paul Martin
Change by Paul Martin : -- versions: +Python 3.9 ___ Python tracker <https://bugs.python.org/issue38471> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38471] _ProactorDatagramTransport: If close() is called when write buffer is not empty, the remaining data is not sent and connection_lost is not called

2019-10-14 Thread Paul Martin
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

[issue37759] Polish whatsnew for 3.8

2019-10-14 Thread Paul Martin
Paul Martin added the comment: Should singledispatchmethod and cached_property be added? -- nosy: +primal ___ Python tracker <https://bugs.python.org/issue37

[issue38471] _ProactorDatagramTransport: If close() is called when write buffer is not empty, the remaining data is not sent and connection_lost is not called

2019-10-14 Thread Paul Martin
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

[issue40454] DEBUG kw to asyncio.run overrides DEBUG mode set elsewhere

2020-04-30 Thread Paul Martin
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().

[issue44663] Possible bug in datetime utc

2021-07-18 Thread Paul Martin
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