summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-01-20 19:35:06 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-01-20 19:35:06 (GMT)
commitab0ac27d24076a2a09e3d8de97055a2fc978709f (patch)
treeb0d5a4be76eb6122b30ebbdd801c7f82bddec8b3 /Modules
parent679688e70d29fad62bb7a07e682ef6966c489445 (diff)
parent7e52705ee362001a8761461e9c4d49e3873568e0 (diff)
downloadcpython-ab0ac27d24076a2a09e3d8de97055a2fc978709f.zip
cpython-ab0ac27d24076a2a09e3d8de97055a2fc978709f.tar.gz
cpython-ab0ac27d24076a2a09e3d8de97055a2fc978709f.tar.bz2
Issue #20315: Removed support for backward compatibility with early 2.x versions.
Removed backward compatibility alias curses.window.nooutrefresh which should be removed in 2.3.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_cursesmodule.c2
-rw-r--r--Modules/_lsprof.c12
-rw-r--r--Modules/_tkinter.c14
-rw-r--r--Modules/gcmodule.c14
4 files changed, 0 insertions, 42 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index 9eaf09c..a1dc9eb 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -2087,8 +2087,6 @@ static PyMethodDef PyCursesWindow_Methods[] = {
{"nodelay", (PyCFunction)PyCursesWindow_nodelay, METH_VARARGS},
{"notimeout", (PyCFunction)PyCursesWindow_notimeout, METH_VARARGS},
{"noutrefresh", (PyCFunction)PyCursesWindow_NoOutRefresh, METH_VARARGS},
- /* Backward compatibility alias -- remove in Python 2.3 */
- {"nooutrefresh", (PyCFunction)PyCursesWindow_NoOutRefresh, METH_VARARGS},
{"overlay", (PyCFunction)PyCursesWindow_Overlay, METH_VARARGS},
{"overwrite", (PyCFunction)PyCursesWindow_Overwrite,
METH_VARARGS},
diff --git a/Modules/_lsprof.c b/Modules/_lsprof.c
index 8947889..0137d95 100644
--- a/Modules/_lsprof.c
+++ b/Modules/_lsprof.c
@@ -451,7 +451,6 @@ profiler_callback(PyObject *self, PyFrameObject *frame, int what,
PyTrace_RETURN event will be generated, so we don't need to
handle it. */
-#ifdef PyTrace_C_CALL /* not defined in Python <= 2.3 */
/* the Python function 'frame' is issuing a call to the built-in
function 'arg' */
case PyTrace_C_CALL:
@@ -473,7 +472,6 @@ profiler_callback(PyObject *self, PyFrameObject *frame, int what,
((PyCFunctionObject *)arg)->m_ml);
}
break;
-#endif
default:
break;
@@ -663,13 +661,7 @@ setBuiltins(ProfilerObject *pObj, int nvalue)
if (nvalue == 0)
pObj->flags &= ~POF_BUILTINS;
else if (nvalue > 0) {
-#ifndef PyTrace_C_CALL
- PyErr_SetString(PyExc_ValueError,
- "builtins=True requires Python >= 2.4");
- return -1;
-#else
pObj->flags |= POF_BUILTINS;
-#endif
}
return 0;
}
@@ -767,11 +759,7 @@ profiler_init(ProfilerObject *pObj, PyObject *args, PyObject *kw)
PyObject *timer = NULL;
double timeunit = 0.0;
int subcalls = 1;
-#ifdef PyTrace_C_CALL
int builtins = 1;
-#else
- int builtins = 0;
-#endif
static char *kwlist[] = {"timer", "timeunit",
"subcalls", "builtins", 0};
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index e022a7a..92dd94c 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -33,20 +33,6 @@ Copyright (C) 1994 Steen Lumholt.
#include <windows.h>
#endif
-/* Allow using this code in Python 2.[12] */
-#ifndef PyDoc_STRVAR
-#define PyDoc_STRVAR(name,str) static char name[] = str
-#endif
-
-#ifndef PyMODINIT_FUNC
-#define PyMODINIT_FUNC void
-#endif
-
-#ifndef PyBool_Check
-#define PyBool_Check(o) 0
-#define PyBool_FromLong PyLong_FromLong
-#endif
-
#define CHECK_SIZE(size, elemsize) \
((size_t)(size) <= Py_MAX((size_t)INT_MAX, UINT_MAX / (size_t)(elemsize)))
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
index d5fd9df..6281a7c 100644
--- a/Modules/gcmodule.c
+++ b/Modules/gcmodule.c
@@ -1693,13 +1693,6 @@ PyObject_GC_Track(void *op)
_PyObject_GC_TRACK(op);
}
-/* for binary compatibility with 2.2 */
-void
-_PyObject_GC_Track(PyObject *op)
-{
- PyObject_GC_Track(op);
-}
-
void
PyObject_GC_UnTrack(void *op)
{
@@ -1710,13 +1703,6 @@ PyObject_GC_UnTrack(void *op)
_PyObject_GC_UNTRACK(op);
}
-/* for binary compatibility with 2.2 */
-void
-_PyObject_GC_UnTrack(PyObject *op)
-{
- PyObject_GC_UnTrack(op);
-}
-
PyObject *
_PyObject_GC_Malloc(size_t basicsize)
{