Ma Lin <malin...@163.com> added the comment:

The current AF_UNIX address family of Windows10 doesn't support datagram, 
adding this flag may break some cross-platform code:

https://github.com/osbuild/osbuild/blob/9371eb9eaa3d0a7cab876eb4c7b70f519dfbd915/osbuild/__init__.py#L253
https://github.com/watsona4/dot_julia2/blob/5b7632b8089be01af706d8152555e711e0a81f06/conda/3/pkgs/python-3.7.3-h0371630_0/lib/python3.7/logging/handlers.py#L676
https://github.com/bognikol/Eleusis/blob/828672492b9cdb3444ddf466c0ac3055572277f7/Dependencies/02_macOS/40_gtk%2B/x64/lib/python2.7/test/test_socketserver.py#L177
https://github.com/sarnautov/python3/blob/005d75d8ac2b11a06707ce0184021a727d6fe844/lib/python3.6/test/test_asyncio/test_unix_events.py#L311
https://github.com/yanlianglai/ssr_python_leeblog/blob/8113fe3f32a250cc52e0cddad9761692dd840967/shadowsocks/manager.py#L60
...

So I'm -1 on adding AF_UNIX personally.

I thought a compromise proposal:
- if (building SDK >= 1804 and run-time Windows >= 1804), add a undocumented 
flag _WIN_AF_UNIX, its value is equal to AF_UNIX.
- only use _WIN_AF_UNIX in stdlib, this is a black-box optimization.
- if someone really need high performance, he/she can uses this undocumented 
flag privately.

If one day Windows support full AF_UNIX, we can remove _WIN_AF_UNIX and add 
standard AF_UNIX.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33408>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to