Slightly revised version of patch #1538956:

Replace UnicodeDecodeErrors raised during == and !=
compares of Unicode and other objects with a new
UnicodeWarning.

All other comparisons continue to raise exceptions.
Exceptions other than UnicodeDecodeErrors are also left
untouched.
diff --git a/Doc/lib/libexcs.tex b/Doc/lib/libexcs.tex
index bef8bf1..6d2a3c5 100644
--- a/Doc/lib/libexcs.tex
+++ b/Doc/lib/libexcs.tex
@@ -456,6 +456,11 @@
 \versionadded{2.5}
 \end{excdesc}
 
+\begin{excdesc}{UnicodeWarning}
+Base class for warnings related to Unicode.
+\versionadded{2.5}
+\end{excdesc}
+
 The class hierarchy for built-in exceptions is:
 
 \verbatiminput{../../Lib/test/exception_hierarchy.txt}
diff --git a/Doc/lib/libwarnings.tex b/Doc/lib/libwarnings.tex
index 08c0340..a37a9f5 100644
--- a/Doc/lib/libwarnings.tex
+++ b/Doc/lib/libwarnings.tex
@@ -76,6 +76,9 @@
 
 \lineii{ImportWarning}{Base category for warnings triggered during the
 process of importing a module (ignored by default).}
+
+\lineii{UnicodeWarning}{Base category for warnings related to Unicode.}
+
 \end{tableii}
 
 While these are technically built-in exceptions, they are documented