Issue #14482: Raise a ValueError, not a NameError, when trying to create
a multiprocessing Client or Listener with an AF_UNIX type address under
Windows.  Patch by Popa Claudiu.
diff --git a/Lib/multiprocessing/connection.py b/Lib/multiprocessing/connection.py
index 954e901..4e45443 100644
--- a/Lib/multiprocessing/connection.py
+++ b/Lib/multiprocessing/connection.py
@@ -111,6 +111,10 @@
     if sys.platform != 'win32' and family == 'AF_PIPE':
         raise ValueError('Family %s is not recognized.' % family)
 
+    if sys.platform == 'win32' and family == 'AF_UNIX':
+        # double check
+        if not hasattr(socket, family):
+            raise ValueError('Family %s is not recognized.' % family)
 
 def address_type(address):
     '''
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py
index b4f511c..2bcdb4e 100644
--- a/Lib/test/test_multiprocessing.py
+++ b/Lib/test/test_multiprocessing.py
@@ -2649,6 +2649,10 @@
         with self.assertRaises(ValueError):
             multiprocessing.connection.Listener(r'\\.\test')
 
+    @unittest.skipUnless(WIN32, "skipped on non-Windows platforms")
+    def test_invalid_family_win32(self):
+        with self.assertRaises(ValueError):
+            multiprocessing.connection.Listener('/var/test.pipe')
 
 testcases_other = [OtherTest, TestInvalidHandle, TestInitializers,
                    TestStdinBadfiledescriptor, TestWait, TestInvalidFamily]
diff --git a/Misc/NEWS b/Misc/NEWS
index e064b3a..0c3438a 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -19,6 +19,10 @@
 Library
 -------
 
+- Issue #14482: Raise a ValueError, not a NameError, when trying to create
+  a multiprocessing Client or Listener with an AF_UNIX type address under
+  Windows.  Patch by Popa Claudiu.
+
 - Issue #802310: Generate always unique tkinter font names if not directly passed.
 
 - Issue #14151: Raise a ValueError, not a NameError, when trying to create