[issue21599] Argument transport in attach and detach method in Server class in base_events file is not used
Vajrasky Kok
report at bugs.python.org
Thu May 29 05:16:17 CEST 2014
New submission from Vajrasky Kok:
In Lib/asyncio/base_events.py, we have these lines of code:
-----------------------------------------------------------
def attach(self, transport):
assert self.sockets is not None
self.active_count += 1
def detach(self, transport):
assert self.active_count > 0
self.active_count -= 1
if self.active_count == 0 and self.sockets is None:
self._wakeup()
------------------------------------------------------------
The transport is not used. We can remove them. Here is the patch to remove the arguments.
If for higher philosophical reason, we need this unused argument, maybe we can comment it.
----------
components: Library (Lib)
files: remove_transport_in_base_events.patch
keywords: patch
messages: 219328
nosy: haypo, vajrasky
priority: normal
severity: normal
status: open
title: Argument transport in attach and detach method in Server class in base_events file is not used
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file35396/remove_transport_in_base_events.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21599>
_______________________________________
More information about the Python-bugs-list
mailing list