Merge "Removed unnecessary monkeypatching of __builtin__"

This commit is contained in:
Jenkins 2013-07-30 04:02:10 +00:00 committed by Gerrit Code Review
commit 6a9f55d876
35 changed files with 36 additions and 7 deletions

View File

@ -6,6 +6,8 @@ swift-recon-cron.py
import os
import sys
from ConfigParser import ConfigParser
from gettext import gettext as _
from swift.common.utils import get_logger, dump_recon_cache

View File

@ -1,6 +1,3 @@
import gettext
class Version(object):
def __init__(self, canonical_version, final):
self.canonical_version = canonical_version
@ -17,5 +14,3 @@ class Version(object):
_version = Version('1.9.1', False)
__version__ = _version.pretty_version
__canonical_version__ = _version.canonical_version
gettext.install('swift')

View File

@ -15,6 +15,7 @@
import os
import time
from gettext import gettext as _
from random import random
import swift.common.db

View File

@ -15,6 +15,7 @@
import os
import random
from gettext import gettext as _
from logging import DEBUG
from math import sqrt
from time import time, ctime

View File

@ -18,6 +18,7 @@ from __future__ import with_statement
import os
import time
import traceback
from gettext import gettext as _
from eventlet import Timeout

View File

@ -22,6 +22,7 @@ import signal
import socket
import logging
from contextlib import contextmanager
from gettext import gettext as _
from optparse import Values
import eventlet

View File

@ -26,6 +26,7 @@ BufferedHTTPResponse.
make all calls through httplib.
"""
from gettext import gettext as _
from urllib import quote
import logging
import time

View File

@ -25,6 +25,7 @@ import sys
import time
import cPickle as pickle
import errno
from gettext import gettext as _
from tempfile import mkstemp
from eventlet import sleep, Timeout

View File

@ -22,6 +22,7 @@ import shutil
import uuid
import errno
import re
from gettext import gettext as _
from eventlet import GreenPool, sleep, Timeout
from eventlet.green import subprocess

View File

@ -20,6 +20,7 @@ import struct
from sys import exc_info
from urllib import quote
import zlib
from gettext import gettext as _
from zlib import compressobj
from swift.common.http import HTTP_NOT_FOUND

View File

@ -22,6 +22,7 @@ import signal
import time
import subprocess
import re
from gettext import gettext as _
from swift.common.utils import search_tree, remove_file, write_file

View File

@ -49,6 +49,7 @@ import logging
import socket
import time
from bisect import bisect
from gettext import gettext as _
from hashlib import md5
from swift.common.utils import json

View File

@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from gettext import gettext as _
from eventlet import Timeout
from swift.common.swob import Request, HTTPServerError

View File

@ -28,6 +28,7 @@ rewritten and the request is passed further down the WSGI chain.
"""
import socket
from gettext import gettext as _
try:
import dns.resolver

View File

@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import time
from gettext import gettext as _
import eventlet
from swift.common.utils import cache_from_env, get_logger

View File

@ -15,6 +15,7 @@
import errno
import os
from gettext import gettext as _
from swift import __version__ as swiftver
from swift.common.swob import Request, Response

View File

@ -30,6 +30,7 @@ from hashlib import md5
from random import random, shuffle
from urllib import quote
from contextlib import contextmanager, closing
from gettext import gettext as _
import ctypes
import ctypes.util
from ConfigParser import ConfigParser, NoSectionError, NoOptionError, \

View File

@ -20,6 +20,7 @@ import os
import signal
import time
import mimetools
from gettext import gettext as _
from itertools import chain
from StringIO import StringIO

View File

@ -15,6 +15,7 @@
import os
import time
from gettext import gettext as _
from random import random
from eventlet import Timeout

View File

@ -20,6 +20,7 @@ import time
import traceback
from xml.sax import saxutils
from datetime import datetime
from gettext import gettext as _
from eventlet import Timeout

View File

@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from gettext import gettext as _
from time import ctime, time
from random import random, shuffle
from struct import unpack_from

View File

@ -18,6 +18,7 @@ import os
import signal
import sys
import time
from gettext import gettext as _
from random import random, shuffle
from tempfile import mkstemp

View File

@ -15,6 +15,7 @@
import os
import time
from gettext import gettext as _
from eventlet import Timeout

View File

@ -22,6 +22,7 @@ import logging
import os
import time
import uuid
from gettext import gettext as _
from os.path import basename, dirname, join
from swift.common.exceptions import PathNotDir

View File

@ -21,6 +21,7 @@ import errno
import os
import time
import traceback
from gettext import gettext as _
from hashlib import md5
from tempfile import mkstemp
from contextlib import contextmanager

View File

@ -17,6 +17,7 @@ import urllib
from random import random
from time import time
from os.path import join
from gettext import gettext as _
import hashlib
from eventlet import sleep, Timeout

View File

@ -20,6 +20,7 @@ import shutil
import time
import itertools
import cPickle as pickle
from gettext import gettext as _
import eventlet
from eventlet import GreenPool, tpool, Timeout, sleep, hubs

View File

@ -22,6 +22,7 @@ import time
import traceback
from collections import defaultdict
from datetime import datetime
from gettext import gettext as _
from hashlib import md5
from urllib import unquote

View File

@ -18,6 +18,7 @@ import os
import signal
import sys
import time
from gettext import gettext as _
from random import random
from eventlet import patcher, Timeout

View File

@ -24,6 +24,7 @@
# These shenanigans are to ensure all related objects can be garbage
# collected. We've seen objects hang around forever otherwise.
from gettext import gettext as _
from urllib import unquote
from swift.account.utils import account_listing_response, \

View File

@ -29,6 +29,7 @@ import time
import functools
import inspect
import itertools
from gettext import gettext as _
from urllib import quote
from eventlet import spawn_n, GreenPile
@ -219,7 +220,7 @@ def get_container_info(env, app, swift_source=None):
Note: This call bypasses auth. Success does not imply that the
request has authorization to the account.
"""
(version, account, container, _) = \
(version, account, container, unused) = \
split_path(env['PATH_INFO'], 3, 4, True)
info = get_info(app, env, account, container, ret_not_found=True)
if not info:

View File

@ -24,6 +24,7 @@
# These shenanigans are to ensure all related objects can be garbage
# collected. We've seen objects hang around forever otherwise.
from gettext import gettext as _
from urllib import unquote
from swift.common.utils import public, csv_append

View File

@ -29,6 +29,7 @@ import mimetypes
import re
import time
from datetime import datetime
from gettext import gettext as _
from urllib import unquote, quote
from hashlib import md5

View File

@ -27,6 +27,7 @@
import mimetypes
import os
from ConfigParser import ConfigParser
from gettext import gettext as _
from random import shuffle
from time import time

View File

@ -29,6 +29,5 @@ commands = {posargs}
[flake8]
ignore = H203,H301,H302,H306,H402,H404,H702,H703
builtins = _
exclude = .venv,.tox,dist,doc,test,*egg
show-source = True