Title: Enable AF_UNIX support in Windows
Type: enhancement Stage: patch review
Components: Windows Versions: Python 3.9
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Jeffrey.Kintscher, Ma Lin, Paul Monson, eric.smith, filips123, giampaolo.rodola, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: patch

Created on 2018-05-02 10:35 by filips123, last changed 2019-07-17 19:32 by Paul Monson.

Pull Requests
URL Status Linked Edit
PR 14823 open Paul Monson, 2019-07-17 19:32
Messages (5)
msg316067 - (view) Author: Filip Š (filips123) * Date: 2018-05-02 10:35
Unix socket (AF_UNIX) is now avalible in Windows 10 (April 2018 Update). Please add Python support for it.
More details about it on
msg347629 - (view) Author: Paul Monson (Paul Monson) * Date: 2019-07-10 18:06
I've been asked by my team to investigate what is required to enable AF_UNIX in Python.

Is anyone else actively investigating this?  I did a prelinary investigation and the impact on test in test_sockets was pretty simple.  

However there were 26 test failures in test_asyncio tests, with only the naive changes to all AF_UNIX to work with the socket class on Windows.  

The first failure I looked at was caused by ProactorEventLoop in not providing a windows-specific version of create_unix_server. This results in the code falling back to AbstractServer.create_unix_server which raises NotImplementedError.
msg347645 - (view) Author: Ma Lin (Ma Lin) * Date: 2019-07-11 00:21
Have you upgraded the building SDK that supports AF_UNIX?

And should remove AF_UNIX flag at runtime on systems older than Windows 10 1804, see issue32394.
msg347646 - (view) Author: Ma Lin (Ma Lin) * Date: 2019-07-11 00:43
It would be nice to investigate the habit of using AF_UNIX in Python code on GitHub:

If adding this flag will break a lot of code, due to lacking supports to datagram, maybe we should not add AF_UNIX at once, and waiting for full support to AF_UNIX.
msg348080 - (view) Author: Paul Monson (Paul Monson) * Date: 2019-07-17 19:18
I don't know if datagram support is coming to AF_UNIX on Windows.

The changes will only add the flag on Windows, and will enable stream sockets to use AF_UNIX on Windows.  In mind this isn't breaking datagram support.  It is true that it's a subset of what appears to be supported on Linux/Unix.
Date User Action Args
2019-07-17 19:32:21Paul Monsonsetkeywords: + patch
stage: patch review
pull_requests: + pull_request14617
2019-07-17 19:18:11Paul Monsonsetmessages: + msg348080
2019-07-11 00:43:38Ma Linsetmessages: + msg347646
2019-07-11 00:21:30Ma Linsetnosy: + Ma Lin
messages: + msg347645
2019-07-10 18:06:40Paul Monsonsetmessages: + msg347629
2019-07-10 14:22:44giampaolo.rodolasetnosy: + giampaolo.rodola
2019-07-03 21:12:19Jeffrey.Kintschersetnosy: + Jeffrey.Kintscher
2019-07-01 16:22:59steve.dowersettitle: AF_UNIX is now supported in Windows -> Enable AF_UNIX support in Windows
2019-06-24 23:25:24vstinnersetversions: + Python 3.9, - Python 3.8
2019-06-24 20:14:05Paul Monsonsetnosy: + Paul Monson
2018-05-02 11:17:49eric.smithsetnosy: + eric.smith

versions: + Python 3.8, - Python 3.7
2018-05-02 10:35:32filips123create