Index: Objects/unicodeobject.c =================================================================== --- Objects/unicodeobject.c (revision 62567) +++ Objects/unicodeobject.c (working copy) @@ -3075,6 +3075,11 @@ (*s != 'u' && *s != 'U')) { continue; } + + if (PyErr_WarnPy3k("In 3.x raw strings, '\\U' and '\\u' escapes are " + "not treated specially.", 1) < 0) + goto onError; + p--; count = *s=='u' ? 4 : 8; s++; Index: Lib/test/test_py3kwarn.py =================================================================== --- Lib/test/test_py3kwarn.py (revision 62567) +++ Lib/test/test_py3kwarn.py (working copy) @@ -123,6 +123,13 @@ with catch_warning() as w: self.assertWarning(buffer('a'), w, expected) + def test_raw_unicode_escape(self): + expected = "In 3.x raw strings, '\U' and '\u' escapes are " \ + "not treated specially." + ur"\u1234" + with catch_warning() as w: + exec 'ur"\u1234"' + self.assertWarning(None, w, expected) def test_main(): run_unittest(TestPy3KWarnings)