[Python-checkins] cpython (merge 3.3 -> default): Issue #17919: select.poll.poll() again works with poll.POLLNVAL on AIX.

serhiy.storchaka python-checkins at python.org
Fri Dec 13 11:12:10 CET 2013


http://hg.python.org/cpython/rev/e78743e03c8f
changeset:   87929:e78743e03c8f
parent:      87927:10378199e37b
parent:      87928:08c95dd68cfc
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Fri Dec 13 12:08:55 2013 +0200
summary:
  Issue #17919: select.poll.poll() again works with poll.POLLNVAL on AIX.

files:
  Lib/test/test_poll.py  |  4 ----
  Misc/NEWS              |  2 ++
  Modules/selectmodule.c |  5 ++---
  3 files changed, 4 insertions(+), 7 deletions(-)


diff --git a/Lib/test/test_poll.py b/Lib/test/test_poll.py
--- a/Lib/test/test_poll.py
+++ b/Lib/test/test_poll.py
@@ -163,10 +163,6 @@
 
         pollster = select.poll()
         # Issue 15989
-        self.assertRaises(OverflowError, pollster.register, 0,
-                          _testcapi.SHRT_MAX + 1)
-        self.assertRaises(OverflowError, pollster.register, 0,
-                          _testcapi.USHRT_MAX + 1)
         self.assertRaises(OverflowError, pollster.poll, _testcapi.INT_MAX + 1)
         self.assertRaises(OverflowError, pollster.poll, _testcapi.UINT_MAX + 1)
 
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -37,6 +37,8 @@
 Library
 -------
 
+- Issue #17919: select.poll.poll() again works with poll.POLLNVAL on AIX.
+
 - Issue #19063: if a Charset's body_encoding was set to None, the email
   package would generate a message claiming the Content-Transfer-Encoding
   was 7bit, and produce garbage output for the content.  This now works.
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -375,11 +375,10 @@
 poll_register(pollObject *self, PyObject *args)
 {
     PyObject *o, *key, *value;
-    int fd;
-    short events = POLLIN | POLLPRI | POLLOUT;
+    int fd, events = POLLIN | POLLPRI | POLLOUT;
     int err;
 
-    if (!PyArg_ParseTuple(args, "O|h:register", &o, &events)) {
+    if (!PyArg_ParseTuple(args, "O|i:register", &o, &events)) {
         return NULL;
     }
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list