# HG changeset patch # User RhodeCode Admin # Date 2023-03-06 22:09:06 # Node ID 16048ea05176d6e0ae7e60bf9aadbbdeb21b144b # Parent 98fbcdb684bdcbda9ced07c9932b4bcb1e4288f5 python3: fixed usage of stringIO module diff --git a/rhodecode/apps/file_store/utils.py b/rhodecode/apps/file_store/utils.py --- a/rhodecode/apps/file_store/utils.py +++ b/rhodecode/apps/file_store/utils.py @@ -20,7 +20,7 @@ import uuid -import StringIO +from io import StringIO import pathlib2 diff --git a/rhodecode/lib/_vendor/authomatic/six.py b/rhodecode/lib/_vendor/authomatic/six.py --- a/rhodecode/lib/_vendor/authomatic/six.py +++ b/rhodecode/lib/_vendor/authomatic/six.py @@ -627,7 +627,7 @@ else: def indexbytes(buf, i): return ord(buf[i]) iterbytes = functools.partial(itertools.imap, ord) - import StringIO + from io import StringIO StringIO = BytesIO = StringIO.StringIO _assertCountEqual = "assertItemsEqual" _assertRaisesRegex = "assertRaisesRegexp" diff --git a/rhodecode/lib/dbmigrate/migrate/changeset/ansisql.py b/rhodecode/lib/dbmigrate/migrate/changeset/ansisql.py --- a/rhodecode/lib/dbmigrate/migrate/changeset/ansisql.py +++ b/rhodecode/lib/dbmigrate/migrate/changeset/ansisql.py @@ -4,7 +4,7 @@ At the moment, this isn't so much based off of ANSI as much as things that just happen to work with multiple databases. """ -import StringIO +from io import StringIO import sqlalchemy as sa from sqlalchemy.schema import SchemaVisitor diff --git a/rhodecode/lib/dbmigrate/migrate/versioning/script/py.py b/rhodecode/lib/dbmigrate/migrate/versioning/script/py.py --- a/rhodecode/lib/dbmigrate/migrate/versioning/script/py.py +++ b/rhodecode/lib/dbmigrate/migrate/versioning/script/py.py @@ -5,7 +5,7 @@ import shutil import warnings import logging import inspect -from StringIO import StringIO +from io import StringIO from rhodecode.lib.dbmigrate import migrate from rhodecode.lib.dbmigrate.migrate.versioning import genmodel, schemadiff diff --git a/rhodecode/lib/feedgenerator/feedgenerator.py b/rhodecode/lib/feedgenerator/feedgenerator.py --- a/rhodecode/lib/feedgenerator/feedgenerator.py +++ b/rhodecode/lib/feedgenerator/feedgenerator.py @@ -33,7 +33,7 @@ http://web.archive.org/web/2011071803522 import datetime -from StringIO import StringIO +from io import StringIO import pytz from six.moves.urllib import parse as urlparse diff --git a/rhodecode/lib/helpers.py b/rhodecode/lib/helpers.py --- a/rhodecode/lib/helpers.py +++ b/rhodecode/lib/helpers.py @@ -30,7 +30,7 @@ import collections import os import random import hashlib -import StringIO +from io import StringIO import textwrap import urllib.request, urllib.parse, urllib.error import math diff --git a/rhodecode/lib/middleware/simplevcs.py b/rhodecode/lib/middleware/simplevcs.py --- a/rhodecode/lib/middleware/simplevcs.py +++ b/rhodecode/lib/middleware/simplevcs.py @@ -28,7 +28,7 @@ import re import logging import importlib from functools import wraps -from StringIO import StringIO +from io import StringIO from lxml import etree import time diff --git a/rhodecode/lib/vcs/backends/git/commit.py b/rhodecode/lib/vcs/backends/git/commit.py --- a/rhodecode/lib/vcs/backends/git/commit.py +++ b/rhodecode/lib/vcs/backends/git/commit.py @@ -25,7 +25,7 @@ GIT commit module import re import stat from itertools import chain -from StringIO import StringIO +from io import StringIO from zope.cachedescriptors.property import Lazy as LazyProperty diff --git a/rhodecode/tests/lib/middleware/test_simplesvn.py b/rhodecode/tests/lib/middleware/test_simplesvn.py --- a/rhodecode/tests/lib/middleware/test_simplesvn.py +++ b/rhodecode/tests/lib/middleware/test_simplesvn.py @@ -18,7 +18,7 @@ # RhodeCode Enterprise Edition, including its added features, Support services, # and proprietary license terms, please see https://rhodecode.com/licenses/ -from StringIO import StringIO +from io import StringIO import pytest from mock import patch, Mock diff --git a/rhodecode/tests/lib/test_hooks_daemon.py b/rhodecode/tests/lib/test_hooks_daemon.py --- a/rhodecode/tests/lib/test_hooks_daemon.py +++ b/rhodecode/tests/lib/test_hooks_daemon.py @@ -20,7 +20,7 @@ import json import logging -from StringIO import StringIO +from io import StringIO import mock import pytest diff --git a/rhodecode/tests/vcs/test_archives.py b/rhodecode/tests/vcs/test_archives.py --- a/rhodecode/tests/vcs/test_archives.py +++ b/rhodecode/tests/vcs/test_archives.py @@ -24,7 +24,7 @@ import shutil import tarfile import tempfile import zipfile -import StringIO +from io import StringIO import mock import pytest