Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3ad2d70

Browse files
Issue #17919: select.poll.poll() again works with poll.POLLNVAL on AIX.
1 parent 258e4d3 commit 3ad2d70

3 files changed

Lines changed: 4 additions & 7 deletions

File tree

Lib/test/test_poll.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,6 @@ def test_poll3(self):
161161

162162
pollster = select.poll()
163163
# Issue 15989
164-
self.assertRaises(OverflowError, pollster.register, 0,
165-
_testcapi.SHRT_MAX + 1)
166-
self.assertRaises(OverflowError, pollster.register, 0,
167-
_testcapi.USHRT_MAX + 1)
168164
self.assertRaises(OverflowError, pollster.poll, _testcapi.INT_MAX + 1)
169165
self.assertRaises(OverflowError, pollster.poll, _testcapi.UINT_MAX + 1)
170166

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ Core and Builtins
2929
Library
3030
-------
3131

32+
- Issue #17919: select.poll.poll() again works with poll.POLLNVAL on AIX.
33+
3234
- Issue #19063: if a Charset's body_encoding was set to None, the email
3335
package would generate a message claiming the Content-Transfer-Encoding
3436
was 7bit, and produce garbage output for the content. This now works.

Modules/selectmodule.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,11 +380,10 @@ static PyObject *
380380
poll_register(pollObject *self, PyObject *args)
381381
{
382382
PyObject *o, *key, *value;
383-
int fd;
384-
short events = POLLIN | POLLPRI | POLLOUT;
383+
int fd, events = POLLIN | POLLPRI | POLLOUT;
385384
int err;
386385

387-
if (!PyArg_ParseTuple(args, "O|h:register", &o, &events)) {
386+
if (!PyArg_ParseTuple(args, "O|i:register", &o, &events)) {
388387
return NULL;
389388
}
390389

0 commit comments

Comments
 (0)