Mercurial > ~astiob > upreckon > hgweb
comparison 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 | 
   comparison
  equal
  deleted
  inserted
  replaced
| 69:c0f1b87013ad | 70:b9d5857f7b9a | 
|---|---|
| 58 urllib.urlretrieve('http://chortos.selfip.net/~astiob/test.py/test.py', sys.argv[0]) | 58 urllib.urlretrieve('http://chortos.selfip.net/~astiob/test.py/test.py', sys.argv[0]) | 
| 59 say('Downloaded and installed. Now you are using Upreckon ' + latesttext + '.') | 59 say('Downloaded and installed. Now you are using Upreckon ' + latesttext + '.') | 
| 60 sys.exit() | 60 sys.exit() | 
| 61 | 61 | 
| 62 import config, itertools, os, subprocess, sys, time | 62 import config, itertools, os, subprocess, sys, time | 
| 63 | |
| 64 if options.legacy: | |
| 65 compat.pseudobuiltins += 'xrange', | |
| 63 | 66 | 
| 64 if options.autotime: | 67 if options.autotime: | 
| 65 # This is really a dirty hack that assumes that sleep() does not spend | 68 # This is really a dirty hack that assumes that sleep() does not spend | 
| 66 # the CPU time of the current process and that if clock() measures | 69 # the CPU time of the current process and that if clock() measures | 
| 67 # wall-clock time, then it is more precise than time() is. Both these | 70 # wall-clock time, then it is more precise than time() is. Both these | 
