← 输入框|bugs.python.org|刷新

➜

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.

作者 vstinner
收信人 Alex.Willmer, Roman.Evstifeev, giampaolo.rodola, gvanrossum, vstinner, xdegaye, yan12125, yselivanov
日期 2017-01-13.15:20:55
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1484320855.32.0.30161851318.issue26858@psf.upfronthosting.co.za>
In-reply-to
内容
> The reason why the changes made by issue 28174 fix only partly the problem should be understood.

The change c1c247cf3488 catchs OSError on sock.setsockopt() in asyncio/base_events.py, whereas the test fails while calling sock.getsockopt() in test_asyncio/tets_events.py. Extract of the test:

    def test_create_server_reuse_port(self):
        proto = MyProto(self.loop)
        f = self.loop.create_server(
            lambda: proto, '0.0.0.0', 0)
        server = self.loop.run_until_complete(f)
        self.assertEqual(len(server.sockets), 1)
        sock = server.sockets[0]
        self.assertFalse(
            sock.getsockopt(
                socket.SOL_SOCKET, socket.SO_REUSEPORT))
        server.close()

The change c1c247cf3488 doesn't touch the code of this unit test.

test_base_events.py also calls directly sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT).
历史
日期 用户 动作 参数
2017-01-13 15:20:55vstinner修改recipients: + vstinner, gvanrossum, giampaolo.rodola, xdegaye, Roman.Evstifeev, yselivanov, Alex.Willmer, yan12125
2017-01-13 15:20:55vstinner修改messageid: <1484320855.32.0.30161851318.issue26858@psf.upfronthosting.co.za>
2017-01-13 15:20:55vstinner链接issue26858 messages
2017-01-13 15:20:55vstinner创建