Skip to content
Myr

Trash debugsupport.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Cory Benfield · committed by Cory Benfield · parent 460251c · Browse files · 4 files+7 added−122 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+7 added−122 removed

  • other:+7 added−122 removed

4 files+7 added−122 removed

modified:docs/intro.rst-24 removed
12 unmodified lines
13-------------1415Jinja2 works with Python 2.6.x, 2.7.x and >= 3.3.1617FIXME - this is outdated, code should get removed, docs fixed:18Additionally a working C-compiler that can create python extensions should be19installed for the debugger if you are using Python 2.4.2021If you don't have a working C-compiler and you are trying to install the source22release with the debugsupport you will get a compiler error.2324.. _ctypes: http://python.net/crew/theller/ctypes/252617Installation18------------1920You have multiple ways to install Jinja2. If you are unsure what to do, go
62 unmodified lines
8384.. _MarkupSafe: http://pypi.python.org/pypi/MarkupSafe858697Enable the debug support Module98~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~99100By default Jinja2 will not compile the debug support module. Enabling this101will fail if you don't have the Python headers or a working compiler. This102is often the case if you are installing Jinja2 from a windows machine.103104FIXME - outdated:105Because the debug support is only necessary for Python 2.4 you will not106have to do this unless you run 2.4::107108 sudo python setup.py --with-debugsupport install10911087Basic API Usage88---------------8990This section gives you a brief introduction to the Python API for Jinja2
37 unmodified lines
deleted:jinja2/_debugsupport.c-78 removed
1/**2 * jinja2._debugsupport3 * ~~~~~~~~~~~~~~~~~~~~4 *5 * C implementation of `tb_set_next`.6 *7 * :copyright: (c) 2010 by the Jinja Team.8 * :license: BSD.9 */1011#include <Python.h>121314static PyObject*15tb_set_next(PyObject *self, PyObject *args)16{17 PyTracebackObject *tb, *old;18 PyObject *next;1920 if (!PyArg_ParseTuple(args, "O!O:tb_set_next", &PyTraceBack_Type, &tb, &next))21 return NULL;22 if (next == Py_None)23 next = NULL;24 else if (!PyTraceBack_Check(next)) {25 PyErr_SetString(PyExc_TypeError,26 "tb_set_next arg 2 must be traceback or None");27 return NULL;28 }29 else30 Py_INCREF(next);3132 old = tb->tb_next;33 tb->tb_next = (PyTracebackObject*)next;34 Py_XDECREF(old);3536 Py_INCREF(Py_None);37 return Py_None;38}3940static PyMethodDef module_methods[] = {41 {"tb_set_next", (PyCFunction)tb_set_next, METH_VARARGS,42 "Set the tb_next member of a traceback object."},43 {NULL, NULL, 0, NULL} /* Sentinel */44};454647#if PY_MAJOR_VERSION < 34849#ifndef PyMODINIT_FUNC /* declarations for DLL import/export */50#define PyMODINIT_FUNC void51#endif52PyMODINIT_FUNC53init_debugsupport(void)54{55 Py_InitModule3("jinja2._debugsupport", module_methods, "");56}5758#else /* Python 3.x module initialization */5960static struct PyModuleDef module_definition = {61 PyModuleDef_HEAD_INIT,62 "jinja2._debugsupport",63 NULL,64 -1,65 module_methods,66 NULL,67 NULL,68 NULL,69 NULL70};7172PyMODINIT_FUNC73PyInit__debugsupport(void)74{75 return PyModule_Create(&module_definition);76}7778#endif
modified:jinja2/debug.py+3 added-6 removed
329 unmodified lines
330# proxies.331tb_set_next = None332if tproxy is None:333 try:334 from jinja2._debugsupport import tb_set_next335 except ImportError:336 try:337 tb_set_next = _init_ugly_crap()338 except:339 pass334 tb_set_next = _init_ugly_crap()335 except:336 pass337 del _init_ugly_crap
modified:setup.py+4 added-14 removed
35 unmodified lines
36.. _documentation: http://jinja.pocoo.org/2/documentation/37"""38import sys3940from setuptools import setup, Extension, Feature40from setuptools import setup4142debugsupport = Feature(43 'optional C debug support',44 standard=False,45 ext_modules = [46 Extension('jinja2._debugsupport', ['jinja2/_debugsupport.c']),47 ],48)425043# ignore the old '--with-speedups' flag44try:45 speedups_pos = sys.argv.index('--with-speedups')46except ValueError:47 pass48else:57 sys.argv[speedups_pos] = '--with-debugsupport'49 sys.argv[speedups_pos] = ''50 sys.stderr.write('*' * 74 + '\n')51 sys.stderr.write('WARNING:\n')60 sys.stderr.write(' the --with-speedups flag is deprecated, assuming '61 '--with-debugsupport\n')52 sys.stderr.write(' the --with-speedups flag is deprecated\n')53 sys.stderr.write(' For the actual speedups install the MarkupSafe '54 'package.\n')55 sys.stderr.write('*' * 74 + '\n')56
30 unmodified lines
87 include_package_data=True,88 entry_points="""89 [babel.extractors]90 jinja2 = jinja2.ext:babel_extract[i18n]100 """,101 features={'debugsupport': debugsupport}91 """92)