From ce4726390fd93eff944a2f0e890f3b3eea2cba56 Mon Sep 17 00:00:00 2001 From: akun <6awkun@gmail.com> Date: Wed, 7 Mar 2018 17:18:41 +0800 Subject: [PATCH] Refactoring for Python 3 `renames` * 2to3 `ls | grep -v thirdparty` -f renames --- lib/core/bigarray.py | 4 ++-- lib/core/settings.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/core/bigarray.py b/lib/core/bigarray.py index db549cb47..c7b2a6198 100644 --- a/lib/core/bigarray.py +++ b/lib/core/bigarray.py @@ -54,7 +54,7 @@ class BigArray(list): def __init__(self, items=[]): self.chunks = [[]] - self.chunk_length = sys.maxint + self.chunk_length = sys.maxsize self.cache = None self.filenames = set() self._os_remove = os.remove @@ -66,7 +66,7 @@ class BigArray(list): def append(self, value): self.chunks[-1].append(value) - if self.chunk_length == sys.maxint: + if self.chunk_length == sys.maxsize: self._size_counter += _size_of(value) if self._size_counter >= BIGARRAY_CHUNK_SIZE: self.chunk_length = len(self.chunks[-1]) diff --git a/lib/core/settings.py b/lib/core/settings.py index 803276e9f..a31be27ee 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -426,7 +426,7 @@ DEFAULT_MSSQL_SCHEMA = "dbo" HASH_MOD_ITEM_DISPLAY = 11 # Maximum integer value -MAX_INT = sys.maxint +MAX_INT = sys.maxsize # Replacement for unsafe characters in dump table filenames UNSAFE_DUMP_FILEPATH_REPLACEMENT = '_'