Author Ma Lin
Recipients Ma Lin, asvetlov, inada.naoki, ned.deily, njs, paul.moore, skn78, steve.dower, thatiparthy, tim.golden, tjguk, zach.ware
Date 2018-02-08.00:38:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1518050311.08.0.467229070634.issue32394@psf.upfronthosting.co.za>
In-reply-to
Content
Here is PR 5585 for 3.6 branch.

For 3.7+, I would suggest patch in socketmodule.c like this:

PyMODINIT_FUNC
PyInit__socket(void)
{
    PyObject *m, *has_ipv6;
    ...
    ...
    ...
+#ifdef MS_WINDOWS
+   return remove_unusable_flags(m);
+#else
    return m;
+#endif
}

In this way, we handle the flags in a separated function remove_unusable_flags(m).
It keeps both socket.py and socketmodule.c neat.

Timelines FYI:

3.6.5 candidate: 2018-03-12 (tenative)
3.6.5 final: 2018-03-26 (tentative)

3.7.0 beta 2: 2018-02-26
3.7.0 beta 3: 2018-03-26
3.7.0 beta 4: 2018-04-30

> What's about other OS/flags?
> Should we commit that every exposed socket flag is supported in runtime?
> It looks like very heavy burden.

I have an idea about this concern, I will post it after some experiments.
History
Date User Action Args
2018-02-08 00:38:31Ma Linsetrecipients: + Ma Lin, paul.moore, tim.golden, ned.deily, njs, asvetlov, inada.naoki, zach.ware, steve.dower, thatiparthy, tjguk, skn78
2018-02-08 00:38:31Ma Linsetmessageid: <1518050311.08.0.467229070634.issue32394@psf.upfronthosting.co.za>
2018-02-08 00:38:31Ma Linlinkissue32394 messages
2018-02-08 00:38:30Ma Lincreate