Remove compatibility codes for swift < 2.8.0

Change-Id: I774ce8d54da45f47650213cca33c0efe0e959740
This commit is contained in:
Takashi Kajinami 2020-02-09 15:00:38 +09:00
parent 2f5d0300cc
commit d30f5fcd46

@ -14,18 +14,10 @@
# limitations under the License.
from six.moves.urllib.parse import quote
try:
# We need to import copy helper functions from copy middleware
# since it is introduced to swift.
from swift.common.middleware.copy import \
_check_copy_from_header as check_copy_from_header, \
_check_destination_header as check_destination_header, \
_copy_headers as copy_headers
except ImportError:
# This is required to keep compatibility with
# swift < 2.8.0 which does not have COPY middleware.
from swift.common.constraints import check_copy_from_header, \
check_destination_header
from swift.common.middleware.copy import \
_check_copy_from_header as check_copy_from_header, \
_check_destination_header as check_destination_header, \
_copy_headers as copy_headers
from swift.common.swob import HTTPBadRequest, HTTPUnauthorized, \
HTTPMethodNotAllowed, HTTPPreconditionFailed, HTTPForbidden
from swift.common.utils import config_true_value, public, FileLikeIter, \