Staging
v0.5.1
https://github.com/python/cpython
Revision 523263d4436dc025db66be5b4e40ae3f26050ee9 authored by Anthony Baxter on 20 September 2005, 15:17:16 UTC, committed by Anthony Baxter on 20 September 2005, 15:17:16 UTC
test_default_encoding_issues():  Fully restore sys.setdefaultencoding.

test_site often failed under "regrtest.py -r", because this xmlrpc test
left sys with a setdefaultencoding attribute, but loading site.py removes
that attribute and test_site.py verifies the attribute is gone.  Changed
this test to get rid of sys.setdefaultencoding if it didn't exist when
this test started.
1 parent d8b9721
Raw File
Tip revision: 523263d4436dc025db66be5b4e40ae3f26050ee9 authored by Anthony Baxter on 20 September 2005, 15:17:16 UTC
backport:
Tip revision: 523263d
getbuildinfo.c
#include "Python.h"

#ifndef DONT_HAVE_STDIO_H
#include <stdio.h>
#endif

#ifndef DATE
#ifdef __DATE__
#define DATE __DATE__
#else
#define DATE "xx/xx/xx"
#endif
#endif

#ifndef TIME
#ifdef __TIME__
#define TIME __TIME__
#else
#define TIME "xx:xx:xx"
#endif
#endif

#ifndef BUILD
#define BUILD 0
#endif

const char *
Py_GetBuildInfo(void)
{
	static char buildinfo[50];
	PyOS_snprintf(buildinfo, sizeof(buildinfo),
		      "#%d, %.20s, %.9s", BUILD, DATE, TIME);
	return buildinfo;
}
back to top