[issue32394] socket lib beahavior change in 3.6.4

Ma Lin report at bugs.python.org
Wed Feb 7 19:38:31 EST 2018


Ma Lin <malincns at 163.com> added the comment:

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.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32394>
_______________________________________


More information about the Python-bugs-list mailing list