This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: select.error has no errno attribute
Type: Stage:
Components: Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: nadeem.vawda, pitrou, python-dev, skrah, vstinner
Priority: normal Keywords: patch

Created on 2011-06-19 20:22 by vstinner, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
select_errno.patch vstinner, 2011-06-20 11:02 review
Messages (11)
msg138659 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2011-06-19 20:22
It would be nice to have a errno attribute for select.error. I don't know if select.errno should inherit from OSError, WindowsError or nothing.

See also the PEP 3151:
http://www.python.org/dev/peps/pep-3151/#common-errnos-with-select-error
msg138698 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2011-06-20 11:02
select_errno.patch: select.error now inherits from OSError and so have an errno attribute. I only ran the unit test on Linux, it should be tested on Windows.
msg138700 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-06-20 11:30
You can't do this outside of a PEP (see PEP 3151).
msg145420 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-10-12 19:01
New changeset 8bbfb24d4824 by Victor Stinner in branch 'default':
Issue #12367: Add a test on error attribute of select.error
http://hg.python.org/cpython/rev/8bbfb24d4824
msg145736 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2011-10-17 17:27
test_errno fails quite often on FreeBSD:

======================================================================
FAIL: test_errno (test.test_select.SelectTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/test/test_select.py", line 35, in test_errno
    self.fail("exception not raised")
AssertionError: exception not raised

----------------------------------------------------------------------
Ran 4 tests in 11.132s
msg145740 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2011-10-17 17:39
Hmm, maybe this is a FreeBSD bug:

http://osdir.com/ml/freebsd-bugs/2011-03/msg00201.html
msg145744 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-10-17 17:54
New changeset f6b8e4226260 by Victor Stinner in branch 'default':
Issue #12367: Test test_select.test_errno() on FreeBSD
http://hg.python.org/cpython/rev/f6b8e4226260
msg145745 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2011-10-17 18:13
I'm not sure it's exactly the same FreeBSD bug as in kern/155606,
since I can also reproduce the test_errno failure --without-threads.

Seems good to skip the test though.
msg145933 - (view) Author: Nadeem Vawda (nadeem.vawda) * (Python committer) Date: 2011-10-19 18:29
The AMD64 FreeBSD 8.2 3.x buildbot has been experiencing sporadic
lockups since changeset 8bbfb24d4824 was committed:

    http://www.python.org/dev/buildbot/all/builders/AMD64%20FreeBSD%208.2%203.x/builds/1174/steps/test/logs/stdio
    http://www.python.org/dev/buildbot/all/builders/AMD64%20FreeBSD%208.2%203.x/builds/1180/steps/test/logs/stdio
    http://www.python.org/dev/buildbot/all/builders/AMD64%20FreeBSD%208.2%203.x/builds/1185/steps/test/logs/stdio
    http://www.python.org/dev/buildbot/all/builders/AMD64%20FreeBSD%208.2%203.x/builds/1190/steps/test/logs/stdio

The tracebacks say that the lockups are happening in test_errno,
which is weird because the test is supposed to be skipped on
FreeBSD. Is it possible that sys.platform is returning something
that doesn't start with "freebsd" on this buildbot?
msg145934 - (view) Author: Nadeem Vawda (nadeem.vawda) * (Python committer) Date: 2011-10-19 18:34
Sorry, please disregard my last message - I confused the commit times for
8bbfb24d4824 and f6b8e4226260. There haven't been any further lockups
since f6b8e4226260 was committed.
msg145935 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2011-10-19 18:34
> The tracebacks say that the lockups are happening in test_errno

The test was added by f6b8e4226260 the 17th october, the last lockup occurred the 16th (19:08:15).

Before, I added a workaround to see the failure but avoid the lockup: 60fecfbea397 (Oct 16 20:48:52, just after the last failure).
History
Date User Action Args
2022-04-11 14:57:18adminsetgithub: 56576
2011-10-19 18:34:16vstinnersetmessages: + msg145935
2011-10-19 18:34:05nadeem.vawdasetmessages: + msg145934
2011-10-19 18:29:11nadeem.vawdasetnosy: + nadeem.vawda
messages: + msg145933
2011-10-17 18:45:48vstinnersetstatus: open -> closed
resolution: rejected -> fixed
2011-10-17 18:13:09skrahsetmessages: + msg145745
2011-10-17 17:54:44python-devsetmessages: + msg145744
2011-10-17 17:39:38skrahsetmessages: + msg145740
2011-10-17 17:27:37skrahsetstatus: closed -> open
nosy: + skrah
messages: + msg145736

2011-10-12 19:01:03python-devsetnosy: + python-dev
messages: + msg145420
2011-06-20 11:30:10pitrousetstatus: open -> closed
resolution: rejected
messages: + msg138700
2011-06-20 11:02:45vstinnersetfiles: + select_errno.patch
keywords: + patch
messages: + msg138698
2011-06-19 20:22:18vstinnercreate