Issue 18035: telnetlib incorrectly assumes that select.error has an errno attribute (original) (raw)

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/62235

classification

Title: telnetlib incorrectly assumes that select.error has an errno attribute
Type: behavior Stage: resolved
Components: Versions: Python 2.7

process

Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Thayu.R, gregory.p.smith, pconnell
Priority: normal Keywords: patch

Created on 2013-05-22 17:36 by gregory.p.smith, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 5044 merged Segev Finer,2017-12-29 13:19
Messages (4)
msg189828 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2013-05-22 17:36
In Python 2.7.3 through 2.7.5 the telnetlib select.poll based implementation assumes that select.error has an errno attribute when handling errors. it does not. select.error is not an EnvironmentError derived exception. http://hg.python.org/cpython/file/85c04fdaa404/Lib/telnetlib.py#l317 i haven't check 3.x yet.
msg189830 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2013-05-22 17:40
As this is only on the select.poll code path, a workaround for code that isn't going to hit select.select file descriptor limits is to set their telnetlib.Telnet instance _has_poll attribute to False before using it. my_telnet = telnetlib.Telnet(...) my_telnet._has_poll = False
msg189849 - (view) Author: Thayu R (Thayu.R) Date: 2013-05-23 05:50
Just to add: select.error was made an alias of OSError following PEP 3151 from 3.3 onwards. Up to 3.2, it was a pair containing the error code and the error string. http://docs.python.org/3.3/library/select.html?highlight=select.error#select.error
msg309193 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2017-12-29 20:44
New changeset 3ceaed0dce81fd881bbaf2dbdbe827d9681887da by Gregory P. Smith (Segev Finer) in branch '2.7': bpo-18035: telnetlib: select.error doesn't have an errno attribute (#5044) https://github.com/python/cpython/commit/3ceaed0dce81fd881bbaf2dbdbe827d9681887da
History
Date User Action Args
2022-04-11 14:57:45 admin set github: 62235
2017-12-29 20:46:05 gregory.p.smith set status: open -> closedtype: behaviorresolution: fixedstage: patch review -> resolved
2017-12-29 20:44:09 gregory.p.smith set messages: +
2017-12-29 13:19:30 Segev Finer set keywords: + patchstage: patch reviewpull_requests: + <pull%5Frequest4925>
2016-06-07 12:22:07 berker.peksag link issue27247 superseder
2013-05-25 09:27:36 pconnell set nosy: + pconnell
2013-05-23 05:50:23 Thayu.R set nosy: + Thayu.Rmessages: +
2013-05-22 17:40:49 gregory.p.smith set messages: +
2013-05-22 17:36:57 gregory.p.smith create