Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 23607: first pass of changes for compatibility with Python3 #24435

Merged
merged 8 commits into from Oct 16, 2019

Fix StringIO module import to be compatible with Python3

  • Loading branch information
marmeladema committed Oct 15, 2019
commit bf66a08c023e0f8fe93ad1a41dae90e0ca12c002
@@ -16,7 +16,7 @@
import shutil
from socket import error as socket_error
import stat
import StringIO
from io import BytesIO
import sys
import time
import zipfile
@@ -154,7 +154,7 @@ def download(desc, src, writer, start_byte=0):


def download_bytes(desc, src):
content_writer = StringIO.StringIO()
content_writer = BytesIO()
download(desc, src, content_writer)
return content_writer.getvalue()

@@ -16,7 +16,7 @@
import json
import os
import re
import StringIO
from io import StringIO
import subprocess
import sys

@@ -345,7 +345,7 @@ def stdout_redirect(where):
"E501", # 80 character line length; the standard tidy process will enforce line length
}

output = StringIO.StringIO()
output = StringIO()
with stdout_redirect(output):
check_code(contents, ignore=ignore)
for error in output.getvalue().splitlines():
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.