summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/ast.c1
-rw-r--r--Python/bltinmodule.c7
-rw-r--r--Python/ceval.c20
-rw-r--r--Python/compile.c2
-rw-r--r--Python/dtoa.c4
-rw-r--r--Python/dynload_aix.c2
-rw-r--r--Python/dynload_dl.c16
-rw-r--r--Python/dynload_hpux.c2
-rw-r--r--Python/dynload_next.c4
-rw-r--r--Python/dynload_os2.c2
-rw-r--r--Python/dynload_shlib.c2
-rw-r--r--Python/dynload_win.c2
-rw-r--r--Python/getargs.c7
-rw-r--r--Python/import.c97
-rw-r--r--Python/importdl.c5
-rw-r--r--Python/pystrtod.c2
-rw-r--r--Python/sysmodule.c97
17 files changed, 100 insertions, 172 deletions
diff --git a/Python/ast.c b/Python/ast.c
index 4edf335c33..e62a2156b7 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -3231,7 +3231,6 @@ decode_unicode(struct compiling *c, const char *s, size_t len, int rawmode, cons
const char *end;
if (encoding == NULL) {
- buf = (char *)s;
u = NULL;
} else {
/* check for integer overflow */
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 2aea9f745f..ca40cb07dc 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -37,7 +37,7 @@ builtin___build_class__(PyObject *self, PyObject *args, PyObject *kwds)
{
PyObject *func, *name, *bases, *mkw, *meta, *prep, *ns, *cell;
PyObject *cls = NULL;
- Py_ssize_t nargs, nbases;
+ Py_ssize_t nargs;
assert(args != NULL);
if (!PyTuple_Check(args)) {
@@ -61,7 +61,6 @@ builtin___build_class__(PyObject *self, PyObject *args, PyObject *kwds)
bases = PyTuple_GetSlice(args, 2, nargs);
if (bases == NULL)
return NULL;
- nbases = nargs - 2;
if (kwds == NULL) {
meta = NULL;
@@ -512,7 +511,7 @@ source_as_string(PyObject *cmd, char *funcname, char *what, PyCompilerFlags *cf)
if (PyUnicode_Check(cmd)) {
cf->cf_flags |= PyCF_IGNORE_COOKIE;
- cmd = _PyUnicode_AsDefaultEncodedString(cmd, NULL);
+ cmd = _PyUnicode_AsDefaultEncodedString(cmd);
if (cmd == NULL)
return NULL;
}
@@ -766,7 +765,6 @@ builtin_exec(PyObject *self, PyObject *args)
{
PyObject *v;
PyObject *prog, *globals = Py_None, *locals = Py_None;
- int plain = 0;
if (!PyArg_UnpackTuple(args, "exec", 1, 3, &prog, &globals, &locals))
return NULL;
@@ -775,7 +773,6 @@ builtin_exec(PyObject *self, PyObject *args)
globals = PyEval_GetGlobals();
if (locals == Py_None) {
locals = PyEval_GetLocals();
- plain = 1;
}
if (!globals || !locals) {
PyErr_SetString(PyExc_SystemError,
diff --git a/Python/ceval.c b/Python/ceval.c
index f6d4b0b84b..9572918dc3 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -811,10 +811,6 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
unsigned char *first_instr;
PyObject *names;
PyObject *consts;
-#if defined(Py_DEBUG) || defined(LLTRACE)
- /* Make it easier to find out where we are with a debugger */
- char *filename;
-#endif
/* Computed GOTOs, or
the-optimization-commonly-but-improperly-known-as-"threaded code"
@@ -1227,18 +1223,6 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
#ifdef LLTRACE
lltrace = PyDict_GetItemString(f->f_globals, "__lltrace__") != NULL;
#endif
-#if defined(Py_DEBUG) || defined(LLTRACE)
- {
- PyObject *error_type, *error_value, *error_traceback;
- PyErr_Fetch(&error_type, &error_value, &error_traceback);
- filename = _PyUnicode_AsString(co->co_filename);
- if (filename == NULL && tstate->overflowed) {
- /* maximum recursion depth exceeded */
- goto exit_eval_frame;
- }
- PyErr_Restore(error_type, error_value, error_traceback);
- }
-#endif
why = WHY_NOT;
err = 0;
@@ -2706,7 +2690,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
Py_DECREF(*pfunc);
*pfunc = self;
na++;
- n++;
+ /* n++; */
} else
Py_INCREF(func);
sp = stack_pointer;
@@ -3042,7 +3026,7 @@ fast_yield:
PyTrace_RETURN, retval)) {
Py_XDECREF(retval);
retval = NULL;
- why = WHY_EXCEPTION;
+ /* why = WHY_EXCEPTION; */
}
}
}
diff --git a/Python/compile.c b/Python/compile.c
index 1d6e38c22e..53f5a12cc3 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -3026,7 +3026,7 @@ expr_constant(struct compiler *c, expr_ty e)
case Name_kind:
/* optimize away names that can't be reassigned */
id = PyBytes_AS_STRING(
- _PyUnicode_AsDefaultEncodedString(e->v.Name.id, NULL));
+ _PyUnicode_AsDefaultEncodedString(e->v.Name.id));
if (strcmp(id, "True") == 0) return 1;
if (strcmp(id, "False") == 0) return 0;
if (strcmp(id, "None") == 0) return 0;
diff --git a/Python/dtoa.c b/Python/dtoa.c
index 44dc01f1d5..82b6faa80c 100644
--- a/Python/dtoa.c
+++ b/Python/dtoa.c
@@ -2055,7 +2055,7 @@ _Py_dg_strtod(const char *s00, char **se)
+ Exp_msk1
;
word1(&rv) = 0;
- dsign = 0;
+ /* dsign = 0; */
break;
}
}
@@ -2092,7 +2092,7 @@ _Py_dg_strtod(const char *s00, char **se)
goto undfl;
}
}
- dsign = 1 - dsign;
+ /* dsign = 1 - dsign; */
break;
}
if ((aadj = ratio(delta, bs)) <= 2.) {
diff --git a/Python/dynload_aix.c b/Python/dynload_aix.c
index 149990d799..74c7b32603 100644
--- a/Python/dynload_aix.c
+++ b/Python/dynload_aix.c
@@ -154,7 +154,7 @@ aix_loaderror(const char *pathname)
}
-dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
+dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname,
const char *pathname, FILE *fp)
{
dl_funcptr p;
diff --git a/Python/dynload_dl.c b/Python/dynload_dl.c
index 2606e1e32f..37519b23e7 100644
--- a/Python/dynload_dl.c
+++ b/Python/dynload_dl.c
@@ -10,17 +10,17 @@
extern char *Py_GetProgramName(void);
const struct filedescr _PyImport_DynLoadFiletab[] = {
- {".o", "rb", C_EXTENSION},
- {"module.o", "rb", C_EXTENSION},
- {0, 0}
+ {".o", "rb", C_EXTENSION},
+ {"module.o", "rb", C_EXTENSION},
+ {0, 0}
};
-dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
- const char *pathname, FILE *fp)
+dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname,
+ const char *pathname, FILE *fp)
{
- char funcname[258];
+ char funcname[258];
- PyOS_snprintf(funcname, sizeof(funcname), "PyInit_%.200s", shortname);
- return dl_loadmod(Py_GetProgramName(), pathname, funcname);
+ PyOS_snprintf(funcname, sizeof(funcname), "PyInit_%.200s", shortname);
+ return dl_loadmod(Py_GetProgramName(), pathname, funcname);
}
diff --git a/Python/dynload_hpux.c b/Python/dynload_hpux.c
index 18a81377f2..3ebbbad01f 100644
--- a/Python/dynload_hpux.c
+++ b/Python/dynload_hpux.c
@@ -19,7 +19,7 @@ const struct filedescr _PyImport_DynLoadFiletab[] = {
{0, 0}
};
-dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
+dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname,
const char *pathname, FILE *fp)
{
dl_funcptr p;
diff --git a/Python/dynload_next.c b/Python/dynload_next.c
index cabf9b9663..eb17950b45 100644
--- a/Python/dynload_next.c
+++ b/Python/dynload_next.c
@@ -31,8 +31,8 @@ const struct filedescr _PyImport_DynLoadFiletab[] = {
#define LINKOPTIONS NSLINKMODULE_OPTION_BINDNOW| \
NSLINKMODULE_OPTION_RETURN_ON_ERROR|NSLINKMODULE_OPTION_PRIVATE
#endif
-dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
- const char *pathname, FILE *fp)
+dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname,
+ const char *pathname, FILE *fp)
{
dl_funcptr p = NULL;
char funcname[258];
diff --git a/Python/dynload_os2.c b/Python/dynload_os2.c
index 101c024bbe..f7264da04c 100644
--- a/Python/dynload_os2.c
+++ b/Python/dynload_os2.c
@@ -15,7 +15,7 @@ const struct filedescr _PyImport_DynLoadFiletab[] = {
{0, 0}
};
-dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
+dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname,
const char *pathname, FILE *fp)
{
dl_funcptr p;
diff --git a/Python/dynload_shlib.c b/Python/dynload_shlib.c
index 7ea510e862..1c215c329c 100644
--- a/Python/dynload_shlib.c
+++ b/Python/dynload_shlib.c
@@ -75,7 +75,7 @@ static struct {
static int nhandles = 0;
-dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
+dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname,
const char *pathname, FILE *fp)
{
dl_funcptr p;
diff --git a/Python/dynload_win.c b/Python/dynload_win.c
index 73a1dcf897..9c04250f33 100644
--- a/Python/dynload_win.c
+++ b/Python/dynload_win.c
@@ -171,7 +171,7 @@ static char *GetPythonImport (HINSTANCE hModule)
return NULL;
}
-dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
+dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname,
const char *pathname, FILE *fp)
{
dl_funcptr p;
diff --git a/Python/getargs.c b/Python/getargs.c
index 600941d9c7..e1cef0cc58 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -551,7 +551,7 @@ convertitem(PyObject *arg, const char **p_format, va_list *p_va, int flags,
#define UNICODE_DEFAULT_ENCODING(arg) \
- _PyUnicode_AsDefaultEncodedString(arg, NULL)
+ _PyUnicode_AsDefaultEncodedString(arg)
/* Format an error message generated by convertsimple(). */
@@ -966,9 +966,10 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
case 'u': /* raw unicode buffer (Py_UNICODE *) */
case 'Z': /* raw unicode buffer or None */
{
+ Py_UNICODE **p = va_arg(*p_va, Py_UNICODE **);
+
if (*format == '#') { /* any buffer-like object */
/* "s#" or "Z#" */
- Py_UNICODE **p = va_arg(*p_va, Py_UNICODE **);
FETCH_SIZE;
if (c == 'Z' && arg == Py_None) {
@@ -984,8 +985,6 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
format++;
} else {
/* "s" or "Z" */
- Py_UNICODE **p = va_arg(*p_va, Py_UNICODE **);
-
if (c == 'Z' && arg == Py_None)
*p = NULL;
else if (PyUnicode_Check(arg)) {
diff --git a/Python/import.c b/Python/import.c
index 23752eeb72..22a7c8744d 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -636,7 +636,7 @@ _PyImport_FixupBuiltin(PyObject *mod, char *name)
}
PyObject *
-_PyImport_FindExtensionUnicode(char *name, PyObject *filename)
+_PyImport_FindExtensionUnicode(const char *name, PyObject *filename)
{
PyObject *mod, *mdict;
PyModuleDef* def;
@@ -680,7 +680,7 @@ _PyImport_FindExtensionUnicode(char *name, PyObject *filename)
}
PyObject *
-_PyImport_FindBuiltin(char *name)
+_PyImport_FindBuiltin(const char *name)
{
PyObject *res, *filename;
filename = PyUnicode_FromString(name);
@@ -698,18 +698,18 @@ _PyImport_FindBuiltin(char *name)
'NEW' REFERENCE! */
PyObject *
-PyImport_AddModule(const char *name)
+PyImport_AddModuleObject(PyObject *name)
{
PyObject *modules = PyImport_GetModuleDict();
PyObject *m;
- if ((m = PyDict_GetItemString(modules, name)) != NULL &&
+ if ((m = PyDict_GetItem(modules, name)) != NULL &&
PyModule_Check(m))
return m;
- m = PyModule_New(name);
+ m = PyModule_NewObject(name);
if (m == NULL)
return NULL;
- if (PyDict_SetItemString(modules, name, m) != 0) {
+ if (PyDict_SetItem(modules, name, m) != 0) {
Py_DECREF(m);
return NULL;
}
@@ -718,14 +718,27 @@ PyImport_AddModule(const char *name)
return m;
}
+PyObject *
+PyImport_AddModule(const char *name)
+{
+ PyObject *nameobj, *module;
+ nameobj = PyUnicode_FromString(name);
+ if (nameobj == NULL)
+ return NULL;
+ module = PyImport_AddModuleObject(nameobj);
+ Py_DECREF(nameobj);
+ return module;
+}
+
+
/* Remove name from sys.modules, if it's there. */
static void
-remove_module(const char *name)
+remove_module(PyObject *name)
{
PyObject *modules = PyImport_GetModuleDict();
- if (PyDict_GetItemString(modules, name) == NULL)
+ if (PyDict_GetItem(modules, name) == NULL)
return;
- if (PyDict_DelItemString(modules, name) < 0)
+ if (PyDict_DelItem(modules, name) < 0)
Py_FatalError("import: deleting existing key in"
"sys.modules failed");
}
@@ -763,10 +776,42 @@ PyObject *
PyImport_ExecCodeModuleWithPathnames(char *name, PyObject *co, char *pathname,
char *cpathname)
{
+ PyObject *m = NULL;
+ PyObject *nameobj, *pathobj = NULL, *cpathobj = NULL;
+
+ nameobj = PyUnicode_FromString(name);
+ if (nameobj == NULL)
+ return NULL;
+
+ if (pathname != NULL) {
+ pathobj = PyUnicode_DecodeFSDefault(pathname);
+ if (pathobj == NULL)
+ goto error;
+ } else
+ pathobj = NULL;
+ if (cpathname != NULL) {
+ cpathobj = PyUnicode_DecodeFSDefault(cpathname);
+ if (cpathobj == NULL)
+ goto error;
+ } else
+ cpathobj = NULL;
+ m = PyImport_ExecCodeModuleObject(nameobj, co, pathobj, cpathobj);
+error:
+ Py_DECREF(nameobj);
+ Py_XDECREF(pathobj);
+ Py_XDECREF(cpathobj);
+ return m;
+}
+
+PyObject*
+PyImport_ExecCodeModuleObject(PyObject *name, PyObject *co, PyObject *pathname,
+ PyObject *cpathname)
+{
PyObject *modules = PyImport_GetModuleDict();
PyObject *m, *d, *v;
+ PyObject *pathbytes;
- m = PyImport_AddModule(name);
+ m = PyImport_AddModuleObject(name);
if (m == NULL)
return NULL;
/* If the module is being reloaded, we get the old module back
@@ -778,12 +823,18 @@ PyImport_ExecCodeModuleWithPathnames(char *name, PyObject *co, char *pathname,
goto error;
}
/* Remember the filename as the __file__ attribute */
- v = NULL;
if (pathname != NULL) {
- v = get_sourcefile(pathname);
+ pathbytes = PyUnicode_EncodeFSDefault(pathname);
+ if (pathbytes != NULL) {
+ v = get_sourcefile(PyBytes_AS_STRING(pathbytes));
+ Py_DECREF(pathbytes);
+ } else
+ v = NULL;
if (v == NULL)
PyErr_Clear();
}
+ else
+ v = NULL;
if (v == NULL) {
v = ((PyCodeObject *)co)->co_filename;
Py_INCREF(v);
@@ -793,27 +844,21 @@ PyImport_ExecCodeModuleWithPathnames(char *name, PyObject *co, char *pathname,
Py_DECREF(v);
/* Remember the pyc path name as the __cached__ attribute. */
- if (cpathname == NULL) {
- v = Py_None;
- Py_INCREF(v);
- }
- else if ((v = PyUnicode_FromString(cpathname)) == NULL) {
- PyErr_Clear(); /* Not important enough to report */
+ if (cpathname != NULL)
+ v = cpathname;
+ else
v = Py_None;
- Py_INCREF(v);
- }
if (PyDict_SetItemString(d, "__cached__", v) != 0)
PyErr_Clear(); /* Not important enough to report */
- Py_DECREF(v);
v = PyEval_EvalCode(co, d, d);
if (v == NULL)
goto error;
Py_DECREF(v);
- if ((m = PyDict_GetItemString(modules, name)) == NULL) {
+ if ((m = PyDict_GetItem(modules, name)) == NULL) {
PyErr_Format(PyExc_ImportError,
- "Loaded module %.200s not found in sys.modules",
+ "Loaded module %R not found in sys.modules",
name);
return NULL;
}
@@ -1547,8 +1592,8 @@ PyImport_GetImporter(PyObject *path) {
pathname and an open file. Return NULL if the module is not found. */
#ifdef MS_COREDLL
-extern FILE *PyWin_FindRegisteredModule(const char *, struct filedescr **,
- char *, Py_ssize_t);
+extern FILE *_PyWin_FindRegisteredModule(const char *, struct filedescr **,
+ char *, Py_ssize_t);
#endif
static int case_ok(char *, Py_ssize_t, Py_ssize_t, char *);
@@ -1631,7 +1676,7 @@ find_module(char *fullname, char *subname, PyObject *path, char *buf,
return &fd_builtin;
}
#ifdef MS_COREDLL
- fp = PyWin_FindRegisteredModule(name, &fdp, buf, buflen);
+ fp = _PyWin_FindRegisteredModule(name, &fdp, buf, buflen);
if (fp != NULL) {
*p_fp = fp;
return fdp;
diff --git a/Python/importdl.c b/Python/importdl.c
index 9caed453aa..74ca8a7cca 100644
--- a/Python/importdl.c
+++ b/Python/importdl.c
@@ -12,8 +12,7 @@
#include "importdl.h"
-extern dl_funcptr _PyImport_GetDynLoadFunc(const char *name,
- const char *shortname,
+extern dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname,
const char *pathname, FILE *fp);
@@ -48,7 +47,7 @@ _PyImport_LoadDynamicModule(char *name, char *pathname, FILE *fp)
shortname = lastdot+1;
}
- p0 = _PyImport_GetDynLoadFunc(name, shortname, pathname, fp);
+ p0 = _PyImport_GetDynLoadFunc(shortname, pathname, fp);
p = (PyObject*(*)(void))p0;
if (PyErr_Occurred())
goto error;
diff --git a/Python/pystrtod.c b/Python/pystrtod.c
index 75e3032fb7..7bf21c0bc1 100644
--- a/Python/pystrtod.c
+++ b/Python/pystrtod.c
@@ -954,7 +954,7 @@ format_float_short(double d, char format_code,
/* shouldn't get here: Gay's code should always return
something starting with a digit, an 'I', or 'N' */
strncpy(p, "ERR", 3);
- p += 3;
+ /* p += 3; */
assert(0);
}
goto exit;
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index ea095d2660..d06adc0aca 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -1176,7 +1176,6 @@ PySys_AddXOption(const wchar_t *s)
PyObject *opts;
PyObject *name = NULL, *value = NULL;
const wchar_t *name_end;
- int r;
opts = get_xoptions();
if (opts == NULL)
@@ -1194,7 +1193,7 @@ PySys_AddXOption(const wchar_t *s)
}
if (name == NULL || value == NULL)
goto error;
- r = PyDict_SetItem(opts, name, value);
+ PyDict_SetItem(opts, name, value);
Py_DECREF(name);
Py_DECREF(value);
return;
@@ -1256,7 +1255,6 @@ int_info -- a struct sequence with information about the int implementation.\n\
maxsize -- the largest supported length of containers.\n\
maxunicode -- the largest supported character\n\
builtin_module_names -- tuple of module names built into this interpreter\n\
-subversion -- subversion information of the build as tuple\n\
version -- the version of this interpreter as a string\n\
version_info -- version information as a named tuple\n\
hexversion -- version information encoded as a single integer\n\
@@ -1304,95 +1302,6 @@ settrace() -- set the global debug tracing function\n\
)
/* end of sys_doc */ ;
-/* Subversion branch and revision management */
-static const char _patchlevel_revision[] = PY_PATCHLEVEL_REVISION;
-static const char headurl[] = "$HeadURL$";
-static int svn_initialized;
-static char patchlevel_revision[50]; /* Just the number */
-static char branch[50];
-static char shortbranch[50];
-static const char *svn_revision;
-
-static void
-svnversion_init(void)
-{
- const char *python, *br_start, *br_end, *br_end2, *svnversion;
- Py_ssize_t len;
- int istag = 0;
-
- if (svn_initialized)
- return;
-
- python = strstr(headurl, "/python/");
- if (!python) {
- strcpy(branch, "unknown branch");
- strcpy(shortbranch, "unknown");
- }
- else {
- br_start = python + 8;
- br_end = strchr(br_start, '/');
- assert(br_end);
-
- /* Works even for trunk,
- as we are in trunk/Python/sysmodule.c */
- br_end2 = strchr(br_end+1, '/');
-
- istag = strncmp(br_start, "tags", 4) == 0;
- if (strncmp(br_start, "trunk", 5) == 0) {
- strcpy(branch, "trunk");
- strcpy(shortbranch, "trunk");
- }
- else if (istag || strncmp(br_start, "branches", 8) == 0) {
- len = br_end2 - br_start;
- strncpy(branch, br_start, len);
- branch[len] = '\0';
-
- len = br_end2 - (br_end + 1);
- strncpy(shortbranch, br_end + 1, len);
- shortbranch[len] = '\0';
- }
- else {
- Py_FatalError("bad HeadURL");
- return;
- }
- }
-
-
- svnversion = _Py_svnversion();
- if (strcmp(svnversion, "Unversioned directory") != 0 && strcmp(svnversion, "exported") != 0)
- svn_revision = svnversion;
- else if (istag) {
- len = strlen(_patchlevel_revision);
- assert(len >= 13);
- assert(len < (sizeof(patchlevel_revision) + 13));
- strncpy(patchlevel_revision, _patchlevel_revision + 11,
- len - 13);
- patchlevel_revision[len - 13] = '\0';
- svn_revision = patchlevel_revision;
- }
- else
- svn_revision = "";
-
- svn_initialized = 1;
-}
-
-/* Return svnversion output if available.
- Else return Revision of patchlevel.h if on branch.
- Else return empty string */
-const char*
-Py_SubversionRevision()
-{
- svnversion_init();
- return svn_revision;
-}
-
-const char*
-Py_SubversionShortBranch()
-{
- svnversion_init();
- return shortbranch;
-}
-
PyDoc_STRVAR(flags__doc__,
"sys.flags\n\
@@ -1596,10 +1505,6 @@ _PySys_Init(void)
PyUnicode_FromString(Py_GetVersion()));
SET_SYS_FROM_STRING("hexversion",
PyLong_FromLong(PY_VERSION_HEX));
- svnversion_init();
- SET_SYS_FROM_STRING("subversion",
- Py_BuildValue("(sss)", "CPython", branch,
- svn_revision));
SET_SYS_FROM_STRING("_mercurial",
Py_BuildValue("(szz)", "CPython", _Py_hgidentifier(),
_Py_hgversion()));