You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
2.4 doesn't do six
This commit is contained in:
@@ -6,8 +6,7 @@ import difflib
|
|||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
import functools
|
import functools
|
||||||
# compatability
|
from StringIO import StringIO
|
||||||
import six
|
|
||||||
# uncompyle6 / xdis
|
# uncompyle6 / xdis
|
||||||
from uncompyle6 import PYTHON_VERSION, IS_PYPY, deparse_code
|
from uncompyle6 import PYTHON_VERSION, IS_PYPY, deparse_code
|
||||||
# TODO : I think we can get xdis to support the dis api (python 3 version) by doing something like this there
|
# TODO : I think we can get xdis to support the dis api (python 3 version) by doing something like this there
|
||||||
@@ -123,7 +122,7 @@ def validate_uncompyle(text, mode='exec'):
|
|||||||
original_text = text
|
original_text = text
|
||||||
|
|
||||||
deparsed = deparse_code(PYTHON_VERSION, original_code,
|
deparsed = deparse_code(PYTHON_VERSION, original_code,
|
||||||
compile_mode=mode, out=six.StringIO())
|
compile_mode=mode, out=StringIO())
|
||||||
uncompyled_text = deparsed.text
|
uncompyled_text = deparsed.text
|
||||||
uncompyled_code = compile(uncompyled_text, '<string>', 'exec')
|
uncompyled_code = compile(uncompyled_text, '<string>', 'exec')
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user