[issue27634] selectors.SelectSelectors fails if select.select was patched

2016-07-27 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the patch, Przemyslaw, but I'm going to close this. -- resolution: -> rejected status: open -> closed ___ Python tracker ___ _

[issue27634] selectors.SelectSelectors fails if select.select was patched

2016-07-27 Thread Brett Cannon
Brett Cannon added the comment: I agree with Victor: monkeypatching is the wrong way to deal with this. Since SelectSelector is a class you are better off exposing something in the constructor or some method that can be overridden if this kind of flexibility is really necessary. -- no

[issue27634] selectors.SelectSelectors fails if select.select was patched

2016-07-27 Thread STINNER Victor
STINNER Victor added the comment: Monkey-patching is a bad programming practice. I don't think that Python should promote this... *But* selectors.diff LGTM. I will wait one or two weeks to let others review the patch and give their opinion. -- nosy: +haypo __

[issue27634] selectors.SelectSelectors fails if select.select was patched

2016-07-27 Thread Przemyslaw Wegrzyn
Przemyslaw Wegrzyn added the comment: Possible workaround in the patch attached. -- keywords: +patch Added file: http://bugs.python.org/file43910/selectors.diff ___ Python tracker __

[issue27634] selectors.SelectSelectors fails if select.select was patched

2016-07-27 Thread Przemyslaw Wegrzyn
New submission from Przemyslaw Wegrzyn: The SelectSelector makes a local copy of select.select() built-in and calls it via self._select later on. It no longer works if select.select() built-in is replaced with function (something gevent's monkey patching does). Currently gevent employs a worka