search for: traceback_modul

Displaying 4 results from an estimated 4 matches for "traceback_modul".

Did you mean: traceback_module
2018 Aug 08
2
[PATCH nbdkit] python: Try harder to print the full traceback on error.
...tr); +} + +/* Convert the Python traceback to a string and call nbdkit_error. + * https://stackoverflow.com/a/15907460/7126113 + */ +static int +print_python_traceback (const char *callback, + PyObject *type, PyObject *error, PyObject *traceback) +{ + PyObject *module_name, *traceback_module, *format_exception_fn, *rv, + *traceback_str; + char *traceback_cstr; + +#ifdef HAVE_PYSTRING_FROMSTRING + module_name = PyString_FromString ("traceback"); +#else + module_name = PyUnicode_FromString ("traceback"); +#endif + traceback_module = PyImport_Import (module_nam...
2018 Aug 08
0
Re: [PATCH nbdkit] python: Try harder to print the full traceback on error.
...ck to a string and call nbdkit_error. > + * https://stackoverflow.com/a/15907460/7126113 > + */ > +static int > +print_python_traceback (const char *callback, > + PyObject *type, PyObject *error, PyObject > *traceback) > +{ > + PyObject *module_name, *traceback_module, *format_exception_fn, *rv, > + *traceback_str; > + char *traceback_cstr; > + > +#ifdef HAVE_PYSTRING_FROMSTRING > + module_name = PyString_FromString ("traceback"); > +#else > + module_name = PyUnicode_FromString ("traceback"); > +#endif > + t...
2019 Sep 11
0
[PATCH nbdkit] python: Drop support for Python 2.
...+151,7 @@ print_python_traceback (const char *callback, *traceback_str; CLEANUP_FREE char *traceback_cstr = NULL; -#ifdef HAVE_PYSTRING_FROMSTRING - module_name = PyString_FromString ("traceback"); -#else module_name = PyUnicode_FromString ("traceback"); -#endif traceback_module = PyImport_Import (module_name); Py_DECREF (module_name); @@ -222,7 +210,6 @@ check_python_failure (const char *callback) return 0; } -#if PY_MAJOR_VERSION >= 3 static struct PyModuleDef moduledef = { PyModuleDef_HEAD_INIT, "nbdkit", @@ -234,25 +221,18 @@ static stru...
2019 Sep 11
3
[PATCH nbdkit] python: Drop support for Python 2.
This patch proposes to drop support for Python 2 in nbdkit. Rather than abruptly drop it everywhere, my proposal is that we point people to nbdkit 1.14 (the current stable version) if they want to continue with Python 2 plugins, while gently reminding them of the upcoming Python 2.7 end of life announcement. Libnbd never supported Python 2. Libguestfs in theory supports Python 2 but I dropped