raise a SyntaxError in detect_encoding() when a codec lookup fails like the builtin parser #4021
diff --git a/Misc/NEWS b/Misc/NEWS
index 10a0745..6568a1c 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -45,6 +45,9 @@
 Library
 -------
 
+- Issue #4021: tokenize.detect_encoding() now raises a SyntaxError when the
+  codec cannot be found.  This is for compatibility with the builtin behavior.
+
 - Issue #4084: Fix max, min, max_mag and min_mag Decimal methods to
   give correct results in the case where one argument is a quiet NaN
   and the other is a finite number that requires rounding.