Issue #18473: Fixed pickle compatibility tests for optional modules.
Added WindowsError to compatibility mappings.
diff --git a/Lib/_compat_pickle.py b/Lib/_compat_pickle.py
index b1f15a7..6e39d4a 100644
--- a/Lib/_compat_pickle.py
+++ b/Lib/_compat_pickle.py
@@ -141,6 +141,13 @@
     "ZeroDivisionError",
 )
 
+try:
+    WindowsError
+except NameError:
+    pass
+else:
+    PYTHON2_EXCEPTIONS += ("WindowsError",)
+
 for excname in PYTHON2_EXCEPTIONS:
     NAME_MAPPING[("exceptions", excname)] = ("builtins", excname)