summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-11-23 09:10:36 (GMT)
committerChristian Heimes <christian@cheimes.de>2007-11-23 09:10:36 (GMT)
commit729ab15370c8e7781f4781428364d203eb9f6416 (patch)
treed6981e5fd67b2fe08acd84b7a8cd824a10bceb5f /Parser
parent2336111aef67cf9946a468b757bcebbfcad713de (diff)
downloadcpython-729ab15370c8e7781f4781428364d203eb9f6416.zip
cpython-729ab15370c8e7781f4781428364d203eb9f6416.tar.gz
cpython-729ab15370c8e7781f4781428364d203eb9f6416.tar.bz2
Applied patch #1754273 and #1754271 from Thomas Glee
The patches are adding deprecation warnings for back ticks and <>
Diffstat (limited to 'Parser')
-rw-r--r--Parser/tokenizer.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index 4883f46..432f94f 100644
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -16,6 +16,7 @@
#include "fileobject.h"
#include "codecs.h"
#include "abstract.h"
+#include "pydebug.h"
#endif /* PGEN */
extern char *PyOS_Readline(FILE *, FILE *, char *);
@@ -982,7 +983,15 @@ PyToken_TwoChars(int c1, int c2)
break;
case '<':
switch (c2) {
- case '>': return NOTEQUAL;
+ case '>':
+ {
+#ifndef PGEN
+ if (Py_Py3kWarningFlag)
+ PyErr_WarnEx(PyExc_DeprecationWarning,
+ "<> not supported in 3.x", 1);
+#endif
+ return NOTEQUAL;
+ }
case '=': return LESSEQUAL;
case '<': return LEFTSHIFT;
}