diff upreckon-vcs @ 70:b9d5857f7b9a

Better emulation of built-ins for testconf Bug fix: next is now in compat.__all__. Members of compat that do not correspond to built-ins or members of itertools are no longer added to built-ins while loading testconf. xrange is now added to built-ins only while loading testconf and only in legacy mode. testconf can now access the original built-ins through the CompatBuiltins context manager which is now exposed as config.builtins. Bug fix: the default string encoding is no longer relied upon.
author Oleg Oshmyan <chortos@inbox.lv>
date Mon, 03 Jan 2011 01:27:56 +0200
parents 34ba0b353fc6
children d46bd7ee3e69
line wrap: on
line diff
--- a/upreckon-vcs	Mon Jan 03 01:07:02 2011 +0200
+++ b/upreckon-vcs	Mon Jan 03 01:27:56 2011 +0200
@@ -61,6 +61,9 @@
 
 import config, itertools, os, subprocess, sys, time
 
+if options.legacy:
+	compat.pseudobuiltins += 'xrange',
+
 if options.autotime:
 	# This is really a dirty hack that assumes that sleep() does not spend
 	# the CPU time of the current process and that if clock() measures