@@ -219,22 +219,9 @@ def detect_python2(source, pathname):
219
219
if source != str (tree )[:- 1 ]: # remove added newline
220
220
# The above fixers made changes, so we conclude it's Python 2 code
221
221
logger .debug ('Detected Python 2 code: {0}' .format (pathname ))
222
- with open ('/tmp/original_code.py' , 'w' ) as f :
223
- f .write ('### Original code (detected as py2): %s\n %s' %
224
- (pathname , source ))
225
- with open ('/tmp/py2_detection_code.py' , 'w' ) as f :
226
- f .write ('### Code after running py3 detection (from %s)\n %s' %
227
- (pathname , str (tree )[:- 1 ]))
228
222
return True
229
223
else :
230
224
logger .debug ('Detected Python 3 code: {0}' .format (pathname ))
231
- with open ('/tmp/original_code.py' , 'w' ) as f :
232
- f .write ('### Original code (detected as py3): %s\n %s' %
233
- (pathname , source ))
234
- try :
235
- os .remove ('/tmp/futurize_code.py' )
236
- except OSError :
237
- pass
238
225
return False
239
226
240
227
@@ -395,9 +382,6 @@ def load_module(self, fullname):
395
382
396
383
if detect_python2 (source , self .pathname ):
397
384
source = self .transform (source )
398
- with open ('/tmp/futurized_code.py' , 'w' ) as f :
399
- f .write ('### Futurized code (from %s)\n %s' %
400
- (self .pathname , source ))
401
385
402
386
code = compile (source , self .pathname , 'exec' )
403
387
0 commit comments