reverting this change
@@ -378,7 +390,13 @@
try: with open(file, 'rb') as f: - tree = ast.parse(f.read().decode('UTF-8'), file) + # send binary blob for python2, otherwise sending an unicode object with + # "encoding" directive makes ast triggering an exception in python2 + if(sys.version_info[0] < 3): + file_content = f.read() + else: + file_content = f.read().decode('UTF-8') + tree = ast.parse(file_content, file)
which occurs in python-distutils-extra-2.34 first seems to fix the issue
reverting this change
@@ -378,7 +390,13 @@
try: f.read( ).decode( 'UTF-8' ), file) version_ info[0] < 3): ).decode( 'UTF-8' ) file_content, file)
with open(file, 'rb') as f:
- tree = ast.parse(
+ # send binary blob for python2, otherwise sending an unicode object with
+ # "encoding" directive makes ast triggering an exception in python2
+ if(sys.
+ file_content = f.read()
+ else:
+ file_content = f.read(
+ tree = ast.parse(
which occurs in python- distutils- extra-2. 34 first seems to fix the issue